Created
June 14, 2022 08:26
-
-
Save danleyb2/2f5c5c13cb187d1e01023a1ee9f3e991 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
API_TOKEN = '4805bee1222ce85e0bf####################' | |
regions = ['us-ca', ] | |
config = dict( | |
detection_mode='vehicle' | |
) | |
c = json.dumps(config) | |
print(c) | |
with open('assets/car.jpg', 'rb') as fp: | |
response = requests.post( | |
'https://api.platerecognizer.com/v1/plate-reader/', | |
data=dict( | |
config=c, | |
regions=regions, | |
camera_id='Uphill' | |
), | |
files=dict(upload=fp), | |
headers={'Authorization': 'Token ' + API_TOKEN} | |
) | |
print(response) | |
print(response.text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment