Metadata-Version: 2.3
Name: pyventim
Version: 1.0.4
Summary: A python library to interact with hidden public and private APIs of Eventim.
Author: kggx
Author-email: kggx <pyventim@b-raum.com>
License: GNU GENERAL PUBLIC LICENSE
         Version 3, 29 June 2007
         
         Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
         Everyone is permitted to copy and distribute verbatim copies
         of this license document, but changing it is not allowed.
         
         Preamble
         
         The GNU General Public License is a free, copyleft license for
         software and other kinds of works.
         
         The licenses for most software and other practical works are designed
         to take away your freedom to share and change the works. By contrast,
         the GNU General Public License is intended to guarantee your freedom to
         share and change all versions of a program--to make sure it remains free
         software for all its users. We, the Free Software Foundation, use the
         GNU General Public License for most of our software; it applies also to
         any other work released this way by its authors. You can apply it to
         your programs, too.
         
         When we speak of free software, we are referring to freedom, not
         price. Our General Public Licenses are designed to make sure that you
         have the freedom to distribute copies of free software (and charge for
         them if you wish), that you receive source code or can get it if you
         want it, that you can change the software or use pieces of it in new
         free programs, and that you know you can do these things.
         
         To protect your rights, we need to prevent others from denying you
         these rights or asking you to surrender the rights. Therefore, you have
         certain responsibilities if you distribute copies of the software, or if
         you modify it: responsibilities to respect the freedom of others.
         
         For example, if you distribute copies of such a program, whether
         gratis or for a fee, you must pass on to the recipients the same
         freedoms that you received. You must make sure that they, too, receive
         or can get the source code. And you must show them these terms so they
         know their rights.
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: Pydantic
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Dist: httpx-retries>=0.5.0
Requires-Dist: pydantic>=2.13.3
Requires-Dist: scrapling[all]>=0.4.7
Requires-Python: >=3.13
Project-URL: Homepage, https://codeberg.org/openevent/pyventim
Project-URL: Issues, https://codeberg.org/openevent/pyventim/issues
Description-Content-Type: text/markdown

# Pyventim

[![Quality Gates](https://codeberg.org/openevent/pyventim/badges/workflows/quality.yml/badge.svg?logo=codeberg)](https://codeberg.org/openevent/pyventim/actions?workflow=quality.yml)
[![Python](https://img.shields.io/pypi/pyversions/pyventim?logo=python)](https://pypi.org/project/pyventim/)
[![PyPI Version](https://img.shields.io/pypi/v/pyventim?logo=pypi)](https://pypi.org/project/pyventim/)
[![PyPI Downloads](https://img.shields.io/pypi/dm/pyventim?logo=pypi)](https://pypi.org/project/pyventim/)
[![License](https://img.shields.io/badge/license-GPL--3.0-blue?logo=gplv3)](./LICENSE.md)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-3.0-teal?logo=contributorcovenant)](./CODE_OF_CONDUCT.md)

A Python library for accessing Eventim ticket and event data across multiple markets.

## Manifesto

Eventim does not provide a public API like Ticketmaster and other platforms do. This library is an effort to make Eventim data open for public usage by wrapping its hidden public endpoints and falling back to HTML scraping where necessary.

If Eventim publishes official public endpoints, this library will migrate to use them. In the meantime, users are advised to use this library responsibly and to respect Eventim's `robots.txt` and fair-use expectations.

> Due to the nature of web scraping, this library may break without notice. Please open an issue if something stops working.

## Installation

Pyventim supports the two most recent stable Python releases, following the [Python downloads page](https://www.python.org/downloads/). Currently **Python 3.13** and **3.14** are supported.

### Using pip

```sh
pip install pyventim
patchright install chromium

# If needed also install system dependencies
patchright install --with-deps chromium
```

### Using uv

```sh
uv add pyventim
uv run patchright install chromium

# If needed also install system dependencies
uv run patchright install --with-deps chromium

```

## Usage

For detailed information and usage refer to the latest [documentation](https://openevent.codeberg.page/pyventim/latest/)!

### Getting started

`EventimClient` supports markets across Europe, Brazil, and Israel. Pass an `EventimMarket` enum member to select one. See the [Markets](https://openevent.codeberg.page/pyventim/latest/explanation/markets/) page in the documentation for the full list.

```python
from pyventim import EventimCategory, EventimClient, EventimMarket

# Initialise a client for Germany
de_client = EventimClient(EventimMarket.GERMANY)

# Search for concerts — product_groups() returns an iterator of events
for product_group in de_client.product_groups(categories=[EventimCategory.CONCERTS], page_limit=2):
    print(product_group.name, product_group.start_date)

    # Fetch individual event dates (tickets, pricing, availability)
    for event in de_client.products(product_group.product_group_id, page_limit=1):
        print("  ", event.name, event.start_date)

# Switch to another market — same API, different catalogue
se_client = EventimClient(EventimMarket.SWEDEN)

for product_group in se_client.product_groups(categories=[EventimCategory.CONCERTS], page_limit=1):
    print(product_group.name)
```

All methods return typed iterators backed by Pydantic v2 models. Responses are automatically paginated — use `page_limit` to cap the number of pages fetched.

## Contributing

See [CONTRIBUTION.md](https://codeberg.org/openevent/pyventim/src/branch/main/CONTRIBUTION.md) for the full development guide and [CODE_OF_CONDUCT.md](https://codeberg.org/openevent/pyventim/src/branch/main/CODE_OF_CONDUCT.md) on how we work together.

### Bug reports and feature requests

Open an issue on [Codeberg](https://codeberg.org/openevent/pyventim/issues). Templates are provided for bug reports and feature requests.

### Development quickstart

Fork the repository on [Codeberg](https://codeberg.org/openevent/pyventim), clone your fork, then install all dev dependencies:

```bash
uv sync --dev
```

Then run the quality checks:

```bash
# Run tests with coverage
uv run coverage run -m pytest

# Coverage report (must pass 90%)
uv run coverage report -m

# Docstring coverage (must pass 100%)
uv run interrogate -c pyproject.toml src

# Lint and format
uv run ruff check src tests
uv run ruff format src tests
```

## License

This project is licensed under the GPL-3.0. See [LICENSE.md](https://codeberg.org/openevent/pyventim/src/branch/main/LICENSE.md) for details.

## Maintainers

- [kggx](https://codeberg.org/kggx): [pyventim@b-raum.com](mailto:pyventim@b-raum.com) / [openevent@b-raum.com](mailto:openevent@b-raum.com)

## Acknowledgements

- [Contributor Covenant](https://www.contributor-covenant.org) have an awesome code of conduct!
- All contributors and maintainers of open source software that we use. Most notably but not limited to: [Python](https://www.python.org/), [pypi](https://pypi.org/), [Astral (uv, ruff)](https://astral.sh/) , [pytest](https://pytest.org/), [Pydantic](https://pydantic.dev), [Scrapling](https://scrapling.readthedocs.io/en/latest/), [Coverage](https://coverage.readthedocs.io), [Interrogate](https://interrogate.readthedocs.io), [genbadge](https://github.com/smarie/python-genbadge) and [Zensical](https://zensical.org/).
