openhorizon-studio
OpenHorizon Studio's client for Python, and its command line, oh-studio: your team's robots and their takes,
read and marked through OpenHorizon's relay with an API key.
uv tool install openhorizon-studio # the oh-studio command
pip install openhorizon-studio # or the library, into your own environment
It is built for Apple Silicon Macs (macOS 11 or newer) and Python 3.10 to 3.14.
It needs Python 3.10 or newer and nothing else: the standard library only. Recording a take on a practice
robot (below) needs the session extra, which adds websockets:
uv tool install 'openhorizon-studio[session]'
A key
A team admin makes an API key on Account, API keys. It is shown once. Keep it for this user:
oh-studio login # asks for the key, checks it with the relay, keeps it 0600
Or set OH_STUDIO_KEY, or pass key= to Studio. A key goes to https://relay.openhorizon.so (or
OH_STUDIO_RELAY) over https only, and is never printed, logged or put in an error.
A proxy: HTTPS_PROXY for the relay (else https_proxy), HTTP_PROXY for an http address elsewhere, and
NO_PROXY to leave hosts out (*, a host and its subdomains, .domain, an address or a range, each with an
optional port). The proxy sees only where to connect, never the key. This computer (localhost, 127.0.0.1, [::1]) is
never asked through one, whatever is set, and the system's own proxy settings are not read. Only an http:// proxy
is used; any other is refused in words, so a program never goes straight where its network asked for a proxy.
The command line
oh-studio robots # the robots your team reaches
oh-studio takes g1-01 --to-check # takes nobody has marked yet, newest first
oh-studio take g1-01 e1700000000000-pick_cube # one take (--json: whole, ticks too)
oh-studio good g1-01 e1700000000000-pick_cube
oh-studio wrong g1-01 e1700000000001-pick_cube dropped_object
oh-studio frame g1-01 e1700000000000-pick_cube cam_high 0 -o picture.jpg
oh-studio scorecard g1-01
oh-studio stop g1-01 # press STOP; it never clears it
oh-studio session start --robot http://localhost:9090 --task "pick cube" --seconds 5 # a practice take
oh-studio takes http://localhost:9090 # a practice robot on this computer: no relay, no key
A robot is named by its id or its name, as oh-studio robots lists them. Every command takes --json. A failure
exits 1 with its cause and what to do on stderr (with --json, as an object with error, fix, status and
code).
The library
from openhorizon_studio import Studio, StudioError, TAKE_REASONS, checked
studio = Studio() # the key from OH_STUDIO_KEY or `oh-studio login`
robot = studio.robot("g1-01")
for take in robot.takes():
if not checked(take):
print(take["id"], take.get("skill"))
robot.good("e1700000000000-pick_cube")
robot.wrong("e1700000000001-pick_cube", "dropped_object") # one of TAKE_REASONS
try:
robot.take("e1-nothing")
except StudioError as e:
print(e.status, e.code, e.cause, e.fix)
Answers are the robot's own, as its API documents them, never reshaped.
robot.frame(take, camera, tick) gives the JPEG's bytes; a picture cut short on the way is an error, never a picture.
Robot.local("http://localhost:9090") asks a robot's runtime straight, with no relay and no key.
A take from a program
Asked straight with no key, a program records a take only on a practice robot on this computer (openhorizon serve --g1 --loopback), never a real one. Before anything is sent, the address must be localhost,
127.0.0.1 or [::1], and the robot's first message must say it is a practice robot that records takes; a robot that
does not say so is sent nothing.
Through the relay, with a team's operator key, a program records a take that it steers, on a robot started with
--relay-programs and --execute (--relay-drive lets people steer, never a program):
Studio().robot("g1-01").session("pick cube"). The relay and the robot decide: a
take that would not steer is refused, and one that steered nothing is not kept. For about the first second the
relay holds steering while it measures the delay (take.held says why), and every command passes the same
round-trip gate as the page's. A key revoked, a plan ended or a robot removed mid-take closes the socket, and the
robot ends the take.
from openhorizon_studio import Robot
robot = Robot.local("http://localhost:9090")
with robot.session("pick cube") as take:
take.walk(2.0, vx=0.5) # 20 commands a second for 2 s, on this thread, then a zero
take.drive(wz=-0.3) # ONE command: the robot zeroes it 0.3 s later unless it is sent again
print(take.id) # the kept take; leaving the block with an error keeps it as abandoned
Each axis runs from -1 to 1, and the axes are the robot's own (take.axes). Nothing in the client sends from a
thread or a timer, so a program that hangs goes quiet and the robot stops by itself. take.stop() presses STOP; a
STOP not confirmed also closes the take's socket, so the robot ends the take. oh-studio session start records a
take steering nothing, on a practice robot here only; Ctrl-C ends it early, kept as abandoned.
STOP
oh-studio stop ROBOT and robot.stop() press STOP and return the robot's own answer. Neither clears it: that is
a person's who has looked, on the page.
A program's STOP is never anyone's only stop. A person's STOP on the page goes straight to the robot. A key's is
checked by the relay's key service first; the relay holds its answer a while after the key last listed
robots, and once that has lapsed, a key service out of reach (503) or too many keys being checked (429) means the
STOP is refused. A STOP that was refused or not answered raises StudioError ("STOP not confirmed"), and one that
could not be sent ("STOP was not sent": no key, a robot name not found); its fix says to press STOP on the page
and keep the robot's own stop at hand. That is a G1's handheld remote, the program that drives an OpenArm, or the
person beside an Asimov.
What a key cannot do
Clear STOP, open a headset's link or make keys. Those are a person's, signed in on the page. A key lists robots,
reads takes, their pictures and the scorecard, marks takes, and presses STOP. An operator key may also steer a take
of its own through the relay, on a robot started with --relay-programs and --execute (above).
Licence
Source-available, not open source: the OpenHorizon Personal Use License 1.0 (LICENSE in this folder). An individual may use it for their own personal purposes. A company, a school or university, a research lab or any other organisation needs a written licence from OpenHorizon Labs; a team on a paid OpenHorizon Studio plan has one for its own programs and the robots paired to it. See COMMERCIAL-LICENSE.md at the repository's root.
Metadata
Release files for openhorizon-studio 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| openhorizon_studio-0.1.0-cp314-cp314-macosx_11_0_arm64.whl | CPython 3.14 | CPython 3.14 | macOS 11.0+ ARM64 | Details for openhorizon_studio-0.1.0-cp314-cp314-macosx_11_0_arm64.whl |
| openhorizon_studio-0.1.0-cp313-cp313-macosx_11_0_arm64.whl | CPython 3.13 | CPython 3.13 | macOS 11.0+ ARM64 | Details for openhorizon_studio-0.1.0-cp313-cp313-macosx_11_0_arm64.whl |
| openhorizon_studio-0.1.0-cp312-cp312-macosx_11_0_arm64.whl | CPython 3.12 | CPython 3.12 | macOS 11.0+ ARM64 | Details for openhorizon_studio-0.1.0-cp312-cp312-macosx_11_0_arm64.whl |
| openhorizon_studio-0.1.0-cp311-cp311-macosx_11_0_arm64.whl | CPython 3.11 | CPython 3.11 | macOS 11.0+ ARM64 | Details for openhorizon_studio-0.1.0-cp311-cp311-macosx_11_0_arm64.whl |
| openhorizon_studio-0.1.0-cp310-cp310-macosx_11_0_arm64.whl | CPython 3.10 | CPython 3.10 | macOS 11.0+ ARM64 | Details for openhorizon_studio-0.1.0-cp310-cp310-macosx_11_0_arm64.whl |
Total release size: 1.7 MB
Release files / openhorizon_studio-0.1.0-cp314-cp314-macosx_11_0_arm64.whl
| Download URL | openhorizon_studio-0.1.0-cp314-cp314-macosx_11_0_arm64.whl |
|---|---|
| Size | 362.5 kB |
| Tags | CPython 3.14 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
221ed4837b7c6bd6f19041b021713b3458ae5284f4e5b3bf25db965ee41d7360
|
|
BLAKE2b-256 checksum How to use checksums |
9639922efbb0b7e07cce098ea2c8e87bdd54ed72f972599c7faa832fe8cfa076
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / openhorizon_studio-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | openhorizon_studio-0.1.0-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 351.8 kB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
ac8a7c04dbd4b7e71c73a1a2a6fbdae366a8343a8d1cfcebe714983e21bf99f7
|
|
BLAKE2b-256 checksum How to use checksums |
b08b62055dea6907935bb16f8827bc32eb36bc5f14248fbda3fa58da8db5dca8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / openhorizon_studio-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | openhorizon_studio-0.1.0-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 345.8 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
58ba169f2b86a79d1d2f0fd93b8e044f6316c012d27175d71c602f90251a655b
|
|
BLAKE2b-256 checksum How to use checksums |
6c7a7bb712ba91b70a620ea6d3cab51ff9f34c7023918441b2adae3819b6c8cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / openhorizon_studio-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | openhorizon_studio-0.1.0-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 336.1 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
d961b0ded372754641c5e7f4a0268151983d254a5122a383e6c28d9cb6833765
|
|
BLAKE2b-256 checksum How to use checksums |
a66651552bd74d1f755a7f9a6e2d644e250403948ce8175f2f5212bf724a17b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / openhorizon_studio-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | openhorizon_studio-0.1.0-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 326.0 kB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
49954cff88e5f50834eca7e045daab5f91677c76e86c271315ad72e52440a59e
|
|
BLAKE2b-256 checksum How to use checksums |
7a66f0ab2ce97806c00c002bb2ddb370daba56515b4a4846bce0aec2d6938791
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for openhorizon-studio 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.