Metadata-Version: 2.1
Name: ical-library
Version: 0.2.2
Summary: Fast, yet simple, iCalendar reader with excellent recurrence support.
Author-email: Jorrick Sleijster <jorricks3@gmail.com>
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Topic :: Communications
Classifier: Topic :: Communications :: Conferencing
Classifier: Topic :: Office/Business
Classifier: Topic :: Office/Business :: Office Suites
Classifier: Topic :: Internet
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Typing :: Typed
Classifier: License :: OSI Approved :: MIT License
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: pendulum>=2.0.0
Requires-Dist: python-dateutil>=2.8.0
Requires-Dist: pre-commit >=2.19.0,<3.0.0 ; extra == "dev"
Requires-Dist: mkdocs >=1.3.0,<2.0.0 ; extra == "doc"
Requires-Dist: mkdocs-material >=8.3.9,<9.0.0 ; extra == "doc"
Requires-Dist: mkdocstrings[python] >=0.19.0,<1.0.0 ; extra == "doc"
Requires-Dist: termynal >=0.2.0,<1.0.0 ; extra == "doc"
Requires-Dist: pytest >=6.2.4,<7.0.0 ; extra == "test"
Requires-Dist: pytest-cov >=2.12.0,<4.0.0 ; extra == "test"
Requires-Dist: flake8 >=4.0.0,<5.0.0 ; extra == "test"
Requires-Dist: black >= 22.6.0,<23.0.0 ; extra == "test"
Requires-Dist: isort >=5.10.1,<6.0.0 ; extra == "test"
Requires-Dist: mypy ==0.910 ; extra == "test"
Requires-Dist: pytype >=2022.6.30 ; extra == "test"
Project-URL: Documentation, https://jorricks.github.io/iCal-library
Project-URL: Home, https://jorricks.github.io/iCal-library
Project-URL: Issues, https://github.com/Jorricks/iCal-library/issues
Project-URL: PullRequests, https://github.com/Jorricks/iCal-library/pulls
Project-URL: Source, https://github.com/Jorricks/iCal-library
Provides-Extra: dev
Provides-Extra: doc
Provides-Extra: test

<p align="center">
  <a href="https://jorricks.github.io/iCal-library"><img src="https://github.com/Jorricks/iCal-library/raw/main/docs/ical-library.png" alt="iCal-library" width="600px"></a>
</p>
<p align="center">
    <em>Fast, yet simple, iCalendar reader with excellent recurrence support. <a href="https://www.ietf.org/rfc/rfc5545.txt">RFC 5545</a> compliant.</em>
</p>
<p align="center">
<a href="https://codecov.io/gh/Jorricks/iCal-library" target="_blank">
    <img src="https://img.shields.io/codecov/c/github/Jorricks/iCal-library/main" alt="Coverage">
</a>
<a href="https://pypi.org/project/iCal-library" target="_blank">
    <img src="https://img.shields.io/pypi/v/iCal-library?color=%2334D058&label=pypi%20package" alt="Package version">
</a>
<a href="https://pypi.org/project/iCal-library" target="_blank">
    <img src="https://img.shields.io/pypi/pyversions/iCal-library.svg?color=%2334D058" alt="Supported Python versions">
</a>
</p>


---

**Documentation**: [https://jorricks.github.io/iCal-library/](https://jorricks.github.io/iCal-library/)

**Source Code**: [https://github.com/Jorricks/iCal-library](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:
- [Pendulum](https://github.com/sdispater/pendulum) for its extensions on datetime objects and parsing of durations.
- [Python-Dateutil](https://github.com/dateutil/dateutil) for its RRule support.


## Installation

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

    pip install iCal-library


## Example
A simple example. Please look [in the docs](https://jorricks.github.io/iCal-library/) for more examples.

```python3
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](https://wiki.python.org/moin/PythonDebuggingTools) 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).


