Internet Calendaring and Scheduling (iCalendar) for Python¶
The icalendar package is a RFC 5545 compatible parser/generator for iCalendar files.
Homepage: | https://icalendar.readthedocs.io |
---|---|
Code: | https://github.com/collective/icalendar |
Mailing list: | https://github.com/collective/icalendar/issues |
Dependencies: | python-dateutil and pytz. |
Compatible with: | |
Python 2.7 and 3.4+ | |
License: | BSD |
Quick Guide¶
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
2.7
and3.4+
,PyPy2
andPyPy3
. - Branch master with the compatibility to Python versions
3.7+
andPyPy3
.
We expect the master
branch with versions 5+
receive the latest updates and features,
and the 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 4.x
features.
Contents¶
- About
- Installing iCalendar
- iCalendar package
- More documentation
- API Reference
- iCalendar utility
- icalendar contributors
- Maintenance
- License
- Changelog
- 5.0.9 (unreleased)
- 5.0.8 (2023-09-18)
- 5.0.7 (2023-05-29)
- 5.0.6 (2023-05-26)
- 5.0.5 (2023-04-13)
- 5.0.4 (2022-12-29)
- 5.0.3 (2022-11-23)
- 5.0.2 (2022-11-03)
- 5.0.1 (2022-10-22)
- 5.0.0 (2022-10-17)
- 5.0.0a1 (2022-07-11)
- 4.1.0 (2022-07-11)
- 4.0.9 (2021-10-16)
- 4.0.8 (2021-10-07)
- 4.0.7 (2020-09-07)
- 4.0.6 (2020-05-06)
- 4.0.5 (2020-03-21)
- 4.0.4 (2019-11-25)
- 4.0.3 (2018-10-10)
- 4.0.2 (2018-06-20)
- 4.0.1 (2018-02-11)
- 4.0.0 (2017-11-08)
- 3.12 (2017-11-07)
- 3.11.7 (2017-08-27)
- 3.11.6 (2017-08-04)
- 3.11.5 (2017-07-03)
- 3.11.4 (2017-05-10)
- 3.11.3 (2017-02-15)
- 3.11.2 (2017-01-12)
- 3.11.1 (2016-12-19)
- 3.11 (2016-11-18)
- 3.10 (2016-05-26)
- 3.9.2 (2016-02-05)
- 3.9.1 (2015-09-08)
- 3.9.0 (2015-03-24)
- 3.8.4 (2014-11-01)
- 3.8.3 (2014-08-26)
- 3.8.2 (2014-07-22)
- 3.8.1 (2014-07-17)
- 3.8 (2014-07-17)
- 3.7 (2014-06-02)
- 3.6.2 (2014-04-05)
- 3.6.1 (2014-01-13)
- 3.6 (2014-01-06)
- 3.5 (2013-07-03)
- 3.4 (2013-04-24)
- 3.3 (2013-02-08)
- 3.2 (2012-11-27)
- 3.1 (2012-09-05)
- 3.0.1b2 (2012-03-01)
- 3.0.1b1 (2012-02-24)
- 3.0
- 2.2 (2011-08-24)
- 2.1 (2009-12-14)
- 2.0.1 (2008-07-11)
- 2.0 (2008-07-11)
- 1.2 (2006-11-25)
- 1.1 (2006-11-23)
- 1.0 (2006-08-03)
- 0.11 (2005-11-08)
- 0.10 (2005-04-28)