Skip to main content

calendaring

One Python API for calendars and task lists: CalDAV, JMAP, iCalendar feeds, local files and issue trackers.

Purpose: today, a program that works with calendar data has to pick a library for each place the data lives: caldav for a CalDAV server, calendaring-jmap for a JMAP server, icalendar and file handling for .ics files on disk. This library gives one way to read and change that data, wherever it lives. An application written against it can be pointed at a CalDAV server, a local .ics file or an issue tracker by changing its configuration, not its code. Keeping two of those systems in step is a different job, done by calendaring-sync. The design is in docs/design/API_DESIGN.md.

The library is called calendaring: the same name on GitHub, on PyPI and as the import (see the 0.3 decisions). It was earlier called calendaring-client. "Calendaring" is the IETF's word, and in RFC 5545 it covers tasks too, but few people know that, so the tagline above carries the message that this library supports tasks and not only events.

Status

Pre-alpha. 0.1.0 is the first release. It has the unified API in both sync and async mode, a CalDAV backend (over the caldav library), a files backend (vdir directories and single .ics files), an in-memory reference backend, a configuration file shared with caldav, time tracking on top of ordinary calendar events, and a conformance suite every backend is tested against (calendaring.testing). The API may still change before 1.0. Which of caldav's test servers the CalDAV backend has been run against, and with what result, is in docs/caldav-servers.md.

The plan and its status are in docs/design/ROADMAP.md.

Installation and usage

Python 3.11 or newer.

pip install calendaring            # files and in-memory backends
pip install 'calendaring[caldav]'  # and the CalDAV backend

Backend.open() takes an existing directory, a file: URL or an https:// CalDAV URL (with username= and password=); Workspace.from_config() opens every section of the configuration file instead.

import tempfile

from calendaring import Backend, Component, Workspace

# A directory of its own: pointed at ~/.calendars, this would add to your real calendars.
with Workspace([Backend.open(tempfile.mkdtemp())]) as workspace:
    tasks = workspace.backends[0].create_collection("Tasks", components={Component.TASK})
    task = tasks.add_task(summary="Update the README", priority=1)
    task.complete()
    for item in workspace.search(todo=True, include_completed=True).items:
        print(item.component["SUMMARY"], item.component["STATUS"])

AsyncWorkspace, AsyncBackend and so on are the async equivalents.

Background

I've been the maintainer of the Python CalDAV client package for many years now. The ironic thing is that I started using the library because I "didn't want to get my hands dirty". I had to do some fixes for the library to work towards my server, and soon enough the owner of the project passed me the maintainer hat. To be honest, I think neither the CalDAV protocol nor the iCalendar format is a particularly good standard. They are sort of the only open standards we have, so it's important to support them, but it's also important to support new and emerging standards.

There are no good standards for tasks. Apart from iCalendar, which supports task lists but not very well, there are only vendor formats. For instance, iCalendar has no way to record a time estimate or the time spent on a task. The estimate is about to be fixed (ESTIMATED-DURATION in the task extensions draft, now in the RFC Editor queue), but time spent is still a gap. See the task model survey.

Mission statement

This is intended to be a general Python API for accessing task and calendaring information, regardless of where it's stored and how to access the backend. Version 0.1.0 is not much more than a wrapper for the caldav library and local files - but it provides a clean, general and well-documented interface, and a clean, general and well-documented configuration file. iCalendar feeds, JMAP and a first issue tracker come later (see the roadmap).

I've considered supporting other standards than CalDAV in the caldav library, but it's outside the scope for that library - hence the need for another package.

Personal motivation

  • I feel that the combination of a lack of a good task list and "too many TODO-lists" has been a consistent pain for most of my life.
  • I would like to have all relevant tasks and calendar events open in front of me when planning my days, weeks and months regardless of where the tasks are stored.
  • I'd like to throw standardized attributes on my tasks and issues (like time spent, time estimate, priority, due-time) regardless of where they exist (this may involve synchronizing information from external systems with my own calendar/task store). I do hope that this library can help me achieve this.
  • I have the plann utility, a CLI and library for more advanced calendaring and task management. It offers things that are out of the scope of both CalDAV and this library, including "panic planning" where it tries to fit the tasks with the highest priority into the available time before the deadlines. It uses the caldav library, but I'd like to use it towards other systems as well. plann will be the first real user of this library.

Backends

