About this project
## What it is
`liege` is an asynchronous Python client for the open datasets published by the Open Data Platform of Liège, Belgium. It wraps the platform's API so that Python code — typically inside an async event loop — can fetch records as typed objects instead of dealing with raw HTTP requests and JSON parsing.
The package was originally written only to retrieve parking data, but the README notes that the code base is structured so that additional datasets from the same platform can be added easily.
## Installation
```bash
pip install liege
```
## Datasets covered
Two datasets are documented in the README:
- **Disabled parking spaces / Stationnement PMR** — 1062 locations.
- **Garages / Les parkings voitures hors voirie** — 32 locations.
Each dataset is queried with a `limit` parameter (default 10) that controls how many results are returned.
### Disabled parking fields
`spot_id` (int), `number` (int), `address` (str), `municipality` (str), `city` (str), `status` (str), `longitude` (float), `latitude` (float), `created_at` (datetime), `updated_at` (datetime).
### Garage fields
`name` (string), `capacity` (int), `charging_stations` (int), `address` (string), `municipality` (string), `city` (string), `provider` (string), `schedule` (string), `longitude` (float), `latitude` (float), `created_at` (datetime), `updated_at` (datetime).
## Usage example
The client is designed as an async context manager:
```python
import asyncio
from liege import ODPLiege
async def main() -> None:
async with ODPLiege() as client:
garages = await client.garages(limit=10)
disabled_parkings = await client.disabled_parkings(limit=10)
print(garages)
print(disabled_parkings)
asyncio.run(main())
```
## Documented use case
The README cites NIPKaart.nl, a website that maps disabled parking spaces using data contributed by users and municipalities. It operates mainly in the Netherlands but has stated plans to process data from abroad, which is where this client fits in.
## Development setup
The project uses Poetry for dependency management and requires Python 3.12+ along with Poetry itself. After cloning:
```bash
poetry install
```
Poetry creates a virtual environment for the dependencies by default.
Linting and testing are wired through the `prek` framework, which runs checks on each commit:
```bash
poetry run prek install
poetry run prek run --all-files
```
Tests use pytest, with snapshot tests handled by syrupy:
```bash
poetry run pytest
poetry run pytest --snapshot-update
```
A Dev Container configuration is provided, so the environment can be started directly in Visual Studio Code or as a GitHub CodeSpace.
## Project signals in the README
The badge block indicates an experimental project stage, ongoing maintenance, active commit activity, published releases on GitHub, distribution on PyPI with download statistics, build and typing workflow status, code coverage reporting, and an OpenSSF Scorecard badge. The project also documents contribution guidelines in a separate CONTRIBUTING.md and is released under the MIT License (copyright 2022–2026 Klaas Schoute).
## Fit
This is a small, single-purpose API client library: useful when you need Liège open data (parking-related, currently) inside an async Python application, and useful as a template for wrapping other datasets from the same ODP platform. It is not a data store, a server, or an end-user application.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.