The SDK provides convenient access to the MOT History API for applications written in the Python programming language.
Project description
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.
Copyright
Copyright © 2023 Finbarrs Oketunji.
The MOT History API Python SDK is Licensed under the Open Government Licence v3.0
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
Built Distributions
Hashes for mot-history-api-py-sdk-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b6baef37fde92bb8fbc76501a72fc33f07efb3a3f277775f9f72b09d176b6be |
|
MD5 | 189f3997a0557446fa2251968edc605d |
|
BLAKE2b-256 | 495a3315dca8552cbdb1b01a1ec3533cf3437df6017898baadde0471eddce364 |
Hashes for mot_history_api_py_sdk-0.0.1-py3.9.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9fd00bdf45f4f220fdbf7944d6fffec96a8c7dd54d6e7173c6f786aaf8919d6 |
|
MD5 | b923b32b4db05978d53075801beab8c4 |
|
BLAKE2b-256 | 628dc21fda48bea086e1346502e60e91e585a2d0bfe96591e1cf23c764567c01 |
Hashes for mot_history_api_py_sdk-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dadfa8cf7b04fc1dff52b0b52b8564dc56cc256893ecd6fc26fc6492540243c0 |
|
MD5 | d909e1f2f714e56525f84e942a512cb8 |
|
BLAKE2b-256 | 6f241e38e27f1cb19c07852647ca7007d042815af6f62f0d0e97b8ddaf44700d |