Metadata-Version: 2.4
Name: capos
Version: 0.1.3
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: POSIX :: Linux
Classifier: Development Status :: 2 - Pre-Alpha
Summary: Host-side Python bindings for capOS, the capability operating system: a remote-session client over the CapSet forwarding protocol (https://cap-os.dev).
Keywords: capos,capability,operating-system,sdk
Author: Andrew Grigorev
License: MIT OR Apache-2.0
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://cap-os.dev
Project-URL: Repository, https://github.com/ei-grad/capos

# capos (Python)

Host-side Python bindings for [capOS](https://cap-os.dev), 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. 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

```bash
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.

## Hello world

Needs no capOS instance:

```python
import capos

print(capos.hello())
print("capos", capos.__version__)
```

## Connect to a running capOS

Start a capOS instance from the repo (`make run`) so it forwards the remote
CapSet on `127.0.0.1:2327`, then:

```python
import capos

with capos.Client(host="127.0.0.1", port=2327) as client:
    client.login_anonymous(profile="operator")
    print(client.system_motd())
    for cap in client.list_capset():
        print(cap)
```

See [`examples/`](examples/) for runnable scripts.

## 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.

