About this project

# odp-stockholm An asynchronous Python client for the open datasets of Stockholm, Sweden. It talks to the city's Open Data Platform API so that Python applications can pull datasets without hand-writing HTTP requests. ## What it does The package was originally built to fetch parking data only, but the code base is deliberately organised so that other datasets from the same platform can be added later. The README currently documents one dataset: - **Disabled parkings** (rörelsehindrade förare med särskilt tillstånd) — roughly 2045 locations. ## Requirements and access Using the data requires an API key, which can be requested from the platform's website. The project targets Python 3.12 or newer and is distributed on PyPI as `odp-stockholm`. ## Installation and usage ```bash pip install odp-stockholm ``` The client is used as an async context manager. The documented example instantiates `ParkingStockholm` with an API key and calls `disabled_parkings(limit=10)`, printing the returned locations. ## Dataset fields Requests accept a `limit` parameter (default 10). Returned records include: - `location_id`, `location_type`, `number` of parking spots - `street`, `address`, `district` - `parking_rate` and `parking_rules` (a URL to Stockholm's parking regulations) - `valid_from` and `valid_to` (the latter may be `None`) - `coordinates` as a list of floats ## Development setup The project uses Poetry for dependency management and can be opened in a VS Code Dev Container or GitHub CodeSpace. Commits are linted and tested through the `prek` hook framework (`poetry run prek install`, `poetry run prek run --all-files`). Tests use pytest, including syrupy snapshot tests that can be refreshed with `poetry run pytest --snapshot-update`. ## Licensing Released under the MIT License, copyright Klaas Schoute (2023–2026). ## Notes for evaluators This is a focused data-access library rather than a full application: its value is in providing typed, async access to a municipal open-data source and a template that can be extended to further Stockholm datasets. It is not affiliated with or endorsed by the City of Stockholm; users supply their own API key and are subject to the platform's terms.