Skip to main content

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:

capos live hello-world

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 static hello() placeholder was removed.

Links

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

capos-0.1.4.tar.gz (5.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

capos-0.1.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (395.0 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

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

Hashes for capos-0.1.4.tar.gz
Algorithm Hash digest
SHA256 770b828b21c49438f71ecb4c69ba7ae93799dab22227637a74c323514c5717bb
MD5 f409178e9824d2d104b0fc357751a83a
BLAKE2b-256 0c94d4f09edea485be9fdeb8df78ced0d66818c7a93962fb5c73e2d66dbc0fd7

See more details on using hashes here.

Provenance

The following attestation bundles were made for capos-0.1.4.tar.gz:

Publisher: python-release.yml on ei-grad/capos

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file capos-0.1.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for capos-0.1.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4073ae2424580eec143408a549c906e535c270ee89bf1f2e998c064711d08796
MD5 86d4ef75c58f3c6de4360b579f26384c
BLAKE2b-256 999be4a923a0666f8019bc26a6f6f3f6daa4db2807f45ea33c7978db68070d20

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 files

0.1.3

2 files

0.1.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page