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.2.0.tar.gz (8.4 MB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for carmen_cloud_client-1.2.0.tar.gz
Algorithm Hash digest
SHA256 e871bfe492c9d7a1bdb390369a550358b8e15f9d6cd67cfed9e0cbab207a5f7a
MD5 11b315904dc66e85fa574f98d0c1edc7
BLAKE2b-256 04726da5e2fb28b2f454739fd92a4fea67f12063be32cd33a18fb376c6cc193b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for carmen_cloud_client-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8414a587e81d4246ad4c402292f3d4f602957982b6cb1608f1d184d6c526e44f
MD5 87ce7eb837fe8a0dcec4a2a63a79746f
BLAKE2b-256 efd35d243b6d5e64bf01fe7edc94eb519e426c3ac58bd1a47380ff4b63cbb7e4

See more details on using hashes here.

Supported by

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