Python SDK for Open Agent Hardware Layer (OAHL)
Project description
OAHL Python SDK
The Python SDK for the Open Agent Hardware Layer (OAHL).
Installation
pip install oahl
Development
If you are working on the SDK locally:
pip install -e ./sdk-python
Usage
Local Client
from oahl import OahlClient
client = OahlClient("http://localhost:3000")
# List devices
devices = client.get_devices()
# Start a session
session = client.start_session("my-device-id")
# Execute a capability
result = client.execute(session['id'], "camera.capture", {"resolution": "1080p"})
# Stop session
client.stop_session(session['id'])
Cloud Client
from oahl import CloudClient
client = CloudClient(agent_api_key="your-api-key")
# Query capabilities across the network
capabilities = client.get_capabilities({"q": "camera"})
# Request a session
session_req = client.request_session({"capability": "camera.capture"})
session_id = session_req['session_id']
# Execute
result = client.execute(session_id, {
"capability": "camera.capture",
"params": {"resolution": "720p"}
})
# Stop
client.stop_session(session_id)
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
oahl-0.1.2.tar.gz
(3.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
oahl-0.1.2-py3-none-any.whl
(3.3 kB
view details)
File details
Details for the file oahl-0.1.2.tar.gz.
File metadata
- Download URL: oahl-0.1.2.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5e81f68feb9d7af00e3d86ef4736371a48f18730e02e9fc49cc384948f9a999
|
|
| MD5 |
f445453c3b028eb1e5e81c2d70bb21ff
|
|
| BLAKE2b-256 |
33fe6540ae005422e9874225fbf55eb4d98d31e63f829567a696ed483b0cfc7a
|
File details
Details for the file oahl-0.1.2-py3-none-any.whl.
File metadata
- Download URL: oahl-0.1.2-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a915449c25d92ec0ff4ec16a00935a77144998261ba62b475382893f696505d6
|
|
| MD5 |
b4e1bec97c4fe19c46f8b93051ea9cd0
|
|
| BLAKE2b-256 |
f05914bd47ae63ceea9f653682bebed3a4bf4c45f934b942a31ae3b81f21b465
|