icalendar.config module#
Runtime configuration for icalendar.
- icalendar.config.MAX_ALARM_REPEAT: int = 10000#
Cap on additional triggers expanded from a
VALARMREPEATproperty.RFC 5545 Section 3.8.6.2 defines
REPEATas anINTEGERdata type, which is defined in RFC 5545 Section 3.3.8 as an integer between -2147483648 and 2147483647. A value forREPEATthat is greater than approximately10_000can exhaust memory or CPU. The default value of10_000is a practical setting, but may be adjusted to specific use cases. Set to-1to disable the cap, which should be done only for fully trusted input.Added in version 7.2.1.
- icalendar.config.parse_xml(source)[source]#
Parse xml from source.
This wraps
xml.etree.ElementTree.parse(). It makes the XML parser configurable.If you would like to use another XML parser, you can replace this function.
See also
- Parameters:
source – A file-like object to with a
readmethod.- Return type:
ElementTree[Element[str]]
- Returns:
The parsed XML tree.
- Raises:
TypeError – If the wrong type is passed to
source.