Replies: 2 comments
-
Decoding a value should be possible with At some point I guess it'd be nice to support jCalendar, and maybe also pass jCalendar from the raw |
Beta Was this translation helpful? Give feedback.
-
Using a dictionary is not appropriate seen that CALDAV events can contain multiple components (multiple "VEVENT" in recurrent events) and subcomponents ( "ATTENDEE') in one event. See page 9 in ) |
Beta Was this translation helpful? Give feedback.
-
Hi,
I am looking for a way to convert
icalendar
events to Pythondict
of the values (back and forth between Pythondict
andicalendar.Event
).For now, my solution is to:
However, this is far from perfect, especially since the resulting
dict
only has strings as values, and do not take benefit from the parsing abilities fromicalendar
. Typically, fields representing dates and times are converted to string instead of staying asdatetime
objects, which would be much more porwerful.Looking at the
ical.prop
files and the API documentation, I could not find a way to get the "decoded" (Python typed) value from a given prop, to use in theto_dict
function. I came accross #85 which is kind of similar, but strings are perfectly fine in this particular case.Is there a way to achieve something like this?
Thanks!
EDIT: Actually, due to #127, the above solution is not even really working.
What I came with which is more closely working is
Beta Was this translation helpful? Give feedback.
All reactions