capos (Python)
Host-side Python bindings for capOS, a research capability operating system where every resource is a typed Cap'n Proto capability.
This package is the working base for the host-side capOS SDK: it binds capOS's
in-repo host remote-session client, which speaks the CapSet forwarding protocol
that a running capOS exposes over its userspace network stack. That protocol is
the concrete shape of the capos Rust crate's reserved remote transport,
surfaced here in Python. Today it covers connecting, authenticating, listing the
forwarded CapSet, and reading session metadata; more of the typed capability
surface follows.
Install
pip install capos
Prebuilt wheels target Linux x86_64, CPython 3.9+ (abi3). On other platforms pip falls back to the source distribution, which builds the Cap'n Proto schema and therefore needs the pinned Cap'n Proto compiler on the build host.
Quickstart against a live capOS
The hello-world is a real conversation with a running kernel, not a canned
string. Bring up a capOS instance that serves the remote-session gateway on
guest port 2327 over its userspace network stack — the capOS repo proves this
path with make run-remote-session-capset-interop, and
examples/hello_live.py documents how to boot a VM
that forwards host 127.0.0.1:2327 to it — then:
$ python examples/hello_live.py --host 127.0.0.1 --port 2327
connecting to capOS at 127.0.0.1:2327 ...
logged in as operator (profile operator)
capOS says: _ __ __ __
| | / /__ / /________ ____ ___ ___ / /_____
| | /| / / _ \/ / ___/ __ \/ __ `__ \/ _ \ / __/ __ \
| |/ |/ / __/ / /__/ /_/ / / / / / / __/ / /_/ /_/ /
|__/|__/\___/_/\___/\____/_/ /_/ /_/\___/ \__/\____/
... (live welcome banner) ...
forwarded capabilities:
- session (interface 0x80b87169c39aaf1c)
- system_info (interface 0xfbbdc602980cb986)
- adventure (interface 0xd5dc40d973e75b84)
- chat (interface 0xd5dc40d973e75b84)
That output is captured from the published package talking to a real capOS VM:
Using the client
import capos
with capos.Client(host="127.0.0.1", port=2327) as client:
client.login_password("operator", "capos", profile="operator")
print(client.system_motd())
for cap in client.list_capset():
print(cap)
See examples/ for runnable scripts.
Changelog
- 0.1.4 — the hello-world is now a real live run against a capOS kernel
(
examples/hello_live.py); the statichello()placeholder was removed.
Links
- Project: https://cap-os.dev
- Source: https://github.com/ei-grad/capos
Licensed under either of MIT or Apache-2.0 at your option.
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 capos-0.1.4.tar.gz.
File metadata
- Download URL: capos-0.1.4.tar.gz
- Upload date:
- Size: 5.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
770b828b21c49438f71ecb4c69ba7ae93799dab22227637a74c323514c5717bb
|
|
| MD5 |
f409178e9824d2d104b0fc357751a83a
|
|
| BLAKE2b-256 |
0c94d4f09edea485be9fdeb8df78ced0d66818c7a93962fb5c73e2d66dbc0fd7
|
Provenance
The following attestation bundles were made for capos-0.1.4.tar.gz:
Publisher:
python-release.yml on ei-grad/capos
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
capos-0.1.4.tar.gz -
Subject digest:
770b828b21c49438f71ecb4c69ba7ae93799dab22227637a74c323514c5717bb - Sigstore transparency entry: 2188074803
- Sigstore integration time:
-
Permalink:
ei-grad/capos@c47557cea52f98164e84c5bd26a9f63a2558ba4d -
Branch / Tag:
refs/tags/python-v0.1.4 - Owner: https://github.com/ei-grad
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-release.yml@c47557cea52f98164e84c5bd26a9f63a2558ba4d -
Trigger Event:
push
-
Statement type:
File details
Details for the file capos-0.1.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: capos-0.1.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 395.0 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4073ae2424580eec143408a549c906e535c270ee89bf1f2e998c064711d08796
|
|
| MD5 |
86d4ef75c58f3c6de4360b579f26384c
|
|
| BLAKE2b-256 |
999be4a923a0666f8019bc26a6f6f3f6daa4db2807f45ea33c7978db68070d20
|
Provenance
The following attestation bundles were made for capos-0.1.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
python-release.yml on ei-grad/capos
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
capos-0.1.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
4073ae2424580eec143408a549c906e535c270ee89bf1f2e998c064711d08796 - Sigstore transparency entry: 2188074864
- Sigstore integration time:
-
Permalink:
ei-grad/capos@c47557cea52f98164e84c5bd26a9f63a2558ba4d -
Branch / Tag:
refs/tags/python-v0.1.4 - Owner: https://github.com/ei-grad
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-release.yml@c47557cea52f98164e84c5bd26a9f63a2558ba4d -
Trigger Event:
push
-
Statement type: