Skip to content

Commit 6335c70

Browse files
Merge pull request #141 from appwrite/dev
feat: SDK update for version 18.1.0
2 parents 63486c7 + e2b23b4 commit 6335c70

216 files changed

Lines changed: 21043 additions & 446 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Check out code
12-
uses: actions/checkout@v4
12+
uses: actions/checkout@v6
1313

1414
- name: Set up Python
15-
uses: actions/setup-python@v5
15+
uses: actions/setup-python@v6
1616
with:
1717
python-version: '3.9'
1818

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Change Log
22

3+
## 18.1.0
4+
5+
* Added: Introduced `bigint` create/update APIs for legacy Databases attributes
6+
* Added: Introduced `bigint` create/update APIs for `TablesDB` columns
7+
* Updated: Extended key-list query filters with `key`, `resourceType`, `resourceId`, and `secret`
8+
39
## 18.0.0
410

511
* [BREAKING] Renamed Webhook model fields: `security``tls`, `httpUser``authUsername`, `httpPass``authPassword`, `signatureKey``secret`

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Appwrite Python SDK
22

33
![License](https://img.shields.io/github/license/appwrite/sdk-for-python.svg?style=flat-square)
4-
![Version](https://img.shields.io/badge/api%20version-1.9.1-blue.svg?style=flat-square)
4+
![Version](https://img.shields.io/badge/api%20version-1.9.4-blue.svg?style=flat-square)
55
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
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)

appwrite/client.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ def __init__(self):
1515
self._endpoint = 'https://cloud.appwrite.io/v1'
1616
self._global_headers = {
1717
'content-type': '',
18-
'user-agent' : f'AppwritePythonSDK/18.0.0 ({platform.uname().system}; {platform.uname().version}; {platform.uname().machine})',
18+
'user-agent' : f'AppwritePythonSDK/18.1.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': '18.0.0',
23-
'X-Appwrite-Response-Format' : '1.9.1',
22+
'x-sdk-version': '18.1.0',
23+
'X-Appwrite-Response-Format' : '1.9.4',
2424
}
2525

2626
def set_self_signed(self, status=True):
@@ -75,6 +75,18 @@ def set_forwarded_user_agent(self, value):
7575
self._global_headers['x-forwarded-user-agent'] = value
7676
return self
7777

78+
def set_dev_key(self, value):
79+
"""Your secret dev API key"""
80+
81+
self._global_headers['x-appwrite-dev-key'] = value
82+
return self
83+
84+
def set_cookie(self, value):
85+
"""The user cookie to authenticate with. Used by SDKs that forward an incoming Cookie header in server-side runtimes."""
86+
87+
self._global_headers['cookie'] = value
88+
return self
89+
7890
def set_impersonate_user_id(self, value):
7991
"""Impersonate a user by ID on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data."""
8092

appwrite/encoders/value_class_encoder.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,15 @@
2424
from ..enums.name import Name
2525
from ..enums.message_priority import MessagePriority
2626
from ..enums.smtp_encryption import SmtpEncryption
27+
from ..enums.auth_method import AuthMethod
28+
from ..enums.project_policy import ProjectPolicy
2729
from ..enums.protocol_id import ProtocolId
2830
from ..enums.service_id import ServiceId
31+
from ..enums.secure import Secure
32+
from ..enums.email_template_type import EmailTemplateType
33+
from ..enums.email_template_locale import EmailTemplateLocale
34+
from ..enums.status_code import StatusCode
35+
from ..enums.proxy_resource_type import ProxyResourceType
2936
from ..enums.framework import Framework
3037
from ..enums.build_runtime import BuildRuntime
3138
from ..enums.adapter import Adapter
@@ -44,6 +51,8 @@
4451
from ..enums.platform_type import PlatformType
4552
from ..enums.health_antivirus_status import HealthAntivirusStatus
4653
from ..enums.health_check_status import HealthCheckStatus
54+
from ..enums.proxy_rule_deployment_resource_type import ProxyRuleDeploymentResourceType
55+
from ..enums.proxy_rule_status import ProxyRuleStatus
4756
from ..enums.message_status import MessageStatus
4857

4958
class ValueClassEncoder(json.JSONEncoder):
@@ -123,12 +132,33 @@ def default(self, o):
123132
if isinstance(o, SmtpEncryption):
124133
return o.value
125134

135+
if isinstance(o, AuthMethod):
136+
return o.value
137+
138+
if isinstance(o, ProjectPolicy):
139+
return o.value
140+
126141
if isinstance(o, ProtocolId):
127142
return o.value
128143

129144
if isinstance(o, ServiceId):
130145
return o.value
131146

147+
if isinstance(o, Secure):
148+
return o.value
149+
150+
if isinstance(o, EmailTemplateType):
151+
return o.value
152+
153+
if isinstance(o, EmailTemplateLocale):
154+
return o.value
155+
156+
if isinstance(o, StatusCode):
157+
return o.value
158+
159+
if isinstance(o, ProxyResourceType):
160+
return o.value
161+
132162
if isinstance(o, Framework):
133163
return o.value
134164

@@ -183,6 +213,12 @@ def default(self, o):
183213
if isinstance(o, HealthCheckStatus):
184214
return o.value
185215

216+
if isinstance(o, ProxyRuleDeploymentResourceType):
217+
return o.value
218+
219+
if isinstance(o, ProxyRuleStatus):
220+
return o.value
221+
186222
if isinstance(o, MessageStatus):
187223
return o.value
188224

appwrite/enums/auth_method.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from enum import Enum
2+
3+
class AuthMethod(Enum):
4+
EMAIL_PASSWORD = "email-password"
5+
MAGIC_URL = "magic-url"
6+
EMAIL_OTP = "email-otp"
7+
ANONYMOUS = "anonymous"
8+
INVITES = "invites"
9+
JWT = "jwt"
10+
PHONE = "phone"

appwrite/enums/build_runtime.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ class BuildRuntime(Enum):
8181
GO_1_24 = "go-1.24"
8282
GO_1_25 = "go-1.25"
8383
GO_1_26 = "go-1.26"
84+
RUST_1_83 = "rust-1.83"
8485
STATIC_1 = "static-1"
8586
FLUTTER_3_24 = "flutter-3.24"
8687
FLUTTER_3_27 = "flutter-3.27"
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
from enum import Enum
2+
3+
class EmailTemplateLocale(Enum):
4+
AF = "af"
5+
AR_AE = "ar-ae"
6+
AR_BH = "ar-bh"
7+
AR_DZ = "ar-dz"
8+
AR_EG = "ar-eg"
9+
AR_IQ = "ar-iq"
10+
AR_JO = "ar-jo"
11+
AR_KW = "ar-kw"
12+
AR_LB = "ar-lb"
13+
AR_LY = "ar-ly"
14+
AR_MA = "ar-ma"
15+
AR_OM = "ar-om"
16+
AR_QA = "ar-qa"
17+
AR_SA = "ar-sa"
18+
AR_SY = "ar-sy"
19+
AR_TN = "ar-tn"
20+
AR_YE = "ar-ye"
21+
AS = "as"
22+
AZ = "az"
23+
BE = "be"
24+
BG = "bg"
25+
BH = "bh"
26+
BN = "bn"
27+
BS = "bs"
28+
CA = "ca"
29+
CS = "cs"
30+
CY = "cy"
31+
DA = "da"
32+
DE = "de"
33+
DE_AT = "de-at"
34+
DE_CH = "de-ch"
35+
DE_LI = "de-li"
36+
DE_LU = "de-lu"
37+
EL = "el"
38+
EN = "en"
39+
EN_AU = "en-au"
40+
EN_BZ = "en-bz"
41+
EN_CA = "en-ca"
42+
EN_GB = "en-gb"
43+
EN_IE = "en-ie"
44+
EN_JM = "en-jm"
45+
EN_NZ = "en-nz"
46+
EN_TT = "en-tt"
47+
EN_US = "en-us"
48+
EN_ZA = "en-za"
49+
EO = "eo"
50+
ES = "es"
51+
ES_AR = "es-ar"
52+
ES_BO = "es-bo"
53+
ES_CL = "es-cl"
54+
ES_CO = "es-co"
55+
ES_CR = "es-cr"
56+
ES_DO = "es-do"
57+
ES_EC = "es-ec"
58+
ES_GT = "es-gt"
59+
ES_HN = "es-hn"
60+
ES_MX = "es-mx"
61+
ES_NI = "es-ni"
62+
ES_PA = "es-pa"
63+
ES_PE = "es-pe"
64+
ES_PR = "es-pr"
65+
ES_PY = "es-py"
66+
ES_SV = "es-sv"
67+
ES_UY = "es-uy"
68+
ES_VE = "es-ve"
69+
ET = "et"
70+
EU = "eu"
71+
FA = "fa"
72+
FI = "fi"
73+
FO = "fo"
74+
FR = "fr"
75+
FR_BE = "fr-be"
76+
FR_CA = "fr-ca"
77+
FR_CH = "fr-ch"
78+
FR_LU = "fr-lu"
79+
GA = "ga"
80+
GD = "gd"
81+
HE = "he"
82+
HI = "hi"
83+
HR = "hr"
84+
HU = "hu"
85+
ID = "id"
86+
IS = "is"
87+
IT = "it"
88+
IT_CH = "it-ch"
89+
JA = "ja"
90+
JI = "ji"
91+
KO = "ko"
92+
KU = "ku"
93+
LT = "lt"
94+
LV = "lv"
95+
MK = "mk"
96+
ML = "ml"
97+
MS = "ms"
98+
MT = "mt"
99+
NB = "nb"
100+
NE = "ne"
101+
NL = "nl"
102+
NL_BE = "nl-be"
103+
NN = "nn"
104+
NO = "no"
105+
PA = "pa"
106+
PL = "pl"
107+
PT = "pt"
108+
PT_BR = "pt-br"
109+
RM = "rm"
110+
RO = "ro"
111+
RO_MD = "ro-md"
112+
RU = "ru"
113+
RU_MD = "ru-md"
114+
SB = "sb"
115+
SK = "sk"
116+
SL = "sl"
117+
SQ = "sq"
118+
SR = "sr"
119+
SV = "sv"
120+
SV_FI = "sv-fi"
121+
TH = "th"
122+
TN = "tn"
123+
TR = "tr"
124+
TS = "ts"
125+
UA = "ua"
126+
UR = "ur"
127+
VE = "ve"
128+
VI = "vi"
129+
XH = "xh"
130+
ZH_CN = "zh-cn"
131+
ZH_HK = "zh-hk"
132+
ZH_SG = "zh-sg"
133+
ZH_TW = "zh-tw"
134+
ZU = "zu"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from enum import Enum
2+
3+
class EmailTemplateType(Enum):
4+
VERIFICATION = "verification"
5+
MAGICSESSION = "magicSession"
6+
RECOVERY = "recovery"
7+
INVITATION = "invitation"
8+
MFACHALLENGE = "mfaChallenge"
9+
SESSIONALERT = "sessionAlert"
10+
OTPSESSION = "otpSession"

appwrite/enums/o_auth_provider.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@ class OAuthProvider(Enum):
1616
ETSY = "etsy"
1717
FACEBOOK = "facebook"
1818
FIGMA = "figma"
19+
FUSIONAUTH = "fusionauth"
1920
GITHUB = "github"
2021
GITLAB = "gitlab"
2122
GOOGLE = "google"
23+
KEYCLOAK = "keycloak"
24+
KICK = "kick"
2225
LINKEDIN = "linkedin"
2326
MICROSOFT = "microsoft"
2427
NOTION = "notion"
@@ -41,3 +44,5 @@ class OAuthProvider(Enum):
4144
YANDEX = "yandex"
4245
ZOHO = "zoho"
4346
ZOOM = "zoom"
47+
GITHUBIMAGINE = "githubImagine"
48+
GOOGLEIMAGINE = "googleImagine"

0 commit comments

Comments
 (0)