Skip to content

Commit b7d7e2f

Browse files
regen
1 parent 5ab43aa commit b7d7e2f

28 files changed

+970
-14
lines changed

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
# Change Log
22

3+
## 15.2.0
4+
5+
* Extended BuildRuntime and Runtime enums with new runtime versions (e.g., node-23/24/25, php-8.4, ruby-3.4/4.0, python-3.13/3.14, python-ml-3.13, deno-2.5/2.6, dotnet-10, java-25, swift-6.2, kotlin-2.3, bun-1.2/1.3, go-1.24/1.25/1.26).
6+
* Added new permission scopes: schedules.read, schedules.write, and events.read.
7+
* Added contains_any and contains_all filter helpers to the Query API (plus enhanced contains with docstrings).
8+
* Added optional encrypt parameter to all string attribute creation methods (e.g., longtext, mediumtext, text, varchar) in Databases to support encryption at rest.
9+
* Updated README to reflect Appwrite server compatibility version 1.8.x.
10+
* Backward-compatible enhancements: no breaking changes.
11+
312
## 15.1.0
413

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

818
## 15.0.0
919

@@ -74,4 +84,4 @@
7484

7585
## 9.0.3
7686

77-
* Update sdk to use Numpy-style docstrings
87+
* Update sdk to use Numpy-style docstrings

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
77
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
88

9-
**This SDK is compatible with Appwrite server version latest. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-python/releases).**
9+
**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).**
1010

1111
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)
1212

appwrite/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ def __init__(self):
1515
self._endpoint = 'https://cloud.appwrite.io/v1'
1616
self._global_headers = {
1717
'content-type': '',
18-
'user-agent' : f'AppwritePythonSDK/15.1.0 ({platform.uname().system}; {platform.uname().version}; {platform.uname().machine})',
18+
'user-agent' : f'AppwritePythonSDK/15.3.0 ({platform.uname().system}; {platform.uname().version}; {platform.uname().machine})',
1919
'x-sdk-name': 'Python',
2020
'x-sdk-platform': 'server',
2121
'x-sdk-language': 'python',
22-
'x-sdk-version': '15.1.0',
22+
'x-sdk-version': '15.3.0',
2323
'X-Appwrite-Response-Format' : '1.8.0',
2424
}
2525

appwrite/encoders/value_class_encoder.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from ..enums.timezone import Timezone
1010
from ..enums.browser_permission import BrowserPermission
1111
from ..enums.image_format import ImageFormat
12+
from ..enums.backup_services import BackupServices
1213
from ..enums.relationship_type import RelationshipType
1314
from ..enums.relation_mutate import RelationMutate
1415
from ..enums.index_type import IndexType
@@ -72,6 +73,9 @@ def default(self, o):
7273
if isinstance(o, ImageFormat):
7374
return o.value
7475

76+
if isinstance(o, BackupServices):
77+
return o.value
78+
7579
if isinstance(o, RelationshipType):
7680
return o.value
7781

appwrite/enums/backup_services.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from enum import Enum
2+
3+
class BackupServices(Enum):
4+
DATABASES = "databases"
5+
FUNCTIONS = "functions"
6+
STORAGE = "storage"

appwrite/enums/build_runtime.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ class BuildRuntime(Enum):
3232
PYTHON_ML_3_11 = "python-ml-3.11"
3333
PYTHON_ML_3_12 = "python-ml-3.12"
3434
PYTHON_ML_3_13 = "python-ml-3.13"
35-
DENO_1_21 = "deno-1.21"
36-
DENO_1_24 = "deno-1.24"
37-
DENO_1_35 = "deno-1.35"
3835
DENO_1_40 = "deno-1.40"
3936
DENO_1_46 = "deno-1.46"
4037
DENO_2_0 = "deno-2.0"

appwrite/enums/runtime.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ class Runtime(Enum):
3232
PYTHON_ML_3_11 = "python-ml-3.11"
3333
PYTHON_ML_3_12 = "python-ml-3.12"
3434
PYTHON_ML_3_13 = "python-ml-3.13"
35-
DENO_1_21 = "deno-1.21"
36-
DENO_1_24 = "deno-1.24"
37-
DENO_1_35 = "deno-1.35"
3835
DENO_1_40 = "deno-1.40"
3936
DENO_1_46 = "deno-1.46"
4037
DENO_2_0 = "deno-2.0"

appwrite/enums/scopes.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,12 @@ class Scopes(Enum):
5858
ASSISTANT_READ = "assistant.read"
5959
TOKENS_READ = "tokens.read"
6060
TOKENS_WRITE = "tokens.write"
61+
POLICIES_WRITE = "policies.write"
62+
POLICIES_READ = "policies.read"
63+
ARCHIVES_READ = "archives.read"
64+
ARCHIVES_WRITE = "archives.write"
65+
RESTORATIONS_READ = "restorations.read"
66+
RESTORATIONS_WRITE = "restorations.write"
67+
DOMAINS_READ = "domains.read"
68+
DOMAINS_WRITE = "domains.write"
69+
EVENTS_READ = "events.read"

appwrite/services/activities.py

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
from ..service import Service
2+
from typing import List, Dict, Any, Optional
3+
from ..exception import AppwriteException
4+
from appwrite.utils.deprecated import deprecated
5+
6+
class Activities(Service):
7+
8+
def __init__(self, client) -> None:
9+
super(Activities, self).__init__(client)
10+
11+
def list_events(self, queries: Optional[str] = None) -> Dict[str, Any]:
12+
"""
13+
List all events for selected filters.
14+
15+
Parameters
16+
----------
17+
queries : Optional[str]
18+
Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on attributes such as userId, teamId, etc.
19+
20+
Returns
21+
-------
22+
Dict[str, Any]
23+
API response as a dictionary
24+
25+
Raises
26+
------
27+
AppwriteException
28+
If API request fails
29+
"""
30+
31+
api_path = '/activities/events'
32+
api_params = {}
33+
34+
if queries is not None:
35+
api_params['queries'] = queries
36+
37+
return self.client.call('get', api_path, {
38+
}, api_params)
39+
40+
def get_event(self, event_id: str) -> Dict[str, Any]:
41+
"""
42+
Get event by ID.
43+
44+
45+
Parameters
46+
----------
47+
event_id : str
48+
Event ID.
49+
50+
Returns
51+
-------
52+
Dict[str, Any]
53+
API response as a dictionary
54+
55+
Raises
56+
------
57+
AppwriteException
58+
If API request fails
59+
"""
60+
61+
api_path = '/activities/events/{eventId}'
62+
api_params = {}
63+
if event_id is None:
64+
raise AppwriteException('Missing required parameter: "event_id"')
65+
66+
api_path = api_path.replace('{eventId}', event_id)
67+
68+
69+
return self.client.call('get', api_path, {
70+
}, api_params)

0 commit comments

Comments
 (0)