docmost-sdk (Python)
Python client for the Docmost REST API — same surface as the .NET client.
Installation
pip install docmost-sdk
Requires Python 3.10+.
From source:
cd python
pip install .
Quick start
API token (Bearer)
from docmost import DocmostClient
from docmost.models import PaginationOptions, User
from docmost.response import parse_data
with DocmostClient("https://docs.example.com", api_token="your-api-key") as client:
me = client.users.get_user_info()
user = parse_data(me, User)
print(user.email if user else None)
Email and password (cookie session)
with DocmostClient(
"https://docs.example.com",
email="admin@example.com",
password="secret",
) as client:
spaces = client.spaces.get_workspace_spaces(PaginationOptions(limit=20))
Advanced options
import os
client = DocmostClient(
"https://docs.example.com",
api_token=os.environ["DOCMOST_API_TOKEN"],
login_on_startup=False,
timeout=60.0,
)
API surface
DocmostClient exposes grouped APIs (snake_case), matching OpenAPI tags:
| Attribute | Description |
|---|---|
auth |
Login, logout, password reset, setup |
users |
Current user profile |
workspace |
Workspace settings, members, invites |
spaces |
Spaces and membership |
pages |
Pages, history, tree |
comments |
Page comments |
attachments |
Uploads and file downloads |
search |
Full-text search |
shares |
Public sharing |
groups |
User groups |
export / import_ |
Export and import (import_ — reserved keyword) |
health / version |
Health and version |
api_keys, mfa, license, sso, ai, cloud |
Enterprise features |
Methods return ApiResponse with a data field (usually dict). Use parse_data(response, Model) for typed Pydantic models from docmost.models.
Authentication
| Mode | Constructor |
|---|---|
| API token | DocmostClient(url, api_token="...") |
| Cookie session | DocmostClient(url, email="...", password="...") |
Do not pass both api_token and email/password.
Regenerate from OpenAPI
python3 scripts/generate_sdk.py # from repo root: python3 python/scripts/generate_sdk.py
License
MIT
Metadata
Release files for docmost-sdk 1.0.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 |
|---|---|---|---|---|
| docmost_sdk-1.0.0.tar.gz | 21.0 kB | Without provenance | Details for docmost_sdk-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| docmost_sdk-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for docmost_sdk-1.0.0-py3-none-any.whl |
Total release size: 92.4 kB
Release files / docmost_sdk-1.0.0.tar.gz
| Download URL | docmost_sdk-1.0.0.tar.gz |
|---|---|
| Size | 21.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
58d9a1700552ba16409612ac811eb6adabf65e954c511b18d230dec695b7e239
|
|
BLAKE2b-256 checksum How to use checksums |
3828cb658864fb4bd121e346a2df95c81cbc798a96735707b57f4597958b99ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / docmost_sdk-1.0.0-py3-none-any.whl
| Download URL | docmost_sdk-1.0.0-py3-none-any.whl |
|---|---|
| Size | 71.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3191f476d5a79796cbea0aa7c45f1fa815b3e31bc881ff486409cb94ff8ba328
|
|
BLAKE2b-256 checksum How to use checksums |
eef68395a8c88f2a94cd4621994700d781dbadd32f8b607c2fc29288551a3fdf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for docmost-sdk 1.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.
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.