Skip to content

Dacid99/jmaplib

 
 

Repository files navigation

jmaplib: A JMAP protocol client for Python

PyPI PyPI - Python Version Build codecov GitHub stars

Currently implemented:

  • Basic models
  • Request methods:
    • Core/echo
    • Email/changes
    • Email/copy
    • Email/get
    • Email/query
    • Email/queryChanges
    • Email/set
    • EmailSubmission/* (get, changes, query, queryChanges, set)
    • Identity/* (get, changes, set)
    • Mailbox/* (get, changes, query, queryChanges, set)
    • SearchSnippet/* (get)
    • Thread/* (get, changes)
    • Arbitrary methods via the CustomMethod class
  • 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

Installation

jmaplib is available on PyPI:

pip install jmaplib

Examples

Any 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.py

If successful, examples/identity_get.py should output something like:

Identity 12345 is for Ness at ness@onett.example.com
Identity 67890 is for Ness at ness-alternate@onett.example.com

Development

Poetry installation

Via pipx:

pip install pipx
pipx install poetry
pipx inject poetry poetry-pre-commit-plugin

Via pip:

pip install poetry
poetry self add poetry-pre-commit-plugin

Development tasks

  • Setup: poetry install
  • Run static checks: poetry run poe lint or poetry run pre-commit run --all-files
  • Run static checks and tests: poetry run poe test

Licensing

The source code of this project is available under the AGPLv3 license starting with commit 43868e2b5a22d9b9ed9f74a341cc85031c6f6577.

Previous commits are licensed under the original GPLv3 license.

The documentation is licensed under the CC-BY-SA 4.0 International License.


This project is a fork of the jmapc client library for Python.

A big THANKYOU to its creators!


About

JMAP protocol client for Python.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%