Metadata-Version: 2.4
Name: docmost-client
Version: 0.1.0
Summary: Unofficial typed Python client for the internal API of self-hosted Docmost Community Edition.
Keywords: docmost,wiki,client,api
Author: Yugen Labs
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Typing :: Typed
Requires-Dist: anyio>=4.15.1,<5
Requires-Dist: httpx>=0.28.1,<1
Requires-Dist: pydantic>=2.14.1,<3
Requires-Python: >=3.11
Description-Content-Type: text/markdown

# docmost-client

> **Unofficial, not affiliated with Docmost.**

Typed sync and async Python client for the internal API of self-hosted
**Docmost Community Edition** (tested with Docmost 0.96.0).

```python
from docmost_client import DocmostClient

with DocmostClient.from_env() as docmost:  # reads DOCMOST_* environment variables
    hits = docmost.search("deploy runbook", limit=5)
    for hit in hits:
        print(hit.title, hit.space.slug)
    if hits:
        page = docmost.get_page(hits[0].id, format="markdown")
        print(page.updated_at, page.content)
```

`AsyncDocmostClient` has the same methods as coroutines.

- Read-only by default; set `DOCMOST_READ_ONLY=0` to allow `create_page` / `update_page`.
- `DOCMOST_ALLOWED_SPACES` restricts every operation to the listed spaces.
- The JWT stays in memory and is revoked when the client is closed.
- Errors are subclasses of `DocmostError` with a stable `code`.

See the [project README](../../README.md) for configuration, formats, and limitations.
