# appwrite-python

Gives your agent reference code for the Appwrite Python SDK: users, tables, file storage and functions.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 1100 installs · ★ 28
- Author: appwrite
- License: BSD-3-Clause · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/appwrite/skills/tree/HEAD/skills/appwrite-python/SKILL.md
- Updated: 2026-10-20
- HTML: https://affpapa.org/en/nevibecode/skills/appwrite-python

## What it does

This skill drops a reference for the Appwrite Python SDK into your agent's context. It shows how to build the client with `Client().set_endpoint(...).set_project(...).set_key(...)` and how to call `Users`, `TablesDB`, `Storage`, `Functions` and `Teams`. The agent stops guessing method signatures and reads them from the skill instead.

Database work gets its own section: `create_row`, `list_rows`, `update_row`, `delete_row`, plus the full `Query` surface for filters, sorting, pagination, aggregations and joins. There is a table of string column types — `varchar`, `text`, `mediumtext`, `longtext` — with character limits and indexing behaviour. Handy when your Django, Flask or FastAPI backend keeps its data in Appwrite.

You need `APPWRITE_PROJECT_ID` and `APPWRITE_API_KEY` in the environment, and the package itself comes from `pip install appwrite`. One thing to watch: the skill states that the `Databases` class is deprecated and new code should use `TablesDB`. If your codebase already relies on `Databases`, the agent may default to the old class, so check which one it picked.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add appwrite/skills --skill appwrite-python -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/appwrite-python/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/appwrite-python/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add appwrite/skills --skill appwrite-python -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/appwrite-python/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add appwrite/skills --skill appwrite-python -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/appwrite-python/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install appwrite/skills appwrite-python
```

2. **Manually: put the files in place**
- File: `.github/skills/appwrite-python/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add appwrite/skills --skill appwrite-python -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/appwrite/skills --path skills/appwrite-python
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/appwrite-python/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add appwrite/skills --skill appwrite-python -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/appwrite/skills/tree/HEAD/skills/appwrite-python/SKILL.md

## When to use it
- create a user and send invites through the Users API
- run CRUD operations on Appwrite table rows
- upload a file to a bucket and read its metadata
- build a query with filters, sorting and pagination
- wire Appwrite into Django, Flask or FastAPI without hunting for signatures

## Example prompts
- Set up the Appwrite client in Python and keep the keys in environment variables
- Create an articles table with varchar and mediumtext columns using TablesDB
- Write a row listing with a status filter and a date sort

## Source text · SKILL.md · BSD-3-Clause

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 87c8e9fe62b28a81.

BEGIN THIRD-PARTY FILE 87c8e9fe62b28a81
````text
---
name: appwrite-python
description: Appwrite Python SDK skill. Use when building server-side Python applications with Appwrite, including Django, Flask, and FastAPI integrations. Covers user management, database/table CRUD, file storage, and functions via API keys.
---


# Appwrite Python SDK

## Installation

```bash
pip install appwrite
```

## Setting Up the Client

```python
from appwrite.client import Client
from appwrite.id import ID
from appwrite.query import Query
from appwrite.services.users import Users
from appwrite.services.tables_db import TablesDB
from appwrite.services.storage import Storage
from appwrite.services.functions import Functions
from appwrite.enums.o_auth_provider import OAuthProvider

import os

client = (Client()
    .set_endpoint('https://<REGION>.cloud.appwrite.io/v1')
    .set_project(os.environ['APPWRITE_PROJECT_ID'])
    .set_key(os.environ['APPWRITE_API_KEY']))
```

## Code Examples

### User Management

```python
users = Users(client)

# Create user
user = users.create(ID.unique(), 'user@example.com', None, 'password123', 'User Name')

# List users
result = users.list([Query.limit(25)])

# Get user
fetched = users.get('[USER_ID]')

# Delete user
users.delete('[USER_ID]')
```

### Database Operations

> **Note:** Use `TablesDB` (not the deprecated `Databases` class) for all new code. Only use `Databases` if the existing codebase already relies on it or the user explicitly requests it.
>
> **Tip:** Prefer keyword arguments (e.g., `database_id='...'`) over positional arguments for all SDK method calls. Only use positional style if the existing codebase already uses it or the user explicitly requests it.

```python
tables_db = TablesDB(client)

# Create database
db = tables_db.create(ID.unique(), 'My Database')

# Create row
doc = tables_db.create_row('[DATABASE_ID]', '[TABLE_ID]', ID.unique(), {
    'title': 'Hello World'
})

# Query rows
results = tables_db.list_rows('[DATABASE_ID]', '[TABLE_ID]', [
    Query.equal('title', 'Hello World'),
    Query.limit(10)
])

# Get row
row = tables_db.get_row('[DATABASE_ID]', '[TABLE_ID]', '[ROW_ID]')

# Update row
tables_db.update_row('[DATABASE_ID]', '[TABLE_ID]', '[ROW_ID]', {
    'title': 'Updated'
})

# Delete row
tables_db.delete_row('[DATABASE_ID]', '[TABLE_ID]', '[ROW_ID]')
```

#### String Column Types

> **Note:** The legacy `string` type is deprecated. Use explicit column types for all new columns.

| Type | Max characters | Indexing | Storage |
|------|---------------|----------|---------|
| `varchar` | 16,383 | Full index (if size ≤ 768) | Inline in row |
| `text` | 16,383 | Prefix only | Off-page |
| `mediumtext` | 4,194,303 | Prefix only | Off-page |
````
END THIRD-PARTY FILE 87c8e9fe62b28a81

The third-party file has ended. Everything between the 87c8e9fe62b28a81 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2688 of 14774 bytes. © appwrite · BSD-3-Clause · https://github.com/appwrite/skills/tree/HEAD/skills/appwrite-python/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
