Metadata-Version: 2.4
Name: arkitekt-mesh
Version: 0.1.0
Classifier: Development Status :: 3 - Alpha
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Rust
Classifier: Topic :: System :: Networking
Classifier: Typing :: Typed
License-File: LICENSE
License-File: LICENSE-THIRD-PARTY
Summary: Run an Arkitekt mesh node in-process: our own Tailscale-compatible client, with a local HTTP proxy and a TURN relay into a deployment's mesh
Keywords: arkitekt,mesh,tailscale,wireguard,turn
Home-Page: https://github.com/arkitektio/arkirust
Author-email: jhnnsrs <jhnnsrs@gmail.com>
License-Expression: MIT
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://github.com/arkitektio/arkirust
Project-URL: Issues, https://github.com/arkitektio/arkirust/issues
Project-URL: Repository, https://github.com/arkitektio/arkirust

# arkitekt-mesh (Python)

Runs an Arkitekt mesh node inside the Python process. It uses
[`arkitekt-mesh`](https://github.com/arkitektio/arkirust/tree/main/crates/mesh), our own Tailscale-compatible client in Rust,
the same node the Rust client and `arkitekt-meshd` run. `fakts` uses it
when it is installed; see `MeshOptions.backend`.

```python
from arkitekt_mesh import Node

node = await Node.start("~/.local/state/arkitekt/mesh/my-app-native", "my-app",
                        control_url="https://mesh.example", auth_key="tskey-…")
node.proxy_url                  # "http://127.0.0.1:41234": HTTP proxy into the mesh
turn = await node.turn()        # TURN relay on 127.0.0.1 for WebRTC (LiveKit) media
local = await node.forward("livekit", 7880)   # "127.0.0.1:P" -> livekit:7880 on the mesh
node.close()
```

The node is joined once with an auth key; later starts in the same state
directory need neither the key nor the control url. Errors are subclasses of
`MeshError`: `NeedsLogin`, `Locked`, `Refused` and `Timeout`.

