Skip to main content

The SDK provides convenient access to the MOT History API for applications written in the Python programming language.

Project description

MOT History API Python SDK

The SDK provides convenient access to the MOT History API functionality from applications written in the Python programming language.

Requirements

Python 2.7 and later.

Setup

You can install this package by using the pip tool and installing:

$ pip install mot-history-api-py-sdk

Or:

$ easy_install mot-history-api-py-sdk

Usage Example

from motapi.motdata import *
from dotenv import load_dotenv
import os

api_key = "<your-api-key>" # your api key
registration = "ML58FOU" # example of a vehicle registration
page = 1 # pagination
date = "20230201" # date must be five weeks from the current date
vehicle_id = "<enter your vehicle id here>" # unique vehicle ID for vehicles that have had an MOT test

reg = Registration(api_key)
reg_data = reg.get_data(registration)
print(reg_data)

p = Page(api_key)
page_data = p.get_data(page)
print(page_data)

d = Date(api_key)
date_data = d.get_data(date, page)
print(date_data)

v = VehicleID(api_key)
vehicle_data = v.get_data(vehicle_id)
print(vehicle_data)

Request MOT History API Key

You can use this support form to request an API Key.

Using the MOT History API Key

You can read the API documentation to understand what’s possible with MOT History API Key. If you need further assistance, don’t hesitate to contact the DVSA.

License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mot-history-api-py-sdk-0.0.1.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distributions

mot_history_api_py_sdk-0.0.1-py3.9.egg (4.5 kB view hashes)

Uploaded Source

mot_history_api_py_sdk-0.0.1-py3-none-any.whl (4.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page