Thin Python wrapper for the Skyffla machine API
Project description
Skyffla Python Wrapper
This package is a thin async wrapper over skyffla host|join <room> machine --json.
Install
cd wrappers/python
uv sync
The wrapper expects a skyffla binary in PATH. Override it with SKYFFLA_BIN
or the binary= argument when starting a room.
Versioning is split across two layers:
- machine protocol compatibility follows
docs/versioning.mdanddocs/machine-protocol.md: the wrapper requires the same machine protocol major version and tolerates additive minor changes - release pairing is stricter for published packages: by default, the wrapper
also checks that the spawned
skyfflabinary has the exact same release version as the Python package
Set SKYFFLA_SKIP_VERSION_CHECK=1 only when you intentionally want to bypass
the release-version pairing check. It does not bypass the machine protocol
compatibility check.
Async Example
import asyncio
from skyffla import Room
async def main() -> None:
async with await Room.join("warehouse", name="python-agent") as room:
await room.wait_for_welcome()
await room.send_chat("all", "hello from python")
print(await room.wait_for_chat())
asyncio.run(main())
Sync Example
from skyffla import SyncRoom
with SyncRoom.join("warehouse", name="python-agent") as room:
room.wait_for_welcome()
room.send_chat("all", "hello from sync python")
print(room.wait_for_chat())
For a minimal runnable script, see examples/simple_chat.py.
Same machine or LAN:
uv run python examples/simple_chat.py host demo-room --local
uv run python examples/simple_chat.py join demo-room --local
Or let both sides use join and allow the first process to promote itself to
host:
uv run python examples/simple_chat.py join demo-room --local
uv run python examples/simple_chat.py join demo-room --local
examples/simple_chat.py is now a minimal interactive chat client. Start one
host and one join process, then type lines in either terminal. Use /quit to
exit.
For --local, start the host first and give local discovery a few seconds to
advertise before starting the join side. If the join side promotes itself to
host, use --server with a local skyffla-rendezvous for deterministic
same-machine testing.
Custom rendezvous server:
uv run python examples/simple_chat.py host demo-room --server http://127.0.0.1:8080
uv run python examples/simple_chat.py join demo-room --server http://127.0.0.1:8080
Tests
cd wrappers/python
uv run pytest
Project details
Release history Release notifications | RSS feed
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 skyffla-1.1.1.tar.gz.
File metadata
- Download URL: skyffla-1.1.1.tar.gz
- Upload date:
- Size: 35.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8aaad5b8d132ae077801fb44f08a98ed607a24727c5641222dfd52cb3958706
|
|
| MD5 |
51d8813949a760347db8659460aa76fc
|
|
| BLAKE2b-256 |
176353241204ce7f245e4fee712c3f5e4fe307cb618b07b33f8a79bac47b9ff4
|
Provenance
The following attestation bundles were made for skyffla-1.1.1.tar.gz:
Publisher:
python-package.yml on skyffla/skyffla
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
skyffla-1.1.1.tar.gz -
Subject digest:
d8aaad5b8d132ae077801fb44f08a98ed607a24727c5641222dfd52cb3958706 - Sigstore transparency entry: 1107824344
- Sigstore integration time:
-
Permalink:
skyffla/skyffla@b25df0195c7a9c028ecbefb7f5c8a5deef898227 -
Branch / Tag:
refs/tags/v1.1.1 - Owner: https://github.com/skyffla
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-package.yml@b25df0195c7a9c028ecbefb7f5c8a5deef898227 -
Trigger Event:
push
-
Statement type:
File details
Details for the file skyffla-1.1.1-py3-none-any.whl.
File metadata
- Download URL: skyffla-1.1.1-py3-none-any.whl
- Upload date:
- Size: 10.9 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 |
c94294b06c029208209787a3e9f80dd28f5fca0533c745a5df325715ed636464
|
|
| MD5 |
d696bc74155bfef2b8656ff67fcaee64
|
|
| BLAKE2b-256 |
2fb39e62ee1b7a0347b0c9d4f73c2e1cf21dd010164a4affff03927cae9e4dff
|
Provenance
The following attestation bundles were made for skyffla-1.1.1-py3-none-any.whl:
Publisher:
python-package.yml on skyffla/skyffla
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
skyffla-1.1.1-py3-none-any.whl -
Subject digest:
c94294b06c029208209787a3e9f80dd28f5fca0533c745a5df325715ed636464 - Sigstore transparency entry: 1107824350
- Sigstore integration time:
-
Permalink:
skyffla/skyffla@b25df0195c7a9c028ecbefb7f5c8a5deef898227 -
Branch / Tag:
refs/tags/v1.1.1 - Owner: https://github.com/skyffla
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-package.yml@b25df0195c7a9c028ecbefb7f5c8a5deef898227 -
Trigger Event:
push
-
Statement type: