Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## 15.1.0

* Add `dart-3.10` and `flutter-3.38` to `BuildRuntime` and `Runtime` enums
* Fix `Roles` enum removed from Teams service; `roles` parameter now accepts `list[str]`
* Add support for the new `Backups` service

## 15.0.0

* Add array-based enum parameters (e.g., `permissions: list[BrowserPermission]`).
Expand Down Expand Up @@ -69,4 +75,4 @@

## 9.0.3

* Update sdk to use Numpy-style docstrings
* Update sdk to use Numpy-style docstrings
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)

**This SDK is compatible with Appwrite server version 1.8.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-python/releases).**
**This SDK is compatible with Appwrite server version latest. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-python/releases).**

Appwrite is an open-source backend as a service server that abstracts and simplifies complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Python SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)

Expand Down
4 changes: 2 additions & 2 deletions appwrite/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ def __init__(self):
self._endpoint = 'https://cloud.appwrite.io/v1'
self._global_headers = {
'content-type': '',
'user-agent' : f'AppwritePythonSDK/15.0.0 ({platform.uname().system}; {platform.uname().version}; {platform.uname().machine})',
'user-agent' : f'AppwritePythonSDK/15.1.0 ({platform.uname().system}; {platform.uname().version}; {platform.uname().machine})',
'x-sdk-name': 'Python',
'x-sdk-platform': 'server',
'x-sdk-language': 'python',
'x-sdk-version': '15.0.0',
'x-sdk-version': '15.1.0',
'X-Appwrite-Response-Format' : '1.8.0',
}

Expand Down
8 changes: 4 additions & 4 deletions appwrite/encoders/value_class_encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from ..enums.timezone import Timezone
from ..enums.browser_permission import BrowserPermission
from ..enums.image_format import ImageFormat
from ..enums.backup_services import BackupServices
from ..enums.relationship_type import RelationshipType
from ..enums.relation_mutate import RelationMutate
from ..enums.index_type import IndexType
Expand All @@ -27,7 +28,6 @@
from ..enums.adapter import Adapter
from ..enums.compression import Compression
from ..enums.image_gravity import ImageGravity
from ..enums.roles import Roles
from ..enums.password_hash import PasswordHash
from ..enums.messaging_provider_type import MessagingProviderType
from ..enums.database_type import DatabaseType
Expand Down Expand Up @@ -73,6 +73,9 @@ def default(self, o):
if isinstance(o, ImageFormat):
return o.value

if isinstance(o, BackupServices):
return o.value

if isinstance(o, RelationshipType):
return o.value

Expand Down Expand Up @@ -127,9 +130,6 @@ def default(self, o):
if isinstance(o, ImageGravity):
return o.value

if isinstance(o, Roles):
return o.value

if isinstance(o, PasswordHash):
return o.value

Expand Down
6 changes: 6 additions & 0 deletions appwrite/enums/backup_services.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from enum import Enum

class BackupServices(Enum):
DATABASES = "databases"
FUNCTIONS = "functions"
STORAGE = "storage"
5 changes: 2 additions & 3 deletions appwrite/enums/build_runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ class BuildRuntime(Enum):
PYTHON_3_12 = "python-3.12"
PYTHON_ML_3_11 = "python-ml-3.11"
PYTHON_ML_3_12 = "python-ml-3.12"
DENO_1_21 = "deno-1.21"
DENO_1_24 = "deno-1.24"
DENO_1_35 = "deno-1.35"
DENO_1_40 = "deno-1.40"
DENO_1_46 = "deno-1.46"
DENO_2_0 = "deno-2.0"
Expand All @@ -40,6 +37,7 @@ class BuildRuntime(Enum):
DART_3_5 = "dart-3.5"
DART_3_8 = "dart-3.8"
DART_3_9 = "dart-3.9"
DART_3_10 = "dart-3.10"
DOTNET_6_0 = "dotnet-6.0"
DOTNET_7_0 = "dotnet-7.0"
DOTNET_8_0 = "dotnet-8.0"
Expand Down Expand Up @@ -68,3 +66,4 @@ class BuildRuntime(Enum):
FLUTTER_3_29 = "flutter-3.29"
FLUTTER_3_32 = "flutter-3.32"
FLUTTER_3_35 = "flutter-3.35"
FLUTTER_3_38 = "flutter-3.38"
6 changes: 0 additions & 6 deletions appwrite/enums/roles.py

This file was deleted.

5 changes: 2 additions & 3 deletions appwrite/enums/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ class Runtime(Enum):
PYTHON_3_12 = "python-3.12"
PYTHON_ML_3_11 = "python-ml-3.11"
PYTHON_ML_3_12 = "python-ml-3.12"
DENO_1_21 = "deno-1.21"
DENO_1_24 = "deno-1.24"
DENO_1_35 = "deno-1.35"
DENO_1_40 = "deno-1.40"
DENO_1_46 = "deno-1.46"
DENO_2_0 = "deno-2.0"
Expand All @@ -40,6 +37,7 @@ class Runtime(Enum):
DART_3_5 = "dart-3.5"
DART_3_8 = "dart-3.8"
DART_3_9 = "dart-3.9"
DART_3_10 = "dart-3.10"
DOTNET_6_0 = "dotnet-6.0"
DOTNET_7_0 = "dotnet-7.0"
DOTNET_8_0 = "dotnet-8.0"
Expand Down Expand Up @@ -68,3 +66,4 @@ class Runtime(Enum):
FLUTTER_3_29 = "flutter-3.29"
FLUTTER_3_32 = "flutter-3.32"
FLUTTER_3_35 = "flutter-3.35"
FLUTTER_3_38 = "flutter-3.38"
8 changes: 8 additions & 0 deletions appwrite/enums/scopes.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,11 @@ class Scopes(Enum):
ASSISTANT_READ = "assistant.read"
TOKENS_READ = "tokens.read"
TOKENS_WRITE = "tokens.write"
POLICIES_WRITE = "policies.write"
POLICIES_READ = "policies.read"
ARCHIVES_READ = "archives.read"
ARCHIVES_WRITE = "archives.write"
RESTORATIONS_READ = "restorations.read"
RESTORATIONS_WRITE = "restorations.write"
DOMAINS_READ = "domains.read"
DOMAINS_WRITE = "domains.write"
Loading