Skip to main content

iCal-library

Fast, yet simple, iCalendar reader with excellent recurrence support. RFC 5545 compliant.

Coverage Package version Supported Python versions


Documentation: https://jorricks.github.io/iCal-library/

Source Code: https://github.com/Jorricks/iCal-library

Features

  • 🚀 Easy python interface. It's as simple as 'client.load_ics_file("<my_file>").timeline' to show all your events of that week.
  • 📈 Timeline support. Show exactly what is planned for a specific week.
  • ✨ Fully functional support for recurring iCal components. E.g. Any recurring event will show up as intended within the timeline interface. This includes:
    1. Recurring components/events based on RRule.
    2. Recurring components/events based on RDate.
    3. Excluding components/events based on EXDate.
    4. Any combination of the above three.
    5. Redefined/changed components/events correctly show the latest version.
  • ⏩ Very fast parsing due to lazy evaluation of iCal properties.
  • ⁉️ Debugger supported. Any issues? Open up a debugger and inspect all values.
  • 🔅 Minimal dependencies. Only python-dateutil and pendulum.
  • 🆎 Fully typed code base.

Requirements

Python 3.8+

iCal-library uses two major libraries for their date and time utilities:

Installation

To use iCal-library, first install it using pip:

pip install iCal-library

Example

A simple example. Please look in the docs for more examples.

from ical_library import client

calendar = client.parse_icalendar_file("/home/user/my_icalendar.ics")
print(calendar.events)
print(calendar.todos)
print(calendar.journals)
print(calendar.free_busy_list)
print(calendar.time_zones)

Note: iCal-library is fully Debugger compliant, meaning it is very easy to use a debugger with this project. It will be much faster to see all the different attributes and functions from inside a Python debugger. If you are unsure whether your IDE supports it, take a look here under the sections 'IDEs with Debug Capabilities'.

Limitations

  • Currently, it is not supported to write ICS files. If this is a deal-breaker for you, it should be relatively straight forward to add it, so please consider submitting a PR for this :). However, this will be added shortly!

Why yet another iCalendar library?

I first tried several libraries for iCalendar events. However, none of them supported recurring events as well as they should be. For some libraries my calendar loaded but then didn't show my recurring events, while others simply threw stacktraces trying to load it. Furthermore, I noticed that my calendar (with over 2000 events) took ages to load. After traversing the code of the other libraries I decided I wanted to build my own. With some key principles:

  • Recurring components should be the main priority to get working.
  • No strict evaluation that could lead to errors while parsing the file.
  • Lazy evaluation for iCalendar properties to speed up the process.

Ideas for additional features

  • Support quoted property parameters containing special characters.
  • Support the new Properties for iCalendar (RFC 7986).
  • Support CalDev (RFC 4791).

Release files for ical-library 0.2.3

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

Source distribution (sdist)

Source distribution for ical-library 0.2.3
File Size Uploaded Provenance Actions
ical_library-0.2.3.tar.gz 102.5 kB Without provenance Details for ical_library-0.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ical-library 0.2.3
File Interpreter ABI Platform Actions
ical_library-0.2.3-py3-none-any.whl Python 3 none any Details for ical_library-0.2.3-py3-none-any.whl

Total release size: 163.2 kB

Release files / ical_library-0.2.3.tar.gz

Download URL ical_library-0.2.3.tar.gz
Size 102.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e76d81368f7f40dc04e2055caea3c658f7ee18a60627302f2f43c12a0dcdcc4d
BLAKE2b-256 checksum
How to use checksums
b54b66b8dad720297c8c54de6280e270f4d1b66d16dccdba45437260a07e77a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.31.0

Release files / ical_library-0.2.3-py3-none-any.whl

Download URL ical_library-0.2.3-py3-none-any.whl
Size 60.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3edd64a91cfb338b1981318a2d82a9d48d11f2154e57af868d1d955ebe2dd59e
BLAKE2b-256 checksum
How to use checksums
40d14448e320643b2da2210afeba9d254c9db915d0132413ab57b9f5a42521cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.31.0

Security for ical-library 0.2.3

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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