Created
June 14, 2022 08:26
-
-
Save danleyb2/2f5c5c13cb187d1e01023a1ee9f3e991 to your computer and use it in GitHub Desktop.
Revisions
-
danleyb2 created this gist
Jun 14, 2022 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,28 @@ 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)