Internet Calendaring and Scheduling (iCalendar) for Python
Go to file
Nicco Kunzmann 9e3b686b72
Merge pull request #616 from natashamm/issue_350
Issue 350
2024-05-20 20:24:40 +02:00
.github Merge branch 'master' into niccokunzmann-patch-3 2024-04-16 12:55:02 +02:00
docs fix typo in credits 2024-05-19 23:25:23 -07:00
src/icalendar ignore X-COMMENT at the end of a calendar file while parsing 2024-05-19 23:24:59 -07:00
.gitignore Add scripts and tests to reproduce fuzzer errors in pytest 2023-11-21 14:53:47 +00:00
.readthedocs.yml Update readthedocs config 2023-08-30 08:40:09 +01:00
CHANGES.rst add to changelog 2024-05-19 23:31:15 -07:00
CONTRIBUTING.rst update links (#378) 2022-08-17 00:31:15 +03:00
LICENSE.rst Clean up trailing and leading white space throughout project (#247) 2017-10-23 14:15:27 +02:00 Added ics exclude to 2023-11-06 20:22:42 -05:00
README.rst Add documentation about parsing 2023-08-30 17:33:21 +01:00 update links (#378) 2022-08-17 00:31:15 +03:00
buildout.cfg Whitespaces cleanup 2014-08-26 00:55:26 +02:00
requirements_docs.txt Revert "fix Sphinx build" 2022-09-26 17:34:52 +01:00
setup.cfg Do not create a universal wheel for the release. 2022-10-19 09:29:58 +02:00 Use proper SPDX identifier 2024-01-24 16:41:11 +01:00
tox.ini Analyse code coverage in tests 2024-03-18 17:41:02 +00:00


Internet Calendaring and Scheduling (iCalendar) for Python

The `icalendar`_ package is a `RFC 5545`_ compatible parser/generator for iCalendar


:Mailing list:
:Dependencies: `python-dateutil`_ and `pytz`_.
:Compatible with: Python 2.7 and 3.4+
:License: `BSD`_


.. image::
   :alt: Python Package Version on PyPI

.. image::
   :alt: Downloads from PyPI

.. image::
    :alt: GitHub Actions build status for master

.. image::
    :alt: GitHub Actions build status for 4.x

.. image::
    :alt: Documentation Status

.. _`icalendar`:
.. _`RFC 5545`:
.. _`python-dateutil`:
.. _`pytz`:
.. _`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(
  >>> 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`` and ``3.4+``, ``PyPy2`` and ``PyPy3``.
- `Branch master <>`__ with the compatibility to Python versions ``3.7+`` and ``PyPy3``.

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.

Related projects

* `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 ``ICalendar`` object for events happening at a certain date or within a certain time.
* `x-wr-timezone <>`_. Library to make ``ICalendar`` objects and files using the non-standard ``X-WR-TIMEZONE`` compliant with the standard (RFC 5545).