The shared configuration file of caldav, calendaring and calendaring-jmap: format, discovery and credentials
Maintained. Last release 6 weeks ago, commits in 1 of the last 26 weeks. Weaker on commit activity and contributor spread.
pip install calendaring-configcalendaring-config
One configuration file for the pycalendar libraries: caldav,
calendaring and
calendaring-jmap. A user with a CalDAV server, a JMAP account, a
directory of .ics files and a GitHub repository describes them once:
work:
kind: caldav
url: https://dav.example.com/
username: alice
password_command: [pass, show, dav/work]
fastmail:
kind: jmap
url: https://api.fastmail.com/jmap/session
username: alice@example.com
password_keyring: fastmail
everything:
contains: [work, fastmail]
from calendaring_config import load
for conn in load(section="everything"):
print(conn.name, conn.kind, conn.params["url"])
load() finds the file, expands the section, resolves inherits,
${VAR} references and secrets, applies the environment, and returns one
Connection per backend: its section name, its kind (or None, when the
reader should decide from the URL), and the keyword arguments for the
backend's connect(). Old-style caldav files (caldav_url, …) are read
unchanged. load(environment=False) reads no CALDAV_*, JMAP_* or
CALENDARING_* variable. load(kinds=("caldav",)) returns only CalDAV
sections and those without a kind, and lets only CALDAV_URL replace
the file. A reader that walks the file itself turns one section into a
Connection with section_connection(), after merging what it
inherits with merged_section() (kept for caldav's config_section();
it may be deprecated once plann no longer uses that function,
https://github.com/PyCalendar/plann/issues/84). find_config_file()
finds the file; search_path() lists where it looks, the
first entry being where a new file belongs. Errors are ConfigError, a
ValueError.
The format is specified in docs/format.md.
It is in early development and has no release yet. The design notes are in calendaring's CONFIGURATION_PROPOSAL.md.