Registry / serialization / icalendar-searcher

icalendar-searcher

JSON →
library1.0.6pypypi✓ verified 82d ago

icalendar-searcher is a Python library designed for powerful searching, filtering, and sorting of iCalendar components using a SQL-like Domain Specific Language (DSL). It simplifies interaction with `.ics` data, offering functionalities like expanding recurring events and complex property queries. The current stable version is 1.0.5, with an active development pace characterized by frequent patch and minor releases.

pip install icalendar-searcher
INSTALL
IMPORT
SIG · ICALENDAR-SEARCHER
I
icalendar-searcher
serializationpythonv1.0.6
Install
2.4s avg
Import
Disk
27MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.0.6 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 29.4MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 2.4s · import 0.000s · 30MB
27MB installed
● package 27MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Searcher
from icalendar_searcher import Searcher
from icalendar_searcher import IcalendarSearcher
Collation
from icalendar_searcher import Collation

Initialize an `IcalendarSearcher` with iCalendar data and use `QueryBuilder` to construct SQL-like filters for searching. The `search()` method returns an iterator of `icalendar.cal.Component` objects.

from icalendar_searcher import IcalendarSearcher, QueryBuilder ics_data = """ BEGIN:VCALENDAR VERSION:2.0 PRODID:-//Example Corp//NONSGML Event Generator//EN BEGIN:VEVENT UID:19970610T172345Z-AF23B2@example.com DTSTAMP:19970610T172345Z DTSTART:19970714T170000Z DTEND:19970715T035959Z SUMMARY:Bastille Day Party DESCRIPTION:Party to celebrate Bastille Day. LOCATION:Paris, France END:VEVENT BEGIN:VEVENT UID:19980610T172345Z-AF23C3@example.com DTSTAMP:19980610T172345Z DTSTART:19980720T100000Z DTEND:19980720T110000Z SUMMARY:Meeting with client END:VEVENT END:VCALENDAR """ searcher = IcalendarSearcher(ics_data) # Example 1: Find events starting after a specific date query_future = QueryBuilder().filter("DTSTART >= 1997-07-15T00:00:00Z").build() results_future = searcher.search(query_future) print("\nEvents starting after July 15, 1997:") for component in results_future: print(f"- {component.get('SUMMARY')}") # Example 2: Filter by property value (case-insensitive summary containing 'party') query_party = QueryBuilder().filter("SUMMARY ~ 'party'").build() results_party = searcher.search(query_party) print("\nEvents with 'party' in summary:") for component in results_party: print(f"- {component.get('SUMMARY')}") # Example 3: Get all components all_results = searcher.search() print("\nAll events:") for component in all_results: print(f"- {component.get('SUMMARY')}")
icalendar-searcher --version
Debug
Known issues
breakingThe `ignore_exceptions` parameter was removed from the `IcalendarSearcher` constructor. It is no longer supported.
fix
Remove the `ignore_exceptions` parameter from your `IcalendarSearcher` instantiation. Exception handling now needs to be managed externally.
affects: >=1.0.0
breakingThe method `IcalendarSearcher.get_calendars()` was removed. `IcalendarSearcher.search()` now directly returns an iterator of `icalendar.cal.Component` objects.
fix
Instead of calling `get_calendars()`, use `search()` directly. If you need to iterate over top-level calendars, you might need to implement custom logic.
affects: >=1.0.0
breakingThe `expand_recurring_events` parameter was moved from the `IcalendarSearcher` constructor to the `IcalendarSearcher.search()` method.
fix
Pass `expand_recurring_events=True/False` directly to `search()` instead of `IcalendarSearcher.__init__()`.
affects: >=1.0.0
breakingThe `search()` method now returns an iterator of `icalendar.cal.Component` objects directly, and the `QueryResult` object was removed.
fix
Iterate directly over the result of `search()` instead of expecting a `QueryResult` object. Access `icalendar.cal.Component` methods directly on each item.
affects: >=1.0.0
Upgrade
Version history
1.0.6latest on PyPI · released May 29, 2026
Audit
Dependencies
icalendarrequiredCore dependency for parsing and manipulating iCalendar data.
pytzrequiredRequired for timezone handling within iCalendar components.
Agent activity
6 hits · last 30 days
node
6
Resources
icalendar-searcher — pip install icalendar-searcher · libregistry