icalendar.cal.component_factory module#
A factory to create components.
- class icalendar.cal.component_factory.ComponentFactory(*args, **kwargs)[source]#
Bases:
CaselessDictRegistered components from RFC 7953 and RFC 5545.
To get a component, use this class as shown below.
>>> from icalendar import ComponentFactory >>> factory = ComponentFactory() >>> event_class = factory.get_component_class('VEVENT') >>> event_class() VEVENT({})
If a component class is not yet supported, it can be either created using
get_component_class()or added manually as a subclass ofComponent.