Quickstart#

This tutorial walks you through listing your calendars with calendaring-jmap. It assumes you have access to a JMAP server that speaks RFC 8620 and the JMAP Calendars protocol (urn:ietf:params:jmap:calendars); Cyrus IMAP is the server calendaring-jmap is tested against most.

Install the package#

pip install calendaring-jmap

See Install for installing from a source checkout instead.

Create a client#

from calendaring_jmap import get_jmap_client

with get_jmap_client(
    url="https://jmap.example.com/.well-known/jmap",
    username="alice",
    password="secret",
) as client:
    calendars = client.get_calendars()
    for cal in calendars:
        print(cal.name)

Replace the URL, username, and password with your own server’s details, then run the script. You should see the names of your calendars printed.

What happened#

get_jmap_client created a JMAPClient, which fetched the server’s JMAP Session object and used it to call get_calendars(). The with block keeps the underlying HTTP connection open across calls and closes it when you’re done.

Next steps#

  • Authenticate for other ways to supply credentials.

  • Work with calendars to create, share, and manage calendars themselves, beyond listing them.

  • Work with events to create, read, update, and delete events.

  • Handle errors to handle what can go wrong.

  • The sidebar’s How-to guides section covers everything else this client can do.

  • Design to understand how the client is put together, and why.

Last updated on 2026-10-08.