Skip to main content

Light and easy iCalendar event reader

Project description

https://github.com/idlesign/icalendar_light

release lic ci coverage

Description

Light and easy iCalendar event reader

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

  • Requires Python 3.6+;
  • Uses namedtuple for event representation;
  • Features iterative event reading to be fast and minimize memory usage.

API

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]).

; Show upcoming event for next 90 days
$ icalendar_light upcoming my_calendar.ics --days 90

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for icalendar_light, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size icalendar_light-0.2.0-py2.py3-none-any.whl (7.1 kB) File type Wheel Python version 2.7 Upload date Hashes View
Filename, size icalendar_light-0.2.0.tar.gz (10.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page