Skip to content

Add memory usage example for large file upload #154

Description

@stevepiercy

If you want to keep a chunking example in the docs, the Python snippet below works and is short enough to drop inline:

from icalendar import Calendar
from icalendar_anonymizer import anonymize

cal = Calendar.from_ical(open("calendar.ics").read())
year_cal = Calendar()
for event in cal.walk("VEVENT"):
    if event["DTSTART"].dt.year == 2024:
        year_cal.add_component(event)
print(anonymize(year_cal).to_ical().decode())

But probably better to keep it in python-api.rst as a worked example and link from here.

Originally posted by @SashankBhamidi in #147

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions