A Python/Flask program that serves up data from the DMV2U database. Created as an open source contribution to the Oregon Plates project.
- Go to the Python website and click the button that says
Download version 3.X.X
. - Run the Python installer.
- Confirm Python successfully installed by opening your terminal and running:
python --version
pip --version
- If the output for these commands includes a version number, Python is installed and available from the command line.
- Navigate to your command line and run
pip install flask
- You should see some output ending in a notification that Flask has been installed successfully.
Enter the following commands in Terminal (macOS) or PowerShell (Windows):
cd desktop
git clone https://github.com/kwicz/dmv2uAPI
cd dmv2uAPI
In your terminal, type:
python app.py
Hold command
while clicking the link in your local terminal to your local address, which should be:
http://127.0.0.1:5000
Once you have installed this program, you can use these endpoints on your local host in your browser.
Base URL: https://localhost:5000
GET api/v1/plates/all
GET api/v1/plates?{parameters}
Parameter | Type | Description | Query Example |
---|---|---|---|
ID | integer | Plate ID in Database. | https://localhost:5000/api/v1/plates?id={id} |
DATE | YYYY-MM-DD | https://localhost:5000/api/v1/plates?date=2020-04-14 |
|
STRING | string | Search by the string on the license plate. | https://localhost:5000/api/v1/plates?string={string} |
STATUS | string | "Assigned", "Available", or "Restricted" | https://localhost:5000/api/v1/plates?status=Restricted |
MAKE | string | Returns make of current vehicle with specified plate. | https://localhost:5000/api/v1/plates?make=Subaru |
MODEL | string | Returns model of current vehicle with specified plate. | https://localhost:5000/api/v1/plates?model=Outback |
YEAR | YYYY | Returns year of current vehicle with specified plate. | https://localhost:5000/api/v1/plates?year=2020 |
PREV_DATE | string | ||
PREV_MAKE | string | Returns make of previous vehicle with specified plate. | https://localhost:5000/api/v1/plates?prev_make=Subaru |
PREV_MODEL | string | Returns model of previous vehicle with specified plate. | https://localhost:5000/api/v1/plates?prev_model=Outback |
PREV_YEAR | YYYY | Returns year of previous vehicle with specified plate. | https://localhost:5000/api/v1/plates?prev_year=2020 |
http://127.0.0.1:5000/api/v1/plates?id=23987&string=DMV&status=Available
Have a bug or an issue with this application? Open a new issue here on GitHub.
- Python 3.8.1
- Flask
- SQLite
- _Database provided by Oregon Plates
Copyright (c) 2020 K Wicz