jmapc: A JMAP client library for Python
Currently implemented:
- Basic models
- Request methods:
Core/echoEmail/changesEmail/copyEmail/getEmail/queryEmail/queryChangesEmail/setEmailSubmission/*(get,changes,query,queryChanges,set)Identity/*(get,changes,set)Mailbox/*(get,changes,query,queryChanges,set)SearchSnippet/*(get)Thread/*(get,changes)- Arbitrary methods via the
CustomMethodclass
- Fastmail-specific methods:
- Combined requests with support for result references
- Basic JMAP method response error handling
- EventSource event handling
- Unit tests for basic functionality and methods
pip install jmapcAny of the included examples can be invoked with poetry run:
JMAP_HOST=jmap.example.com \
JMAP_API_TOKEN=ness__pk_fire \
poetry run examples/identity_get.pyIf successful, examples/identity_get.py should output something like:
Identity 12345 is for Ness at [email protected]
Identity 67890 is for Ness at [email protected]
Poetry installation
Via pipx:
pip install pipx
pipx install poetry
pipx inject poetry poetry-pre-commit-pluginVia pip:
pip install poetry
poetry self add poetry-pre-commit-plugin- Setup:
poetry install - Run static checks:
poetry run poe lintorpoetry run pre-commit run --all-files - Run static checks and tests:
poetry run poe test
Created from smkent/cookie-python using cookiecutter
