This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

icalendar parser,builder library with query function

Project Description

pical is a python icalendar library.

Supported features:

  • parsing, building an ics file (icalendar version 2.0/rfc5545,rfc2445)
  • querying for component with time-range (caldav/rfc4791)
  • values will be accessible as python native types

Unsupported features:

  • leap second support
  • floating values with precision higher than double

Simple usage:

from datetime import datetime
import pical
cals = pical.parse(open("tests/google_calendar_ex1.ics"))
cal = cals[0]
# subcomponents are stored in children
for c in cal.children:
       if c.name == "VEVENT":
               print c["DTSTART"]

Time-range query example:

from datetime import datetime
import pical
cals = pical.parse(open("tests/google_calendar_ex1.ics"))
expcal = cals[0].time_range(expand=[datetime(2010,1,1,tzinfo=pical.utc), datetime.now(pical.utc)])
for line in expcal.clone(in_utc=True).serialize():
       print line
Release History

Release History

This version
History Node

0.3

History Node

0.2

History Node

0.1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pical-0.3.tar.gz (17.2 kB) Copy SHA256 Checksum SHA256 Source Apr 24, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting