Skip to main content

Python client for Carmen Cloud by Adaptive Recognition. Efficiently read license plates, recognize vehicle details, and process container, railway wagon, and US DOT codes.

Project description

Carmen Cloud Client by Adaptive Recognition

Python client for Carmen Cloud by Adaptive Recognition. This unified library provides you with access to both the Vehicle API and the Transportation & Cargo API. You can also use it to automate configuring event storage and registering hooks via the Storage & Hook API.

Supported API Versions

  • Vehicle API: v1.4.1
  • Transportation & Cargo API: v1.0.1
  • Storage & Hook API: current latest version

🛠️ How to Install

pip install carmen-cloud-client

🚀 Usage

You can utilize either the Vehicle API or the Transportation & Cargo API based on your needs.

🚗 Vehicle API

from carmen_cloud_client import VehicleAPIClient, VehicleAPIOptions, SelectedServices, Locations

options = VehicleAPIOptions(
    api_key="<YOUR_API_KEY>",
    services=SelectedServices(anpr=True, mmr=True),
    input_image_location=Locations.Europe.Hungary,
    cloud_service_region="EU"
)
client = VehicleAPIClient(options)

response = client.send("./car.jpg")
print(response)

🚚 Transportation & Cargo API

from carmen_cloud_client import TransportAPIClient, TransportAPIOptions, CodeType

options = TransportAPIOptions(
    api_key="<YOUR_API_KEY>",
    type=CodeType.ISO,
    cloud_service_region="EU"
)
client = TransportAPIClient(options)

response = client.send("./container.jpg")
print(response)

📦 Storage & Hook API

from carmen_cloud_client import (
    APIName,
    CreateHookRequest,
    EventFilters,
    StorageAndHookAPIClient,
    StorageAndHookAPIOptions,
    StorageStatusRequest,
    UpdateHookRequest,
)

options = StorageAndHookAPIOptions(
    api_key="<YOUR_API_KEY>",
    cloud_service_region="EU"
)
client = StorageAndHookAPIClient(options)

# List Events
filters = EventFilters(limit=5)
events = client.get_events(APIName.Vehicle, filters)
print("events:", events)

# Get Storage Status
status = client.get_storage_status()
print("status:", status)

# Update Storage Status
apis = StorageStatusRequest(vehicle=True, transport=False)
updated_status = client.update_storage_status(apis)
print('updatedStatus:', updated_status)

# Create Hook
hook = CreateHookRequest(
    hookUrl='http://request-logger.botond.online',
    apis=Apis(vehicle=True, transport=False)
)
created_hook = client.create_hook(hook)
print('createdHook:', created_hook)

# List Hooks
hooks = client.get_hooks()
print('hooks:', hooks)

# Get Hook
hook = client.get_hook('https://your-domain.com/your-hook-path')
print('hook:', hook)

# Update Hook
updated_hook = client.update_hook(
    'https://your-domain.com/your-hook-path',
    UpdateHookRequest(vehicle=True, transport=True)
)
print('updatedHook:', updated_hook)

# Delete Hook
client.delete_hook('https://your-domain.com/your-hook-path')

🔧 Development

For more information about developing and contributing to this project, see DEVELOPMENT.md.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

carmen_cloud_client-1.3.1.tar.gz (8.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

carmen_cloud_client-1.3.1-py3-none-any.whl (8.4 MB view details)

Uploaded Python 3

File details

Details for the file carmen_cloud_client-1.3.1.tar.gz.

File metadata

  • Download URL: carmen_cloud_client-1.3.1.tar.gz
  • Upload date:
  • Size: 8.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for carmen_cloud_client-1.3.1.tar.gz
Algorithm Hash digest
SHA256 995d5ce4bcc35abca6909fd83e6fe6cbb990ce893dbd66bb4a06cfd864f80632
MD5 61d197d472ce7a88a7e76ce977927b21
BLAKE2b-256 18b52809a223c8d71b28d89cd840c7989082e368b23b4c62ec639fe39af582d8

See more details on using hashes here.

File details

Details for the file carmen_cloud_client-1.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for carmen_cloud_client-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bd15a77eeacc0aed0ca6bc55a266f07bf7ca20e80602f9ffaebb5ce8cecd2b56
MD5 c2387e007dda3431ffd37153f8ac5958
BLAKE2b-256 6263f1f691002a47e6277a82a4834cc9f540ae80dbce90c66f0604262f247986

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page