An interface to execute Fahrzeugschein API commands using Python
Project description
Registration Recognition Python SDK
Registration Recognition by mmmint.ai
Visit mmmint.ai/solutions/fahrzeugschein.
1. Handle your credentials
Create an environment variable to store the api key - reach out to support@mmmint.ai.
export API_KEY="yourapikey"
2. Use the python sdk to call the API
Create an python file and insert the following to load the credentials:
apikey = os.environ.get("API_KEY", "")
Create an Endpoint with your Credentials
from mmmint.registration_recognition.sdk import Client
client = Client(apikey)
Post fahrzeugschein from local Image
image_path = "4.jpg"
client.new_fahrzeugschein(image_path)
Alternative you can post an image url to the API with:
image_url = "https://deinautoguide.de/wp-content/uploads/2020/06/Fahrzeugschein-Aventador.jpg"
client.new_fahrzeugschein_url(image_url)
Get Status of Calculation and Results
from mmmint.registration_recognition.sdk import Client
while client.status == Status.STARTED.value:
client.get_fahrzeugschein_status()
time.sleep(2)
if client.status == Status.FINISHED.value:
client.get_fahrzeugschein()
for i in client.fahrzeugschein:
print(i, ": ", client.fahrzeugschein[i])
else:
print("Aborted")
Get the detections:
client.get_detection_bounding_boxes()
client.get_detection_image()
client.get_detection_cropped_image()
Full Example
from mmmint.registration_recognition.sdk import Client, Status
apikey = os.environ.get("API_KEY", "")
# Create an Endpoint with your Credentials
client = Client(apikey)
# Post Fahrzeugschein from local Image
image_path = "4.jpg"
client.new_fahrzeugschein(image_path)
print(client.session)
# Post Fahrzeugschein from URL
image_url = "https://deinautoguide.de/wp-content/uploads/2020/06/Fahrzeugschein-Aventador.jpg"
client.new_fahrzeugschein_url(image_url)
# Or use an existing one
client.get_sessions_finished()[0]["session_id"]
client.session = client.get_sessions_finished()[0]["session_id"]
print(client.session)
# Get Status of Calculation
while client.status == Status.STARTED.value:
client.get_fahrzeugschein_status()
time.sleep(2)
# Get Results of Fahrzeugschein
if client.status == Status.FINISHED.value:
client.get_fahrzeugschein()
for i in client.fahrzeugschein:
print(i, ": ", client.fahrzeugschein[i])
bb = client.get_detection_bounding_boxes()
di = client.get_detection_image()
ci = client.get_detection_cropped_image()
print(bb)
print(di)
print(ci)
client.edit_fahrzeugschein()
Project details
Release history Release notifications | RSS feed
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
Close
Hashes for mmmint_registration_recognition-2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 714b0e0841c5758eaec147a34e82a360cc49ba75d477fd97a1e3010edf238793 |
|
MD5 | 2dfcc420f75874f39908bbb37193891a |
|
BLAKE2b-256 | 3056aa7b297ad3ae648b42511757f96d12a01c6e5acbf9ef3b144dc7f97cdbe8 |
Close
Hashes for mmmint_registration_recognition-2.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 804ca11ba0a14083174e6ba17928d64195c2795b862642be908730fbba7d6194 |
|
MD5 | 4228f7ceff2912d5a59d5ebc61f6115b |
|
BLAKE2b-256 | 9f7c2cbca8a11a72dde693988abe5548eab307c003dea8c8144ba2c32af0a3c4 |
Close
Hashes for mmmint_registration_recognition-2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e4008dd2f2e30659cd2adfabc8e3c3b9fdf2684a9a7270ca3a3f312479a47bd |
|
MD5 | 47a2ccfb73b40506f7016f661c906532 |
|
BLAKE2b-256 | 6391188f5fd84e29be9ef8b4ecce08e1d58aaa3691136f2402bf02775cb047ee |