Skip to main content

Appwrite Python SDK

License Version X Account Discord

This SDK targets Appwrite server version 2.5.x as shipped on Appwrite Cloud. Self-hosted releases can lag behind Cloud — if you run an older self-hosted build, use a matching older SDK from previous releases when APIs differ.

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

Appwrite

Installation

Requires Python 3.10 or later. Install the appwrite package from PyPI:

pip install appwrite

Or with uv:

uv add appwrite

Getting started

Initialize the client

Create a client with your Appwrite endpoint, project ID and an API key. Find the endpoint and project ID in your project's Settings page, and create an API key with only the scopes you need under API keys in the project sidebar.

from appwrite.client import Client

client = Client()
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1')
client.set_project('<PROJECT_ID>')
client.set_key('<API_KEY>')

API keys grant server-level access to your project. Keep them out of client-side code and version control.

Make a request

Create a service object with the client and call any of its methods. Every method returns a typed Pydantic model, so response fields are available as attributes.

from appwrite.id import ID
from appwrite.services.users import Users

users = Users(client)

user = users.create(
    user_id=ID.unique(),
    email='email@example.com',
    password='password',
    name="Walter O'Brien",
)

print(user.id)
print(user.name)
print(user.to_dict())

See the API reference for every service and method.

Work with rows

Use TablesDB to read and write rows. Pass a Pydantic model as model_type to get typed row data back; without it, row.data is a dict.

from typing import Optional

from pydantic import BaseModel

from appwrite.id import ID
from appwrite.query import Query
from appwrite.services.tables_db import TablesDB


class Post(BaseModel):
    title: str
    published: bool
    excerpt: Optional[str] = None


tables_db = TablesDB(client)

row = tables_db.create_row(
    database_id='<DATABASE_ID>',
    table_id='<TABLE_ID>',
    row_id=ID.unique(),
    data={'title': 'Hello, world', 'published': True},
    model_type=Post,
)

print(row.id)
print(row.data.title)

result = tables_db.list_rows(
    database_id='<DATABASE_ID>',
    table_id='<TABLE_ID>',
    queries=[Query.equal('published', True), Query.limit(25)],
    model_type=Post,
)

for row in result.rows:
    print(row.data.title)

Handle errors

Failed requests raise AppwriteException, which carries message, code, type and response.

from appwrite.exception import AppwriteException

try:
    user = users.get(user_id='<USER_ID>')
except AppwriteException as error:
    print(error.code, error.type, error.message)

Self-hosted Appwrite

Point the client at your own instance instead of Appwrite Cloud. Call set_self_signed() only in development, when the server uses a self-signed TLS certificate.

client.set_endpoint('https://appwrite.example.com/v1')
client.set_self_signed()

Learn more

Contribution

This library is auto-generated by Appwrite custom SDK Generator. To learn more about how you can help us improve this SDK, please check the contribution guide before sending a pull-request.

License

Please see the BSD-3-Clause license file for more information.

Metadata

Release files for appwrite 27.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for appwrite 27.0.0
File Size Uploaded Provenance
appwrite-27.0.0.tar.gz 295.2 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for appwrite 27.0.0
File Interpreter ABI Platform
appwrite-27.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 812.9 kB

Release files / appwrite-27.0.0.tar.gz

Download URL appwrite-27.0.0.tar.gz
Size 295.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3197008fe58f2d558c3b9bee4bbe80fe9db4086a96338104af6156f0d5eb2809
BLAKE2b-256 checksum
How to use checksums
69f1ac331685df69ba010ade282501329b39cac1135193048eafa1645149ab57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

Release files / appwrite-27.0.0-py3-none-any.whl

Download URL appwrite-27.0.0-py3-none-any.whl
Size 517.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aa756810300199c9889175f4e75cfbf553fac51fa5a97f57ff33a164df79d41c
BLAKE2b-256 checksum
How to use checksums
c5b2d10b997d468ece71a94b8c8a7419da2243902d775e0d1f0a5e47b71efda2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

Security for appwrite 27.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for appwrite-27.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

27.0.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page