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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
# Change Log

## 19.1.0

* Added `DENO_1_21`, `DENO_1_24`, and `DENO_1_35` runtime options
* Added `sizeactual` field to `File` model for compressed file size
* Updated `BillingLimits` model fields to be optional
* Updated `Project` model `billinglimits` field to be optional
* Updated authentication examples in advisor documentation
## 20.0.0

* Breaking: Removed `githubImagine` and `googleImagine` from `ProjectOAuthProviderId`
* Breaking: Removed `deno-1.21`, `deno-1.24`, and `deno-1.35` from `Runtime` and `BuildRuntime`
* Breaking: Dropped numeric suffixes from `StatusCode` redirect members
* Added: `Organization` service for managing projects and API keys
* Added: `PolicyDenyAliasedEmail`, `PolicyDenyDisposableEmail`, and `PolicyDenyFreeEmail` policy models
* Added: `deny-aliased-email`, `deny-disposable-email`, and `deny-free-email` to `ProjectPolicyId`
* Added: `BrowserTheme`, `HealthQueueName`, `OrganizationKeyScopes`, and `Region` enums
* Added: `dart-3.12` and `flutter-3.44` runtimes
* Added: `ProjectList` model and new attributes on `Function`, `Site`, and `UsageGauge`
* Updated: `functions`, `sites`, `usage`, `health`, and `avatars` services
* Updated: Renamed `updatePresence` to `update` in the `presences` service

## 19.0.0

Expand Down
4 changes: 2 additions & 2 deletions appwrite/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ def __init__(self):
self._endpoint = 'https://cloud.appwrite.io/v1'
self._global_headers = {
'content-type': '',
'user-agent' : f'AppwritePythonSDK/19.2.0 ({platform.uname().system}; {platform.uname().version}; {platform.uname().machine})',
'user-agent' : f'AppwritePythonSDK/20.0.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': '19.2.0',
'x-sdk-version': '20.0.0',
'X-Appwrite-Response-Format' : '1.9.5',
}

Expand Down
22 changes: 13 additions & 9 deletions appwrite/encoders/value_class_encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from ..enums.browser import Browser
from ..enums.credit_card import CreditCard
from ..enums.flag import Flag
from ..enums.theme import Theme
from ..enums.browser_theme import BrowserTheme
from ..enums.timezone import Timezone
from ..enums.browser_permission import BrowserPermission
from ..enums.image_format import ImageFormat
Expand All @@ -16,16 +16,17 @@
from ..enums.databases_index_type import DatabasesIndexType
from ..enums.order_by import OrderBy
from ..enums.runtime import Runtime
from ..enums.scopes import Scopes
from ..enums.project_key_scopes import ProjectKeyScopes
from ..enums.template_reference_type import TemplateReferenceType
from ..enums.vcs_reference_type import VCSReferenceType
from ..enums.deployment_download_type import DeploymentDownloadType
from ..enums.execution_method import ExecutionMethod
from ..enums.name import Name
from ..enums.health_queue_name import HealthQueueName
from ..enums.message_priority import MessagePriority
from ..enums.smtp_encryption import SmtpEncryption
from ..enums.organization_key_scopes import OrganizationKeyScopes
from ..enums.region import Region
from ..enums.project_auth_method_id import ProjectAuthMethodId
from ..enums.project_key_scopes import ProjectKeyScopes
from ..enums.project_o_auth2_google_prompt import ProjectOAuth2GooglePrompt
from ..enums.project_o_auth_provider_id import ProjectOAuthProviderId
from ..enums.project_policy_id import ProjectPolicyId
Expand Down Expand Up @@ -82,7 +83,7 @@ def default(self, o):
if isinstance(o, Flag):
return o.value

if isinstance(o, Theme):
if isinstance(o, BrowserTheme):
return o.value

if isinstance(o, Timezone):
Expand Down Expand Up @@ -112,7 +113,7 @@ def default(self, o):
if isinstance(o, Runtime):
return o.value

