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)
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
oahl-1.0.1.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-1.0.1-py3-none-any.whl
(3.3 kB
view details)
File details
Details for the file oahl-1.0.1.tar.gz.
File metadata
- Download URL: oahl-1.0.1.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 |
66f0268b23e0ec0a5156e6b6136f184dcd1d0a8990a41da8421671bebd491ac0
|
|
| MD5 |
43de70bbb866514afb0735865faa5a92
|
|
| BLAKE2b-256 |
69a90b9dec9384898d1351afc3788157f249afa44e227e66d9b4215243c942aa
|
File details
Details for the file oahl-1.0.1-py3-none-any.whl.
File metadata
- Download URL: oahl-1.0.1-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 |
c3a7e5ae74c3f2db0b321ada9eac1b84650b86f1ff58ef80ad1e6bae16980641
|
|
| MD5 |
496ac5758867e1c0528c5b3769e1191b
|
|
| BLAKE2b-256 |
f2acca728a25302aae1c2e333f253aa10e4becff6c1f9e749f9394bb25e5d846
|