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
Fastest Working Async Example
import asyncio
from pyritone import Client
async def main() -> None:
client = Client()
await client.connect()
try:
print(await client.ping())
dispatch = await client.build_file("schematics/base.schem", 100, 70, 100)
print(dispatch)
finally:
await client.close()
asyncio.run(main())
Demos
The quick examples above are intentionally small.
For full, recordable feature walkthroughs, see:
python/demos/README.md
Run from repo root:
python -m pip install -e ./python
cd python
python demos/01_connect_discovery.py
Docs
- Full docs index:
python/docs/index.md - Quickstart:
python/docs/quickstart.md - Async client guide:
python/docs/async-client.md - Legacy import migration:
python/docs/migration-from-legacy-aliases.md - Settings API:
python/docs/settings-api.md - Tasks/events/waiting:
python/docs/tasks-events-and-waiting.md - Errors/troubleshooting:
python/docs/errors-and-troubleshooting.md - CLI usage:
python/docs/cli.md - Command docs:
python/docs/commands/navigation.mdpython/docs/commands/world.mdpython/docs/commands/build.mdpython/docs/commands/control.mdpython/docs/commands/info.mdpython/docs/commands/waypoints.mdpython/docs/commands/aliases.md
- Raw Baritone appendix:
python/docs/baritone-commands.md - Typed parity matrix:
python/docs/baritone-typed-parity.md - Release parity/debt report:
python/docs/release-parity-fallback-report.md
Public API Map
- Clients:
Client(primary async surface)- Legacy aliases (
PyritoneClient,AsyncPyritoneClient) are compatibility-only; useClientin docs and new code.
- Low-level methods:
ping,status_get,status_subscribe,status_unsubscribe,execute,cancel,next_event,wait_for,wait_for_taskexecute(...)is an advanced raw command path; prefer generated command wrappers and typed APIs in new code.- Typed API substrate:
api_metadata_get,api_construct,api_invoke
- Typed Baritone wrappers:
client.baritoneroot namespace over Wave 4 typed calls- goal constructors under
client.baritone.goals.* - typed process/behavior wrappers (
custom_goal_process,mine_process,get_to_block_process,explore_process,pathing_behavior) - Wave 7 package wrappers:
- cache (
world_provider,world_scanner,waypointhelpers) - selection (
selection_manager,SelectionRef) - command (
command_manager, providercommand_system) - schematic (
schematic_system,fill_schematic,composite_schematic, mask helpers) - utils (
player_context,input_override_handler, enum/position helpers) - event (
game_event_handler,EventBusRef)
- cache (
- minecraft identifier constants accepted by typed wrappers:
from pyritone.minecraft import blocks, items, entities- e.g.
await mine_process.mine_by_name(64, blocks.DIAMOND_ORE)
- task-producing typed methods wait by default;
_dispatchreturnsTypedTaskHandle
- Command wrappers:
- All top-level Baritone commands exposed as methods.
- Local schematic helpers:
build_file(path, *coords, base_dir=None)build_file_wait(path, *coords, base_dir=None)
- Settings namespace:
await client.settings.allowPlace.set(True)
- State/task cache:
client.state.snapshot,client.task.id,client.task.state,await client.task.wait()
- Typed remote references:
RemoteRef(ref_id=..., java_type=...)values returned byapi_construct/api_invoke
Compatibility Policy (v0.2.x)
PyritoneClientandAsyncPyritoneClientremain exported as temporary compatibility aliases.- Generated sync command shim modules (
python/src/pyritone/commands/sync_*.py) remain for migration cushioning. - Both compatibility surfaces are soft-deprecated and planned for removal no earlier than
v0.3.0. - Keep new docs/examples on
Client+ async command/typed APIs; use rawexecute(...)only for advanced/interop cases.
Auto-Discovery (Zero-Setup)
By default, pyritone discovers bridge metadata from:
<minecraft>/config/pyritone_bridge/bridge-info.json
Override precedence:
- Explicit constructor args
- Environment variables:
PYRITONE_BRIDGE_INFO,PYRITONE_TOKEN,PYRITONE_HOST,PYRITONE_PORT - Auto-discovered bridge info file
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.2.0.tar.gz.
File metadata
- Download URL: pyritone-0.2.0.tar.gz
- Upload date:
- Size: 89.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
574cd25607abed73ec55323d58d4189ed1196d985f3d478f60fb47518938365c
|
|
| MD5 |
0636261d8fc9e7d39472fe12404b0615
|
|
| BLAKE2b-256 |
8835cc716908dc91965d4d830e49e5dfb813096ff2d235576a11f420be96bab2
|
Provenance
The following attestation bundles were made for pyritone-0.2.0.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.2.0.tar.gz -
Subject digest:
574cd25607abed73ec55323d58d4189ed1196d985f3d478f60fb47518938365c - Sigstore transparency entry: 983009536
- Sigstore integration time:
-
Permalink:
GSstarGamer/Py-Ritone@ffc9a4a53fc4e2c6523871bce70dfaf93f673b99 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/GSstarGamer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ffc9a4a53fc4e2c6523871bce70dfaf93f673b99 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyritone-0.2.0-py3-none-any.whl.
File metadata
- Download URL: pyritone-0.2.0-py3-none-any.whl
- Upload date:
- Size: 61.3 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 |
d2e1350292c5688b14c62244bf149356cc86ccbcb0ade985cd453475fa83437f
|
|
| MD5 |
1381554269ea6d35b7d5cacb7eb4449f
|
|
| BLAKE2b-256 |
58348a7f563c49eed10319fa3f7be1f4afd73cf8f6d28ff5a9a3187ddd60debf
|
Provenance
The following attestation bundles were made for pyritone-0.2.0-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.2.0-py3-none-any.whl -
Subject digest:
d2e1350292c5688b14c62244bf149356cc86ccbcb0ade985cd453475fa83437f - Sigstore transparency entry: 983009564
- Sigstore integration time:
-
Permalink:
GSstarGamer/Py-Ritone@ffc9a4a53fc4e2c6523871bce70dfaf93f673b99 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/GSstarGamer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ffc9a4a53fc4e2c6523871bce70dfaf93f673b99 -
Trigger Event:
push
-
Statement type: