mot-history-api-py-sdk


Namemot-history-api-py-sdk JSON
Version 0.0.3 PyPI version JSON
download
home_pagehttps://dvsa.github.io/mot-history-api-documentation/
SummaryThe SDK provides convenient access to the MOT History API for applications written in the Python programming language.
upload_time2023-06-28 11:56:54
maintainer
docs_urlNone
authorFinbarrs Oketunji
requires_python>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
licenseMIT
keywords dvsa gov uk mot hgv psv vehicle registration results
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            mot-history-api-py-sdk
======================

.. image:: https://badge.fury.io/py/mot-history-api-py-sdk.svg
    :target: https://badge.fury.io/py/mot-history-api-py-sdk
    :alt: MOT History API Python SDK

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

.. _MOT History API: https://dvsa.github.io/mot-history-api-documentation/


Requirements
------------

Python 2.7 and later.


Setup
------

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

.. code-block:: bash

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

Or:

.. code-block:: bash

	$ easy_install mot-history-api-py-sdk


Usage Example
-------------

.. code-block:: python

    from motapi.motdata import *

    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)
    if reg_data is not None:
        print(reg_data)
    else:
        print("Failed to retrieve data!")

    p = Page(api_key)
    page_data = p.get_data(page)
    if page_data is not None:
        print(page_data)
    else:
        print("Failed to retrieve data!")

    d = Date(api_key)
    date_data = d.get_data(date, page)
    if date_data is not None:
        print(date_data)
    else:
        print("Failed to retrieve data!")

    v = VehicleID(api_key)
    vehicle_data = v.get_data(vehicle_id)
    if vehicle_data is not None:
        print(vehicle_data)
    else:
        print("Failed to retrieve data!")


Request MOT History API Key
---------------------------

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

.. _API Key: https://www.smartsurvey.co.uk/s/MOT_History_TradeAPI_Access_and_Support?


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`_.

.. _API documentation: https://dvsa.github.io/mot-history-api-documentation/
.. _contact the DVSA: https://www.smartsurvey.co.uk/s/MOT_History_TradeAPI_Access_and_Support?

License
--------

This project is licensed under the `MIT License`_.  

.. _MIT License: https://gist.github.com/0xnu/d11da49c85eeb7272517a9010bbdf1ab


Copyright
---------

Copyright |copy| 2023 `Finbarrs Oketunji`_.

The MOT History API Python SDK is Licensed under the `Open Government Licence v3.0`_

.. |copy| unicode:: 0xA9 .. copyright sign
.. _Finbarrs Oketunji: https://www.gov.uk/dvsa
.. _Open Government Licence v3.0: https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/


            

Raw data

            {
    "_id": null,
    "home_page": "https://dvsa.github.io/mot-history-api-documentation/",
    "name": "mot-history-api-py-sdk",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
    "maintainer_email": "",
    "keywords": "dvsa,gov,uk,mot,hgv,psv,vehicle,registration,results",
    "author": "Finbarrs Oketunji",
    "author_email": "f@finbarrs.eu",
    "download_url": "https://files.pythonhosted.org/packages/d0/e6/a983d5426d730879e8ebd68d769c979d0a9f22d8a9f7a277269156c505b1/mot-history-api-py-sdk-0.0.3.tar.gz",
    "platform": null,
    "description": "mot-history-api-py-sdk\n======================\n\n.. image:: https://badge.fury.io/py/mot-history-api-py-sdk.svg\n    :target: https://badge.fury.io/py/mot-history-api-py-sdk\n    :alt: MOT History API Python SDK\n\nThe SDK provides convenient access to the `MOT History API`_ functionality from applications written in the Python programming language.\n\n.. _MOT History API: https://dvsa.github.io/mot-history-api-documentation/\n\n\nRequirements\n------------\n\nPython 2.7 and later.\n\n\nSetup\n------\n\nYou can install this package by using the pip tool and installing:\n\n.. code-block:: bash\n\n\t$ pip install mot-history-api-py-sdk\n\nOr:\n\n.. code-block:: bash\n\n\t$ easy_install mot-history-api-py-sdk\n\n\nUsage Example\n-------------\n\n.. code-block:: python\n\n    from motapi.motdata import *\n\n    api_key = \"<your-api-key>\" # your api key\n    registration = \"ML58FOU\" # example of a vehicle registration\n    page = 1 # pagination\n    date = \"20230201\" # date must be five weeks from the current date\n    vehicle_id = \"<enter your vehicle id here>\" # unique vehicle id for vehicles that have had an MOT test\n\n    reg = Registration(api_key)\n    reg_data = reg.get_data(registration)\n    if reg_data is not None:\n        print(reg_data)\n    else:\n        print(\"Failed to retrieve data!\")\n\n    p = Page(api_key)\n    page_data = p.get_data(page)\n    if page_data is not None:\n        print(page_data)\n    else:\n        print(\"Failed to retrieve data!\")\n\n    d = Date(api_key)\n    date_data = d.get_data(date, page)\n    if date_data is not None:\n        print(date_data)\n    else:\n        print(\"Failed to retrieve data!\")\n\n    v = VehicleID(api_key)\n    vehicle_data = v.get_data(vehicle_id)\n    if vehicle_data is not None:\n        print(vehicle_data)\n    else:\n        print(\"Failed to retrieve data!\")\n\n\nRequest MOT History API Key\n---------------------------\n\nYou can use this support form to request an `API Key`_.\n\n.. _API Key: https://www.smartsurvey.co.uk/s/MOT_History_TradeAPI_Access_and_Support?\n\n\nUsing the MOT History API Key\n-----------------------------\n\nYou 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`_.\n\n.. _API documentation: https://dvsa.github.io/mot-history-api-documentation/\n.. _contact the DVSA: https://www.smartsurvey.co.uk/s/MOT_History_TradeAPI_Access_and_Support?\n\nLicense\n--------\n\nThis project is licensed under the `MIT License`_.  \n\n.. _MIT License: https://gist.github.com/0xnu/d11da49c85eeb7272517a9010bbdf1ab\n\n\nCopyright\n---------\n\nCopyright |copy| 2023 `Finbarrs Oketunji`_.\n\nThe MOT History API Python SDK is Licensed under the `Open Government Licence v3.0`_\n\n.. |copy| unicode:: 0xA9 .. copyright sign\n.. _Finbarrs Oketunji: https://www.gov.uk/dvsa\n.. _Open Government Licence v3.0: https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "The SDK provides convenient access to the MOT History API for applications written in the Python programming language.",
    "version": "0.0.3",
    "project_urls": {
        "Bug Tracker": "https://github.com/0xnu/mot-history-api-sdk/issues",
        "Changes": "https://github.com/0xnu/mot-history-api-sdk/blob/main/CHANGELOG.md",
        "Documentation": "https://dvsa.github.io/mot-history-api-documentation/",
        "Homepage": "https://dvsa.github.io/mot-history-api-documentation/",
        "Source Code": "https://github.com/0xnu/mot-history-api-sdk"
    },
    "split_keywords": [
        "dvsa",
        "gov",
        "uk",
        "mot",
        "hgv",
        "psv",
        "vehicle",
        "registration",
        "results"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "64a5ded3e5ea6cb4d7ef8bfa78a7065ecec8c7f5c5127825a7a33a0400c775ba",
                "md5": "f5fe154677c253f03753b8a3804a3f37",
                "sha256": "a455696f0e4b3869abf3bfdbd8a22f0dd5882d28bfa5d2a7741de282cec89424"
            },
            "downloads": -1,
            "filename": "mot_history_api_py_sdk-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f5fe154677c253f03753b8a3804a3f37",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
            "size": 4309,
            "upload_time": "2023-06-28T11:56:52",
            "upload_time_iso_8601": "2023-06-28T11:56:52.703101Z",
            "url": "https://files.pythonhosted.org/packages/64/a5/ded3e5ea6cb4d7ef8bfa78a7065ecec8c7f5c5127825a7a33a0400c775ba/mot_history_api_py_sdk-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d0e6a983d5426d730879e8ebd68d769c979d0a9f22d8a9f7a277269156c505b1",
                "md5": "1e10fae2dad720a4ba733ab3cf5663ba",
                "sha256": "d266e4c260c6460c8d273621a2e4b1f7729ba064559b9a4a76107495fb93d8ac"
            },
            "downloads": -1,
            "filename": "mot-history-api-py-sdk-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "1e10fae2dad720a4ba733ab3cf5663ba",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
            "size": 4097,
            "upload_time": "2023-06-28T11:56:54",
            "upload_time_iso_8601": "2023-06-28T11:56:54.133800Z",
            "url": "https://files.pythonhosted.org/packages/d0/e6/a983d5426d730879e8ebd68d769c979d0a9f22d8a9f7a277269156c505b1/mot-history-api-py-sdk-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-28 11:56:54",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "0xnu",
    "github_project": "mot-history-api-sdk",
    "github_not_found": true,
    "lcname": "mot-history-api-py-sdk"
}
        
Elapsed time: 0.08172s