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
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
pical-0.3.tar.gz
(17.2 kB
view details)
File details
Details for the file pical-0.3.tar.gz.
File metadata
- Download URL: pical-0.3.tar.gz
- Upload date:
- Size: 17.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
063b944d2928a182e1758aaa1144a408b30a8dcafe57f886bdc7d6c1bdbe325b
|
|
| MD5 |
82bd890649e8d9ea31f5dd82d046ee35
|
|
| BLAKE2b-256 |
2f1f57db632f9d5d6855db299a42956c49c4c350cb096052da88f1a06b0a380e
|