Skip to main content

A module which unfolds ICalendar events.

Project description

Travis Build and Tests Status Python Package Version on Pypi Downloads from Pypi

ICal has some complexity to it: Events can be repeated, removed from the feed and edited later on. This tool takes care of these circumstances.

Let’s put our expertise together and build a tool that can solve this!

  • day light saving time (DONE)

  • recurring events (DONE)

  • recurring events with edits (DONE)

  • recurring events where events are omitted (DONE)

  • recurring events events where the edit took place later (DONE)

  • normal events (DONE)

  • recurrence of dates but not hours, minutes, and smaller (DONE)

  • endless recurrence (DONE)

  • ending recurrence (DONE)

  • events with start date and no end date (DONE)

  • events with start as date and start as datetime (DONE)

  • RRULE (DONE)

  • RDATE

  • EXRULE

  • EXDATE (DONE)

import requests
import icalendar
import datetime
import recurring_ical_events

today = datetime.datetime.today()
one_year_ahead = today.replace(year=today.year + 1)

ical_string = requests.get("https://url-to-ical-feed").text
calendar = icalendar.Calendar.from_ical(ical_string)
for event in recurring_ical_events.of(calendar).between(today, one_year_ahead):
    print(event["DTSTART"])

Installation

pip install python-recurring-ical-events

Development

  1. Optional: Install virtualenv and Python3 and create a virtual environment.
    virtualenv -p python3 ENV
    source ENV/bin/activate
  2. Install the packages.
    pip install -r requirements.txt test-requirements.txt
  3. Run the tests
    pytest

To release new versions, edit setup.py, the __version__ variable and run

python3 setup.py tag_and_deploy

Research

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

recurring_ical_events-0.1.1a0.tar.gz (14.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page