Python client for the Py-Ritone Baritone bridge
Project description
pyritone
pyritone is the Python client for the Py-Ritone Fabric bridge.
Install
pip install pyritone
Beginner usage
from pyritone import PyritoneClient
with PyritoneClient() as client:
dispatch = client.goto(100, 70, 100)
task_id = dispatch.get("task_id")
if task_id:
terminal = client.wait_for_task(task_id)
print(terminal["event"])
Command API
All top-level Baritone v1.15.0 commands are exposed as Python methods on:
PyritoneClient(sync)AsyncPyritoneClient(async)
Each command returns immediate dispatch info:
command_textrawbridge response- optional
task_id - optional
accepted
Command aliases are exposed too (qmark, stop, wp, etc). Full generated reference:
python/docs/baritone-commands.md
Settings API
You can control Baritone settings through a settings namespace.
from pyritone import PyritoneClient
with PyritoneClient() as client:
client.settings.allowSprint = True
client.settings.allowBreak = False
print(client.settings.allowSprint.get())
print(client.settings.allowSprint.toggle())
print(client.settings.allowSprint.reset())
Async style:
from pyritone import AsyncPyritoneClient
client = AsyncPyritoneClient()
await client.connect()
try:
await client.settings.allowSprint.set(True)
await client.settings.allowSprint.get()
finally:
await client.close()
Low-level API still available
execute("...")cancel()ping()status_get()next_event()wait_for_task(task_id)
Zero-setup discovery
By default, pyritone discovers bridge details from:
<minecraft>/config/pyritone_bridge/bridge-info.json
Override priority:
- Explicit constructor args
- Environment variables (
PYRITONE_BRIDGE_INFO,PYRITONE_TOKEN,PYRITONE_HOST,PYRITONE_PORT) - Default bridge info file
CLI
pyritone ping
pyritone status
pyritone exec "goto 100 70 100"
pyritone cancel
pyritone events
Regenerate command wrappers/docs
python tools/generate_baritone_commands.py
End-to-End Dev Test
- Start Minecraft dev client from the mod folder:
cd ..\mod
.\gradlew.bat devClient
- Join a world.
- Run one of the example scripts:
cd ..\python
python example_sync.py
python example_async.py
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
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
File details
Details for the file pyritone-0.1.1.tar.gz.
File metadata
- Download URL: pyritone-0.1.1.tar.gz
- Upload date:
- Size: 31.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b743da461b40259997c6728761a060eadca180d2f2480ada261e2532eb368e04
|
|
| MD5 |
14951ecd69cbfe6bfade04931b7da39a
|
|
| BLAKE2b-256 |
f563cf728ce43e97f5c6eba649fef495b96a9336a10773cb7b1ebeff4f7bbbf8
|
Provenance
The following attestation bundles were made for pyritone-0.1.1.tar.gz:
Publisher:
publish.yml on GSstarGamer/Py-Ritone
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyritone-0.1.1.tar.gz -
Subject digest:
b743da461b40259997c6728761a060eadca180d2f2480ada261e2532eb368e04 - Sigstore transparency entry: 976339502
- Sigstore integration time:
-
Permalink:
GSstarGamer/Py-Ritone@a290a4f62b5422ef1bd3bcf9647ed549ab71d354 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/GSstarGamer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a290a4f62b5422ef1bd3bcf9647ed549ab71d354 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyritone-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pyritone-0.1.1-py3-none-any.whl
- Upload date:
- Size: 30.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f8c864e5e51b8064c88f895afaff8b0ddc4efaa39ff4536be108fb061814001
|
|
| MD5 |
b4bb57363856ec4000ec6f276b191fc4
|
|
| BLAKE2b-256 |
6215291ab01d912d4849f3b156e53c46bcba4a3060e724d80bad9d74c0e5aa25
|
Provenance
The following attestation bundles were made for pyritone-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on GSstarGamer/Py-Ritone
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyritone-0.1.1-py3-none-any.whl -
Subject digest:
0f8c864e5e51b8064c88f895afaff8b0ddc4efaa39ff4536be108fb061814001 - Sigstore transparency entry: 976339503
- Sigstore integration time:
-
Permalink:
GSstarGamer/Py-Ritone@a290a4f62b5422ef1bd3bcf9647ed549ab71d354 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/GSstarGamer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a290a4f62b5422ef1bd3bcf9647ed549ab71d354 -
Trigger Event:
push
-
Statement type: