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
The API adds enum values without a new version, such as a new check flag code.
From 0.3.0 a value the client doesn't know is kept: it is an instance of the
enum, equal to its string, with is_known False. Earlier versions raised
ValueError for the whole answer.
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.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| motorbay_client-0.4.0.tar.gz | 95.8 kB | Without provenance | Details for motorbay_client-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| motorbay_client-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for motorbay_client-0.4.0-py3-none-any.whl |
Total release size: 383.1 kB
Release files / motorbay_client-0.4.0.tar.gz
| Download URL | motorbay_client-0.4.0.tar.gz |
|---|---|
| Size | 95.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b0a8bd85a02215886e010131581301de8f2fee0d811d08e284cf74c45225c371
|
|
BLAKE2b-256 checksum How to use checksums |
78c98a0674fcc1ccfd7f4fa3d537079e36b91cde679dff0e8d949fbe0775daa7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / motorbay_client-0.4.0-py3-none-any.whl
| Download URL | motorbay_client-0.4.0-py3-none-any.whl |
|---|---|
| Size | 287.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
99cfcb756004c5de162ab462f3405960d4764cfd9f70d11e4c9d0e1a4dc68e13
|
|
BLAKE2b-256 checksum How to use checksums |
621426a4e8fc79319dae2a14b4296fd84b8f5f37f7530db3b32632ef7f329d40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for motorbay-client 0.4.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.