Metadata-Version: 2.5
Name: icalendar_light
Version: 1.1.0
Summary: Light and easy iCalendar event reader
Project-URL: Homepage, https://github.com/idlesign/icalendar_light
Author-email: Igor Starikov <idlesign@yandex.ru>
License-Expression: BSD-3-Clause
License-File: LICENSE
Keywords: calendar,icalendar,ics
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.10
Requires-Dist: python-dateutil
Provides-Extra: cli
Requires-Dist: click; extra == 'cli'
Description-Content-Type: text/markdown

# icalendar_light

<https://github.com/idlesign/icalendar_light>

[![release](https://img.shields.io/pypi/v/icalendar_light.svg)](https://pypi.python.org/pypi/icalendar_light)
[![lic](https://img.shields.io/pypi/l/icalendar_light.svg)](https://pypi.python.org/pypi/icalendar_light)
[![coverage](https://img.shields.io/coveralls/idlesign/icalendar_light/master.svg)](https://coveralls.io/r/idlesign/icalendar_light)

## Description

*Light and easy iCalendar event reader*

No fancy stuff, just iCalendar (`.ics`) events reading.

* Uses `namedtuple` for event representation;
* Features iterative event reading to be fast and minimize memory usage.

## API

```python
from icalendar_light.toolbox import Calendar

for event in Calendar.iter_events_from_file('my_calendar.ics'):
    print(Calendar.event_stringify(event))

# Or get events upcoming in next 5 days from iCalendar represented as lines:
lines = []  # Let's imagine this one is not empty %)
events = Calendar.iter_events_upcoming(lines, days_forward=5)
```

## CLI

Requires `click` package (can be installed with: `pip install icalendar_light[cli]`).

```shell
# Show upcoming event for next 90 days
$ icalendar_light upcoming my_calendar.ics --days 90
```
