A library for connecting to remote Robots running TritiumOS
Project description
tritium_remote
A library for interacting with Tritium systems. Hosted docs are here (require login).
- Connects to a running Tritium system via the Gateway node, initially by WebSocket only
- Uses GraphQL to send commands and request data
Implemented in Rust but with bindings to
- Python
This library is currently only published and tested on linux. However the rust crate ought to work on other platforms.
This is only to be used on a trusted local network. The Tritium system will be accessed over LAN without encryption.
APIs
Sequence playback
- Start & stop sequence
Scripting
- Start & stop scripts
- Send and receive arbitrary messages via bidirectional byte stream
Running Examples
The Rust and Python examples use the TRITIUM_AUTH_TOKEN environment variable to get the JWT access token they need.
Pending a proper UI for generating tokens, the best way for now is...
- Log into the Tritium cloud UI
- Connect to your locally-running system
- Go to the "Scripts" page
- Select the API Keys tab
- Click "CREATE AN API KEY"
$ export TRITIUM_AUTH_TOKEN={paste x-tritium-auth contents here}
$ cd tritium-remote/examples/system_info
$ cargo run
Generated GraphQL Code
Rust structures are generated from the GraphQL schemas using graphql-client
Install graphql-client with:
$ cargo install graphql_client_cli
Then to generate Rust code for the playSequence mutation as an example, in the repository root:
$ cd tritium-remote
$ graphql-client generate --schema-path graphql/schemas/tritium.graphql --output-directory src/graphql/mutations graphql/mutations/play_sequence.graphql
License
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file tritium_remote-1.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: tritium_remote-1.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 14.6 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce896b9d3002e1ae22b814191e08968413325329d2a0d5bea01c5a04470b8456 |
|
MD5 | a998972ddeb6ec2a326e31183172fa59 |
|
BLAKE2b-256 | 54b7f17031cf0a08a2ec096247526ba2a85c5560eb9dff8e7d504afebf7e6c62 |
File details
Details for the file tritium_remote-1.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: tritium_remote-1.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 14.6 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1706cbcf341ed02e5d28dcd20d6cee66bb88c16069953abe2c2163c135edecc |
|
MD5 | 14c9b164c36914bf2fb939bba0e1cffd |
|
BLAKE2b-256 | f1a982d20d744ef2d2a2a4079f786d16a187fa36c80709e1371112f4e6163c15 |
File details
Details for the file tritium_remote-1.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: tritium_remote-1.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 14.6 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3f0d2d072c6f87405b390093d62929ef7c2e2cd4bf42de098c2d55d9c7e2266 |
|
MD5 | 7aabcedd353dad895e5f23a11618363e |
|
BLAKE2b-256 | e8b1a6ce7b24b39e28b8a4e34a33c25eddf672e14bec8fa0d341c1ff9e3920c4 |
File details
Details for the file tritium_remote-1.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: tritium_remote-1.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 14.6 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 781980e26148f8e52623e21d41f6ab0292cd217ff7ec6d1befc3ceaeab658ca8 |
|
MD5 | 578b4d3f120026bff0e84263dacf5a14 |
|
BLAKE2b-256 | c683f9f919cbbb3a2a3deb08cd703a944755e48e5d18d31d53167cd6948bda0b |
File details
Details for the file tritium_remote-1.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: tritium_remote-1.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 14.5 MB
- Tags: CPython 3.7m, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ae6bc1aef9517ce6f77215f8b573be772ed404c9d5de03eb600ced8216efc14 |
|
MD5 | 50038212dbab488d5c63179b98605753 |
|
BLAKE2b-256 | 0a65b16608a58df5f3300b541fd38e134b8c9991dd89ec48d9898d7598618ed2 |