Skip to main content

motorbay-client

Python client for the Motorbay API (Danish vehicle data from Motorstyrelsen's public weekly extract). motorbay is the small wrapper you import. motorbay_client holds the models, generated by openapi-python-client from the API's OpenAPI document. Python 3.10+.

pip install motorbay-client
from motorbay import MotorbayApiError, MotorbayClient

with MotorbayClient(api_key="mbk_live_...") as motorbay:
    try:
        vehicle = motorbay.lookup_vehicle("AB12345", include=["engine", "inspection"])
        print(vehicle.make.name, vehicle.registration_number)
    except MotorbayApiError as e:
        if e.code == "VehicleNotFound":
            print("No such vehicle")
        elif e.status == 429:
            print(f"Retry in {e.retry_after}s")
        else:
            raise

Setup and tests (offline, httpx.MockTransport):

uv venv .venv && uv pip install -p .venv -r requirements-dev.txt
.venv/bin/python -m pytest -q

Metadata

Release files for motorbay-client 0.1.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 motorbay-client 0.1.0
File Size Uploaded
motorbay_client-0.1.0.tar.gz 58.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for motorbay-client 0.1.0
File Interpreter ABI Platform
motorbay_client-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 237.9 kB

Release files / motorbay_client-0.1.0.tar.gz

Download URL motorbay_client-0.1.0.tar.gz
Size 58.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9bca0229ff49743b22efb8c210cfa592e7c9ad71fab2f3ece873e9e9312f49a3
BLAKE2b-256 checksum
How to use checksums
298f0ee04cbc66fc2f94c9c400b2c5a85a2bbfb1584bd5166c3f1da3a8eefeca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / motorbay_client-0.1.0-py3-none-any.whl

Download URL motorbay_client-0.1.0-py3-none-any.whl
Size 179.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b68f57b1f088fc0a6b03df340e041d3d9790f205cc4e9aba99e1eb7855c5ac3
BLAKE2b-256 checksum
How to use checksums
c31484c19bad5c17e96078650bbab23ead0e1011ba000ae0a6b09e8df3e3b910
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.0 This release

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