Jorricks / iCal-library

ICalLibrary - Fast, yet simple, iCalendar reader with excellent recurrence support in Python
https://jorricks.github.io/iCal-library/
MIT License
12 stars 0 forks source link
calendar client events ical ical-parser icalendar icalendar-parsing icalendar-rfc mkdocs-material pendulum python python-dateutil python-types recurring recurring-events rfc rfc5545

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

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

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:

Ideas for additional features