iCalendar package for Python #ICalendar parser #ICalendar generator #Calendar #Parser #Generator #Python
iCalendar is a generator/parser of iCalendar files for use with Python. It follows the RFC 2445 (iCalendar) specification.
To open and parse a file:
>>> from icalendar import Calendar, Event >>> cal = Calendar.from_string(open('test.ics','rb').read()) >>> cal VCALENDAR({'VERSION': vText(u'2.0'), 'METHOD': vText(u'Request'), 'PRODID': vText(u'-//My product//mxm.dk/')})
>>> for component in cal.walk(): ... component.name 'VCALENDAR' 'VEVENT' 'VEVENT'
To create a calendar and write it to disk:
>>> cal = Calendar() >>> from datetime import datetime >>> from icalendar import UTC # timezone >>> cal.add('prodid', '-//My calendar product//mxm.dk//') >>> cal.add('version', '2.0')
>>> event = Event() >>> event.add('summary', 'Python meeting about calendaring') >>> event.add('dtstart', datetime(2005,4,4,8,0,0,tzinfo=UTC)) >>> event.add('dtend', datetime(2005,4,4,10,0,0,tzinfo=UTC)) >>> event.add('dtstamp', datetime(2005,4,4,0,10,0,tzinfo=UTC)) >>> event['uid'] = '20050115T101010/[email protected]' >>> event.add('priority', 5)
>>> cal.add_component(event)
>>> f = open('example.ics', 'wb') >>> f.write(cal.as_string()) >>> f.close()
System requirements
What's new in iCalendar 3.0.1 Beta 1:
- Update Release information. [thet]
iCalendar 3.0.1 Beta 1
add to watchlist add to download basket send us an update REPORT- runs on:
- Linux
- filename:
- icalendar-3.0.1b1.tar.gz
- main category:
- Utilities
- developer:
- visit homepage
7-Zip 23.01 / 24.04 Beta
Windows Sandbox Launcher 1.0.0
calibre 7.10.0
Bitdefender Antivirus Free 27.0.35.146
IrfanView 4.67
Context Menu Manager 3.3.3.1
ShareX 16.0.1
Microsoft Teams 24060.3102.2733.5911 Home / 1.7.00.10152 Work
4k Video Downloader 1.5.3.0080 Plus / 4.30.0.5655
Zoom Client 6.0.4.38135
- Microsoft Teams
- 4k Video Downloader
- Zoom Client
- 7-Zip
- Windows Sandbox Launcher
- calibre
- Bitdefender Antivirus Free
- IrfanView
- Context Menu Manager
- ShareX