Internet Calendaring and Scheduling (iCalendar) for Python
|Dependencies:||python-dateutil and pytz.|
|Compatible with:||Python 2.7 and 3.4+|
To install the package, run:
pip install icalendar
You can open an
.ics file and see all the events:
>>> import icalendar >>> path_to_ics_file = "src/icalendar/tests/calendars/example.ics" >>> with open(path_to_ics_file) as f: ... calendar = icalendar.Calendar.from_ical(f.read()) >>> for event in calendar.walk('VEVENT'): ... print(event.get("SUMMARY")) New Year's Day Orthodox Christmas International Women's Day
Using this package, you can also create calendars from scratch or edit existing ones.
Versions and Compatibility
icalendar is a critical project used by many. It has been there for a long time and maintaining
long-term compatibility with projects conflicts partially with providing and using the features that
the latest Python versions bring.
Since we pour more effort into maintaining and developing icalendar, we split the project into two:
Branch 4.x with maximum compatibility to Python versions
Branch master with the compatibility to Python versions
We expect the
master branch with versions
5+ receive the latest updates and features,
4.x branch the subset of security and bug fixes only.
We recommend migrating to later Python versions and also providing feedback if you depend on the
- icalevents. It is built on top of icalendar and allows you to query iCal files and get the events happening on specific dates. It manages recurrent events as well.
recurring-ical-events. Library to query an
ICalendarobject for events happening at a certain date or within a certain time.
x-wr-timezone. Library to make
ICalendarobjects and files using the non-standard
X-WR-TIMEZONEcompliant with the standard (RFC 5545).