Skip to main content

alt Banner of the odp gent package

GitHub Release Python Versions Project Stage Project Maintenance License

GitHub Activity PyPi Downloads GitHub Last Commit Open in Dev Containers

Build Status Typing Status Code Coverage OpenSSF Scorecard

Asynchronous Python client for the open datasets of Gent (Belgium).

About

A python package with which you can retrieve data from the Open Data Platform of Gent via their API. This package was initially created to only retrieve parking data from the API, but the code base is made in such a way that it is easy to extend for other datasets from the same platform.

Installation

pip install odp-gent

Datasets

You can read the following datasets with this package:

Find here more information about the different variables and parameters per dataset with this python package.

Example

import asyncio

from odp_gent import ODPGent


async def main() -> None:
    """Show example on using the Open Data API client."""
    async with ODPGent() as client:
        garages = await client.garages(limit=12)
        park_and_rides = await client.park_and_rides(limit=5, gentse_feesten="True")
        print(garages)
        print(park_and_rides)


if __name__ == "__main__":
    asyncio.run(main())

You can find more code examples in the examples folder.

Use cases

NIPKaart.nl

A website that provides insight into where disabled parking spaces are, based on data from users and municipalities. Operates mainly in the Netherlands, but also has plans to process data from abroad.

Contributing

This is an active open-source project. We are always open to people who want to use the code or contribute to it.

We've set up a separate document for our contribution guidelines.

Thank you for being involved! 😍

Setting up development environment

The simplest way to begin is by utilizing the Dev Container feature of Visual Studio Code or by opening a CodeSpace directly on GitHub. By clicking the button below you immediately start a Dev Container in Visual Studio Code.

Open in Dev Containers

This Python project relies on uv as its dependency manager, providing comprehensive management and control over project dependencies.

You need at least:

  • Python 3.12+
  • uv

Installation

Install all packages, including all development requirements:

uv sync --locked

uv creates a project virtual environment in .venv and installs the locked dependencies.

Prek

This repository uses the prek framework, all changes are linted and tested with each commit. To setup the prek check, run:

uv run prek install

And to run all checks and tests manually, use the following command:

uv run prek run --all-files

Testing

It uses pytest as the test framework. To run the tests:

uv run pytest

To update the syrupy snapshot tests:

uv run pytest --snapshot-update

Source timestamps

Dates use Python's standard-library datetime; this package does not require pytz. BlueBike preserves the offset in last_seen instead of overwriting it with a Brussels timezone (which previously introduced a historical 18-minute offset). Partago preserves the UTC Z suffix and fractional seconds. Both reject timestamps without a timezone.

Complete parking feed

await client.parking_collection() retrieves every page of bezetting-parkeergarages-real-time and returns Collection(records, total_count, pages_fetched, complete). Its ParkingFacility records use the original fields.id as facility_id; the existing limited garages() API keeps its portal recordid behavior for compatibility. Pagination rejects missing/duplicate facility IDs, changing totals, short pages and safety-ceiling truncation (max_records=10000).

Measurements keep the source lastupdate timezone and general counts. Missing or invalid/undated times stay None, never the retrieval time; unknown counts/flags stay None, measured zero stays zero. The feed includes different parking types; consumers choose their own selection. The former separate P+R dataset returned 404 when checked on 2026-10-13; this method retrieves the current unified live feed instead.

License

MIT License

Copyright (c) 2022-2026 Klaas Schoute

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Metadata

Release files for odp-gent 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for odp-gent 1.0.0
File Size Uploaded
odp_gent-1.0.0.tar.gz 10.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for odp-gent 1.0.0
File Interpreter ABI Platform
odp_gent-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 22.7 kB

Release files / odp_gent-1.0.0.tar.gz

Download URL odp_gent-1.0.0.tar.gz
Size 10.8 kB
Tags Source
SHA-256 checksum
How to use checksums
fa27e9663eb450bea1cf49607415bfc08130be813043d2e657e0f21a8d7a4a50
BLAKE2b-256 checksum
How to use checksums
dc6805f986ea4c96c15aa7da46cf22e3903f5c4335572759c548554d570f351f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

Release files / odp_gent-1.0.0-py3-none-any.whl

Download URL odp_gent-1.0.0-py3-none-any.whl
Size 11.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a7e713371fedb4b0e7d4a80cc1a18aed8193d078fb687f4d1f22e5d3d3b2976f
BLAKE2b-256 checksum
How to use checksums
a76d41bff75eb9ef327fbe6b0b633033695a9a900b4164c3c80c5ab0531f440d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page