The client
When you are looking to integrate iCal-library with your project, the client
is the first place to look.
If you have a service that periodically restarts, you might want to take a look at the CacheClient
.
client
parse_icalendar_file(file)
Parse an iCalendar file and return a parsed VCalendar instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file |
Union[str, Path]
|
A file on the local filesystem that contains the icalendar definition. |
required |
Returns:
Type | Description |
---|---|
VCalendar
|
a VCalendar instance with all it's iCalendar components like VEvents, VToDos, VTimeZones etc. |
Source code in ical_library/client.py
27 28 29 30 31 32 33 34 |
|
parse_icalendar_url(url, **kwargs)
Given a URL to an iCalendar file, return a parsed VCalendar instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url |
str
|
The URL to the iCalendar file. |
required |
kwargs |
Any
|
Any keyword arguments to pass onto the |
{}
|
Returns:
Type | Description |
---|---|
VCalendar
|
a VCalendar instance with all it's iCalendar components like VEvents, VToDos, VTimeZones etc. |
Source code in ical_library/client.py
37 38 39 40 41 42 43 44 45 46 |
|
parse_lines_into_calendar(raw_text)
Given the lines of an iCalendar file, return a parsed VCalendar instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
raw_text |
str
|
The raw text of the iCalendar file/website. |
required |
Returns:
Type | Description |
---|---|
VCalendar
|
a VCalendar with all it's iCalendar components like VEvents, VToDos, VTimeZones etc. |
Source code in ical_library/client.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
|