if isinstance(o, Scopes):
if isinstance(o, ProjectKeyScopes):
return o.value

if isinstance(o, TemplateReferenceType):
Expand All @@ -127,7 +128,7 @@ def default(self, o):
if isinstance(o, ExecutionMethod):
return o.value

if isinstance(o, Name):
if isinstance(o, HealthQueueName):
return o.value

if isinstance(o, MessagePriority):
Expand All @@ -136,10 +137,13 @@ def default(self, o):
if isinstance(o, SmtpEncryption):
return o.value

if isinstance(o, ProjectAuthMethodId):
if isinstance(o, OrganizationKeyScopes):
return o.value

if isinstance(o, ProjectKeyScopes):
if isinstance(o, Region):
return o.value

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

if isinstance(o, ProjectOAuth2GooglePrompt):
Expand Down
1 change: 1 addition & 0 deletions appwrite/enums/backup_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ class BackupServices(Enum):
TABLESDB = "tablesdb"
DOCUMENTSDB = "documentsdb"
VECTORSDB = "vectorsdb"
DEDICATEDDATABASES = "dedicatedDatabases"
FUNCTIONS = "functions"
STORAGE = "storage"
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from enum import Enum

class Theme(Enum):
class BrowserTheme(Enum):
LIGHT = "light"
DARK = "dark"
5 changes: 2 additions & 3 deletions appwrite/enums/build_runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ class BuildRuntime(Enum):
PYTHON_ML_3_11 = "python-ml-3.11"
PYTHON_ML_3_12 = "python-ml-3.12"
PYTHON_ML_3_13 = "python-ml-3.13"
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 @@ -53,6 +50,7 @@ class BuildRuntime(Enum):
DART_3_9 = "dart-3.9"
DART_3_10 = "dart-3.10"
DART_3_11 = "dart-3.11"
DART_3_12 = "dart-3.12"
DOTNET_6_0 = "dotnet-6.0"
DOTNET_7_0 = "dotnet-7.0"
DOTNET_8_0 = "dotnet-8.0"
Expand Down Expand Up @@ -93,3 +91,4 @@ class BuildRuntime(Enum):
FLUTTER_3_35 = "flutter-3.35"
FLUTTER_3_38 = "flutter-3.38"
FLUTTER_3_41 = "flutter-3.41"
FLUTTER_3_44 = "flutter-3.44"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from enum import Enum

class Name(Enum):
class HealthQueueName(Enum):
V1_DATABASE = "v1-database"
V1_DELETES = "v1-deletes"
V1_AUDITS = "v1-audits"
Expand Down
13 changes: 13 additions & 0 deletions appwrite/enums/organization_key_scopes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from enum import Enum

class OrganizationKeyScopes(Enum):
PROJECTS_READ = "projects.read"
PROJECTS_WRITE = "projects.write"
DEVKEYS_READ = "devKeys.read"
DEVKEYS_WRITE = "devKeys.write"
ORGANIZATION_KEYS_READ = "organization.keys.read"
ORGANIZATION_KEYS_WRITE = "organization.keys.write"
DOMAINS_READ = "domains.read"
DOMAINS_WRITE = "domains.write"
KEYS_READ = "keys.read"
KEYS_WRITE = "keys.write"
2 changes: 0 additions & 2 deletions appwrite/enums/project_o_auth_provider_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,3 @@ class ProjectOAuthProviderId(Enum):
YANDEX = "yandex"
ZOHO = "zoho"
ZOOM = "zoom"
GITHUBIMAGINE = "githubImagine"
GOOGLEIMAGINE = "googleImagine"
3 changes: 3 additions & 0 deletions appwrite/enums/project_policy_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ class ProjectPolicyId(Enum):
SESSION_LIMIT = "session-limit"
USER_LIMIT = "user-limit"
MEMBERSHIP_PRIVACY = "membership-privacy"
DENY_ALIASED_EMAIL = "deny-aliased-email"
DENY_DISPOSABLE_EMAIL = "deny-disposable-email"
DENY_FREE_EMAIL = "deny-free-email"
9 changes: 9 additions & 0 deletions appwrite/enums/region.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from enum import Enum

