AppFlowy SDK
Type-safe Python SDK for the AppFlowy Cloud REST API.
Installation
pip install appflowysdk
# or
uv add appflowysdk
Quick Start
from appflowysdk import AppFlowy
with AppFlowy(email="user@example.com", password="password") as client:
# Authenticate
token = client.login()
print(f"Logged in, token expires in {token.expires_in}s")
# List workspaces
workspaces = client.get_workspaces(include_member_count=True)
for ws in workspaces:
print(f"{ws.workspace_name} ({ws.workspace_id})")
# Get folder structure
folder = client.get_workspace_folder(workspaces[0].workspace_id)
# List databases
databases = client.get_databases(workspaces[0].workspace_id)
# Get database fields
fields = client.get_database_fields(
workspaces[0].workspace_id, databases[0].id
)
# Get row IDs
rows = client.get_database_row_ids(
workspaces[0].workspace_id, databases[0].id
)
# Get row details
if rows:
details = client.get_database_row_details(
workspaces[0].workspace_id,
databases[0].id,
[rows[0].id],
with_doc=True,
)
# Create a row
row_id = client.create_database_row(
workspaces[0].workspace_id,
databases[0].id,
cells={"field_id": "value"},
)
# Upsert a row
row_id = client.upsert_database_row(
workspaces[0].workspace_id,
databases[0].id,
pre_hash="unique-key",
cells={"field_id": "value"},
)
Document APIs
New helpers cover document collabs, pages, quick notes, search, publishing, and imports. See docs/documents.md for details.
workspace_id = "workspace-uuid"
object_id = "object-uuid"
parent_view_id = "parent-view-uuid"
encoded_collab = "encoded-collab"
zip_bytes = b"..."
with AppFlowy(email="user@example.com", password="password") as client:
client.create_collab(workspace_id, object_id, encoded_collab)
collab = client.get_collab(workspace_id, object_id)
page = client.create_page(workspace_id, parent_view_id, name="My Page")
note = client.create_quick_note(workspace_id, "Idea", "Draft text")
results = client.search_documents(workspace_id, "meeting notes")
client.publish_page(workspace_id, page.view_id)
client.import_zip(zip_bytes)
OAuth
client = AppFlowy()
token = client.oauth_redirect_token(
code="auth_code_from_redirect",
grant_type="authorization_code",
)
Error Handling
All SDK errors inherit from AppFlowyError:
from appflowysdk.exceptions import (
AppFlowyError,
LoginError,
RefreshTokenError,
APIError,
ValidationError,
NetworkError,
)
API Reference
| Method | Endpoint | Description |
|---|---|---|
login() |
POST /gotrue/token?grant_type=password |
Password auth |
refresh_token() |
POST /gotrue/token?grant_type=refresh_token |
Refresh token |
oauth_redirect_token() |
GET /web-api/oauth-redirect/token |
OAuth token exchange |
get_workspaces() |
GET /api/workspace |
List workspaces |
get_workspace_folder() |
GET /api/workspace/{id}/folder |
Get folder tree |
get_databases() |
GET /api/workspace/{id}/database |
List databases |
get_database_fields() |
GET /api/workspace/{id}/database/{id}/fields |
List fields |
get_database_row_ids() |
GET /api/workspace/{id}/database/{id}/row |
List row IDs |
create_database_row() |
POST /api/workspace/{id}/database/{id}/row |
Create row |
upsert_database_row() |
PUT /api/workspace/{id}/database/{id}/row |
Upsert row |
get_database_row_ids_updated() |
GET /api/workspace/{id}/database/{id}/row/updated |
Updated rows |
get_database_row_details() |
GET /api/workspace/{id}/database/{id}/row/detail |
Row details |
create_collab() |
POST /api/workspace/{id}/collab/{object_id} |
Create collab |
update_collab() |
PUT /api/workspace/{id}/collab/{object_id} |
Update collab |
get_collab() |
GET /api/workspace/{id}/collab/{object_id} |
Get collab |
get_collab_json() |
GET /api/workspace/v1/{id}/collab/{object_id}/json |
Get collab JSON |
batch_create_collab() |
POST /api/workspace/{id}/batch/collab |
Bulk create collabs |
full_sync_collab() |
POST /api/workspace/v1/{id}/collab/{object_id}/full-sync |
Full document sync |
web_update_collab() |
POST /api/workspace/v1/{id}/collab/{object_id}/web-update |
Web client update |
create_page() |
POST /api/workspace/{id}/page-view |
Create page |
get_page() |
GET /api/workspace/{id}/page-view/{view_id} |
Get page |
append_page_blocks() |
POST /api/workspace/{id}/page-view/{view_id}/append-block |
Append blocks |
create_orphaned_view() |
POST /api/workspace/{id}/orphaned-view |
Create orphaned view |
duplicate_page() |
POST /api/workspace/{id}/page-view/{view_id}/duplicate |
Duplicate page |
create_quick_note() |
POST /api/workspace/{id}/quick-note |
Create quick note |
list_quick_notes() |
GET /api/workspace/{id}/quick-note |
List quick notes |
search_documents() |
GET /api/search/{id} |
Search documents |
publish_page() |
POST /api/workspace/{id}/page-view/{view_id}/publish |
Publish page |
unpublish_page() |
POST /api/workspace/{id}/page-view/{view_id}/unpublish |
Unpublish page |
import_zip() |
POST /api/import |
Import ZIP archive |
create_import_task() |
POST /api/import/create |
Create import task |
Metadata
Release files for appflowysdk 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| appflowysdk-0.2.0.tar.gz | 20.9 kB | Without provenance | Details for appflowysdk-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| appflowysdk-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for appflowysdk-0.2.0-py3-none-any.whl |
Total release size: 37.9 kB
Release files / appflowysdk-0.2.0.tar.gz
| Download URL | appflowysdk-0.2.0.tar.gz |
|---|---|
| Size | 20.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
89a6820a88062acc5b6cdc6fc2500ba6f8fcda910f80d4887231ba1ff010e553
|
|
BLAKE2b-256 checksum How to use checksums |
09b2e0c59267d205dd0c8be2abf49965f527978a27ad592ad63eee2e86535ac1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / appflowysdk-0.2.0-py3-none-any.whl
| Download URL | appflowysdk-0.2.0-py3-none-any.whl |
|---|---|
| Size | 17.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0df162620340c48acfd9099ee4d7f4898c68874d3c74b9c6c1a504c8d7856217
|
|
BLAKE2b-256 checksum How to use checksums |
eb3704f75f2720e28f6cc2817aa1624b53ac7d022abc2e2cc107ad6074dae9dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for appflowysdk 0.2.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.