Funded (see Funding and the roadmap):

  • CalDAV, through the caldav library. It's (IMO) not a very good standard, but it is sort of the only standard for distributing and updating calendaring information.
  • iCalendar feeds (read-only, https:// and webcal://). It has become quite normal to offer users access to calendar data through iCalendar links. It's much simpler than CalDAV, but offers fewer features. Several years ago I got requests for feed support in the caldav library, and rejected it for being outside its scope. With icalendar-searcher, split out of the caldav library, search behaves the same towards a CalDAV server and an iCalendar feed.
  • Local iCalendar files (.ics files and vdir directories), read and write. The API works the same regardless of whether it is used towards a remote calendar server or towards local files.
  • JMAP, through calendaring-jmap.
  • One issue tracker: Gitea, chosen by the task model survey, which also covers Vikunja, GitLab, Kanboard, Taskwarrior, Emacs org-mode, OpenProject, Request Tracker, EteSync and plain-text task files.

Wanted, but outside the funded scope:

  • Sending iCalendar data as email attachments (iTIP), and perhaps accessing mailboxes through IMAP and/or JMAP. Many mail systems come bundled with calendar systems and interoperate with other systems this way.
  • Mobilizon, bidirectionally. It's a federated server designed for spreading calendar event information, and it's quite high on my list.
  • GitHub issues, the first tracker after Gitea. It is proprietary, but it is where this project and its siblings keep their own issues.
  • More task trackers, org-mode and Markdown task files.
  • Proprietary systems offering calendaring and/or task management without supporting standards very well. I'm not keen on working with those systems, but I'd happily accept pull requests for supporting any of them.

Standards

  • iCalendar - RFC 5545, with RFC 7986 (new properties) and RFC 9253 (relationships)
  • The iCalendar task extensions draft (ESTIMATED-DURATION)
  • CalDAV - RFC 4791, through caldav
  • JMAP - RFC 8620 and JMAP Calendars, through calendaring-jmap
  • vdir, for local file storage

The full list, with the status of each standard and what is left out, is in PRIOR_ART_AND_DECISIONS.md, Part 2.

Prior art and users

PRIOR_ART_AND_DECISIONS.md, Part 1 looks at icalcli, vdirsyncer/khal/todoman, ical, Home Assistant and calendaring-jmap. None of them is a multi-backend library with first-class task support; icalcli, for example, is a CLI with no task support at all.

Over the last years many CalDAV issues have come in through users of Home Assistant. Home Assistant has its own multi-backend calendar and to-do abstraction, one layer above this library, and its CalDAV integration could be built on this library. More generally, I think that any project that either reads iCalendar feeds or uses the CalDAV client library could have use for such a "swiss army knife".

Documentation

Funding

NLnet foundation logo    NGI Zero Core Logo

This project is funded through the NGI Zero Core fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet programme, under the aegis of DG Communications Networks, Content and Technology.

Licence

calendaring is dual-licensed: GPL-3.0-or-later (COPYING.GPL) or Apache-2.0 (COPYING.APACHE), at your choice.

The JMAP backend will depend on calendaring-jmap, which is AGPL-3.0-or-later. It is an optional extra (calendaring[jmap]). A program that includes it must, as a whole, be conveyed under AGPL-3.0 terms; calendaring's own code remains available under either licence.

Future hard dependencies may be AGPL-licensed too (edit-icalendar is a likely one), which would make every installation contain AGPL code. The licence of this library may be changed to AGPL-3.0-or-later if that happens; see D3.

Metadata

Release files for calendaring 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for calendaring 0.1.0
File Size Uploaded Provenance Actions
calendaring-0.1.0.tar.gz 332.5 kB With provenance Details for calendaring-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for calendaring 0.1.0
File Interpreter ABI Platform Actions
calendaring-0.1.0-py3-none-any.whl Python 3 none any Details for calendaring-0.1.0-py3-none-any.whl

Total release size: 495.1 kB

Release files / calendaring-0.1.0.tar.gz

Download URL calendaring-0.1.0.tar.gz
Size 332.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7832643af5b38cd6b13edbf2d22497ab4ba942306f46078d15699d3430d93e50
BLAKE2b-256 checksum
How to use checksums
dc7b775a0ee49b523e87c7883113e20c832b19e9c368f633f46d4f3d2b48194c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Release files / calendaring-0.1.0-py3-none-any.whl

Download URL calendaring-0.1.0-py3-none-any.whl
Size 162.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
07b2586f753fe00aea5bd2f19baf8d42face26253950f21dd976af9efbf0135f
BLAKE2b-256 checksum
How to use checksums
12a364df3c902ed2cb06fea7dcdbed94916f63ac12ba11c3541645e6fb0c3caf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Security for calendaring 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for calendaring-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page