class Region(Enum):
FRA = "fra"
NYC = "nyc"
SYD = "syd"
SFO = "sfo"
SGP = "sgp"
TOR = "tor"
5 changes: 2 additions & 3 deletions appwrite/enums/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ class Runtime(Enum):
PYTHON_ML_3_11 = "python-ml-3.11"
PYTHON_ML_3_12 = "python-ml-3.12"
PYTHON_ML_3_13 = "python-ml-3.13"
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 @@ -53,6 +50,7 @@ class Runtime(Enum):
DART_3_9 = "dart-3.9"
DART_3_10 = "dart-3.10"
DART_3_11 = "dart-3.11"
DART_3_12 = "dart-3.12"
DOTNET_6_0 = "dotnet-6.0"
DOTNET_7_0 = "dotnet-7.0"
DOTNET_8_0 = "dotnet-8.0"
Expand Down Expand Up @@ -93,3 +91,4 @@ class Runtime(Enum):
FLUTTER_3_35 = "flutter-3.35"
FLUTTER_3_38 = "flutter-3.38"
FLUTTER_3_41 = "flutter-3.41"
FLUTTER_3_44 = "flutter-3.44"
97 changes: 0 additions & 97 deletions appwrite/enums/scopes.py

This file was deleted.

8 changes: 4 additions & 4 deletions appwrite/enums/status_code.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from enum import Enum

class StatusCode(Enum):
MOVED_PERMANENTLY_301 = "301"
FOUND_302 = "302"
TEMPORARY_REDIRECT_307 = "307"
PERMANENT_REDIRECT_308 = "308"
MOVEDPERMANENTLY = "301"
FOUND = "302"
TEMPORARYREDIRECT = "307"
PERMANENTREDIRECT = "308"
16 changes: 12 additions & 4 deletions appwrite/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from .runtime_list import RuntimeList
from .deployment_list import DeploymentList
from .execution_list import ExecutionList
from .project_list import ProjectList
from .webhook_list import WebhookList
from .key_list import KeyList
from .country_list import CountryList
Expand Down Expand Up @@ -217,15 +218,18 @@
from .billing_limits import BillingLimits
from .block import Block
from .backup_policy import BackupPolicy
from .policy_deny_aliased_email import PolicyDenyAliasedEmail
from .policy_deny_disposable_email import PolicyDenyDisposableEmail
from .policy_deny_free_email import PolicyDenyFreeEmail
from .backup_restoration import BackupRestoration
from .usage_event import UsageEvent
from .usage_event_list import UsageEventList
from .usage_gauge import UsageGauge
from .usage_gauge_list import UsageGaugeList
from .activity_event_list import ActivityEventList
from .backup_archive_list import BackupArchiveList
from .backup_policy_list import BackupPolicyList
from .backup_restoration_list import BackupRestorationList
from .usage_event_list import UsageEventList
from .usage_gauge_list import UsageGaugeList

__all__ = [
'AppwriteModel',
Expand All @@ -252,6 +256,7 @@
'RuntimeList',
'DeploymentList',
'ExecutionList',
'ProjectList',
'WebhookList',
'KeyList',
'CountryList',
Expand Down Expand Up @@ -447,13 +452,16 @@
'BillingLimits',
'Block',
'BackupPolicy',
'PolicyDenyAliasedEmail',
'PolicyDenyDisposableEmail',
'PolicyDenyFreeEmail',
'BackupRestoration',
'UsageEvent',
'UsageEventList',
'UsageGauge',
'UsageGaugeList',
'ActivityEventList',
'BackupArchiveList',
'BackupPolicyList',
'BackupRestorationList',
'UsageEventList',
'UsageGaugeList',
]
Loading