{"id":6377,"library":"ics","title":"ics: iCalendar (RFC 5545) Parser","description":"ics is a Python library for parsing, creating, and manipulating iCalendar files (RFC 5545). It provides an object-oriented API to work with Calendars, Events, Todos, Alarms, and other iCalendar components. The current version is 0.7.2, and releases occur periodically for bug fixes, minor enhancements, and major version upgrades that introduce breaking changes.","status":"active","version":"0.7.2","language":"en","source_language":"en","source_url":"https://github.com/C4ptainCrunch/ics.py","tags":["icalendar","calendar","parser","rfc5545","events","scheduling"],"install":[{"cmd":"pip install ics","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Used for attribute handling in components. Required >=19.1.0 since v0.7.2.","package":"attrs","optional":false},{"reason":"Provides the PEG parser for iCalendar files. Required since v0.6.","package":"TatSu","optional":false},{"reason":"Used for date and time handling. Heavily integrated but no strict upper bound since v0.7.1.","package":"arrow","optional":false}],"imports":[{"symbol":"Calendar","correct":"from ics import Calendar"},{"symbol":"Event","correct":"from ics import Event"},{"symbol":"Alarm","correct":"from ics import Alarm"},{"symbol":"Attendee","correct":"from ics import Attendee"},{"symbol":"Organizer","correct":"from ics import Organizer"}],"quickstart":{"code":"from ics import Calendar, Event\nfrom datetime import datetime\n\n# Create a new Calendar\nc = Calendar()\n\n# Create a new Event\ne = Event()\ne.name = \"My cool event\"\ne.begin = datetime(2024, 1, 1, 10, 0, 0)\ne.duration = {'hours': 1}\ne.description = \"This is a description for my event.\"\n\n# Add the event to the calendar\nc.events.add(e)\n\n# Add another event\ne2 = Event(name=\"Another event\", begin='2024-01-02 14:30:00')\nc.events.add(e2)\n\n# Print the iCalendar string\nprint(str(c))\n\n# To save to a file (example):\n# with open('my_calendar.ics', 'w') as f:\n#     f.writelines(c)\n","lang":"python","description":"This quickstart demonstrates how to create a new iCalendar object, add events with basic properties like name, start time, and duration, and then output the calendar as an iCalendar string. You can also save it to a .ics file."},"warnings":[{"fix":"Upgrade to Python 3.5+ if you are on an older Python 2.x environment.","message":"Python 2 support was completely dropped in version 0.5. The library now only supports Python 3.5 and above.","severity":"breaking","affected_versions":"<0.5"},{"fix":"Ensure your environment is Python 3.6+ and install `ics` which will pull `TatSu`. Update code from `._unused` to `.extra`.","message":"Version 0.6 dropped support for Python 3.5 and introduced `TatSu` as a new dependency for parsing. Additionally, the previously private `._unused` attribute was renamed to the public `.extra`.","severity":"breaking","affected_versions":"<0.6"},{"fix":"Instead of `e.organizer = 'mailto:test@example.com'`, use `from ics import Organizer; e.organizer = Organizer(email='test@example.com')`.","message":"In version 0.7, `Attendee` and `Organizer` attributes can no longer be set directly to a string. They must be instances of their respective classes.","severity":"breaking","affected_versions":"<0.7"},{"fix":"Review the upcoming 0.8 release notes for changes to these methods. Consider preparing for potential adaptation of how calendars are serialized or iterated.","message":"The `Calendar.str()` method and `Calendar.iter()` will undergo breaking changes in version 0.8. Warnings are emitted in 0.7.1 and later.","severity":"deprecated","affected_versions":">=0.7.1"},{"fix":"Ensure `attrs` is up-to-date in your environment, ideally `pip install 'attrs>=19.1.0'` before installing `ics` or allow `pip install ics` to handle the dependency update.","message":"Version 0.7.1 introduced a dependency on `attrs`. Version 0.7.2 further specified a lower bound of `attrs>=19.1.0`. Users upgrading from older `ics` versions might encounter issues if their `attrs` dependency is too old.","severity":"gotcha","affected_versions":">=0.7.1"}],"env_vars":null,"last_verified":"2026-04-15T00:00:00.000Z","next_check":"2026-07-14T00:00:00.000Z"}