calendaring_jmap: Package entry points#

get_jmap_client, get_async_jmap_client, and get_connection_params are the functions most code imports directly from calendaring_jmap.

calendaring_jmap.get_jmap_client(**kwargs) → JMAPClient | None[source]#

Create a JMAPClient from configuration.

Configuration is read in priority order:

  1. Explicit keyword arguments (url, username, password, …)

  2. Environment variables (JMAP_URL, JMAP_USERNAME, …)

  3. A YAML config file (~/.config/calendaring-jmap/calendar.yaml or equivalent)

Returns None if no configuration is found, rather than raising.

Example:

client = get_jmap_client(url="https://jmap.example.com/.well-known/jmap",
                          username="alice", password="secret")
calendaring_jmap.get_async_jmap_client(**kwargs) → AsyncJMAPClient | None[source]#

Create an AsyncJMAPClient from configuration.

Accepts the same arguments and reads configuration from the same sources as get_jmap_client(). Returns None if no configuration is found.

Example:

async with get_async_jmap_client(
    url="https://jmap.example.com/.well-known/jmap",
    username="alice", password="secret"
) as client:
    calendars = await client.get_calendars()
calendaring_jmap.get_connection_params(config_file: str | Path | None = None, **explicit_params: Any) → dict[str, Any] | None[source]#

Resolve JMAP connection parameters from kwargs, env vars, or a config file.

Parameters:
  • config_file – Explicit path to a YAML config file. Defaults to the JMAP_CONFIG_FILE environment variable, then ~/.config/calendaring-jmap/calendar.yaml.

  • **explicit_params – url, username, password, auth, auth_type, timeout. A value of None is treated as “not supplied”, not “unset”: this lets a thin CLI wrapper pass every option through unconditionally without wiping out env vars for the ones the user left off.

Returns:

A dict of connection parameters, or None if no source yields a URL.

Everything else exported from calendaring_jmap (JMAPClient, AsyncJMAPClient, the calendar objects, and the error hierarchy) has its own page, listed below.

Last updated on 2026-10-08.