An interface to execute Fahrzeugschein API commands using Python
Project description
Registration Recognition Python SDK
Registration Recognition by mmmmint.ai
Visit mmmint.ai/solutions/fahrzeugschein.
1. Handle your credentials
Create an environment variable to store the api key - reach out to info@mrfiktv.com.
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
recognition_api = Client(apikey)
Post fahrzeugschein from local Image
image_path = "4.jpg"
recognition_api.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"
recognition_api.new_fahrzeugschein_url(image_url)
Get Status of Calculation and Results
from mmmint_registration_recognition.sdk import Status
while recognition_api.status == Status.STARTED.value:
recognition_api.get_fahrzeugschein_status()
time.sleep(2)
if recognition_api.status == Status.FINISHED.value:
recognition_api.get_fahrzeugschein()
for i in recognition_api.fahrzeugschein:
print(i, ": ", recognition_api.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 Distribution
Close
Hashes for mmmint_registration_recognition-1.3.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2def5c1c2a98cfb38ebcaae158d3ac0e7ca7cbc9514383118d19d16c78f73053 |
|
MD5 | 6be757fcad6c2894c632a6464c9c38ea |
|
BLAKE2b-256 | e15f8f84a63523755392ecfa8b83b24353b007d098b96984825e356bb537ac90 |
Close
Hashes for mmmint_registration_recognition-1.3.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f1cbe3ebc09342e26eef814f48f284fbc118524282d0f8b204802599449da67 |
|
MD5 | 53ae0b592fbd6d03f035cc830340a587 |
|
BLAKE2b-256 | bec0a49c99a3096c9e314f3b00e9702c5f1d7a9d8eded52a4c1c75be11b6bf44 |