This would be quite straightforward with the [icalendar](https://pypi.org/project/icalendar/) module.