Filter product groups by category¶
Use EventimCategory to restrict product_groups() to a specific type of event.
Solution¶
from pyventim import EventimClient, EventimMarket, EventimCategory
client = EventimClient(EventimMarket.GERMANY)
for product_group in client.product_groups(
categories=[EventimCategory.CONCERTS],
page_limit=5,
):
print(product_group.name, product_group.start_date)
Pass multiple categories to combine them in a single request:
for product_group in client.product_groups(
categories=[EventimCategory.CONCERTS, EventimCategory.FESTIVALS],
page_limit=5,
):
print(product_group.name, product_group.start_date)
Notes¶
categoriesis required — pass at least oneEventimCategorymember.- Multiple categories return the union of results, not the intersection.
- The same enum members work across all 22 markets; pyventim maps each canonical category to the correct market-specific API strings automatically.
- See the Categories reference for the full list of available members.