Python bindings for the theta CLI
Project description
theta-py
Python bindings for the theta CLI.
A thin wrapper around the theta binary. Every verb is exposed as a typed
Python function. Pydantic models for arguments and outputs are codegenerated
from the schemas the binary itself emits, so theta-py cannot drift from
the binary it ships.
Install
uv add theta-py
# or
pip install theta-py
The matching theta binary is bundled inside the wheel and lands at
<venv>/bin/theta when the package is installed (unless your platform is not supported and the binary will be built locally as per theta installer)
Use
Two equivalent surfaces.
# namespaced, one singleton, dotted access
from theta_py import theta
theta.init(name="my-agent")
theta.add.rule("safety")
listing = theta.list.rules()
print(listing.kind)
# flat, every verb is a top-level function
from theta_py import init, add_rule, list_rules
init(name="my-agent")
add_rule("safety")
listing = list_rules()
Pydantic outcome types are importable for type-hint use:
from theta_py import theta
from theta_py._generated.outcomes import InitOutcome, CheckOutcome
out: InitOutcome = theta.init(name="my-agent")
report: CheckOutcome = theta.check()
assert report.valid
Errors
Every verb either returns a pydantic model on status: ok|noop, or raises
ThetaCommandError on status: error:
from theta_py import theta, ThetaCommandError
try:
theta.init()
except ThetaCommandError as exc:
print(exc.verb) # ["init"]
print(exc.diagnostics) # list of {"level": ..., "path": ..., "message": ...}
Catch ThetaInvocationError to handle any failure (transport + envelope).
Version pinning
theta_py.THETA_VERSION is the version of the theta binary bundled inside
the wheel. Each theta_py release ships against exactly one theta release.
import theta_py
print(theta_py.THETA_VERSION) # e.g. "0.1.3-rc1"
Releases
See RELEASING.md.
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 Distributions
Built Distributions
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 theta_py-0.0.3-py3-none-win_amd64.whl.
File metadata
- Download URL: theta_py-0.0.3-py3-none-win_amd64.whl
- Upload date:
- Size: 4.3 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
612cb49cc007d192761a03858e7962c6ad20265c1fa4e462ed8c02017c89600a
|
|
| MD5 |
efa9e60fa15d6fed9fa7f3ff5ebcc9f5
|
|
| BLAKE2b-256 |
5c86855e7ddadb274aa8f43134b5851329373b283189aec78bd849da21f1ba68
|
Provenance
The following attestation bundles were made for theta_py-0.0.3-py3-none-win_amd64.whl:
Publisher:
release.yml on tamarillo-ai/theta_py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
theta_py-0.0.3-py3-none-win_amd64.whl -
Subject digest:
612cb49cc007d192761a03858e7962c6ad20265c1fa4e462ed8c02017c89600a - Sigstore transparency entry: 1778937234
- Sigstore integration time:
-
Permalink:
tamarillo-ai/theta_py@8c261a51be4285ce1cea5952e66b9edd4d7adc91 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/tamarillo-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8c261a51be4285ce1cea5952e66b9edd4d7adc91 -
Trigger Event:
push
-
Statement type:
File details
Details for the file theta_py-0.0.3-py3-none-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: theta_py-0.0.3-py3-none-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 5.0 MB
- Tags: Python 3, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ab409207767fb47f37eee3f85d15a0806c1f1eed454a338b018183c4c2e7472
|
|
| MD5 |
3259c11ffc82737289b26492b362e70e
|
|
| BLAKE2b-256 |
4a6029aba9d6fa642f33eb31eca2e4ccee7d18731725cf2f5e7425fb595e80e1
|
Provenance
The following attestation bundles were made for theta_py-0.0.3-py3-none-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on tamarillo-ai/theta_py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
theta_py-0.0.3-py3-none-manylinux_2_28_x86_64.whl -
Subject digest:
7ab409207767fb47f37eee3f85d15a0806c1f1eed454a338b018183c4c2e7472 - Sigstore transparency entry: 1778937034
- Sigstore integration time:
-
Permalink:
tamarillo-ai/theta_py@8c261a51be4285ce1cea5952e66b9edd4d7adc91 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/tamarillo-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8c261a51be4285ce1cea5952e66b9edd4d7adc91 -
Trigger Event:
push
-
Statement type:
File details
Details for the file theta_py-0.0.3-py3-none-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: theta_py-0.0.3-py3-none-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 4.9 MB
- Tags: Python 3, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb03f63d66d4aa7d14f6b60fb4dd923d48f9a88a481723129e41431e07a43272
|
|
| MD5 |
20f97b19b81431e8d2a33c9c9f789e8d
|
|
| BLAKE2b-256 |
2eadd007534380697223792437298d7fb27febcea1df791502e17060008df026
|
Provenance
The following attestation bundles were made for theta_py-0.0.3-py3-none-manylinux_2_28_aarch64.whl:
Publisher:
release.yml on tamarillo-ai/theta_py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
theta_py-0.0.3-py3-none-manylinux_2_28_aarch64.whl -
Subject digest:
cb03f63d66d4aa7d14f6b60fb4dd923d48f9a88a481723129e41431e07a43272 - Sigstore transparency entry: 1778937160
- Sigstore integration time:
-
Permalink:
tamarillo-ai/theta_py@8c261a51be4285ce1cea5952e66b9edd4d7adc91 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/tamarillo-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8c261a51be4285ce1cea5952e66b9edd4d7adc91 -
Trigger Event:
push
-
Statement type:
File details
Details for the file theta_py-0.0.3-py3-none-macosx_11_0_x86_64.whl.
File metadata
- Download URL: theta_py-0.0.3-py3-none-macosx_11_0_x86_64.whl
- Upload date:
- Size: 4.8 MB
- Tags: Python 3, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0eb81983e646e156d61e3157a8c35214d023671d8152f523e3f00a94d6694171
|
|
| MD5 |
b17d193922272dae2de389b1d0d355f2
|
|
| BLAKE2b-256 |
a7494c69b2a0233c4b9363855fe02e7cf614d92fc7751ec6f43ea4b3e328cb54
|
Provenance
The following attestation bundles were made for theta_py-0.0.3-py3-none-macosx_11_0_x86_64.whl:
Publisher:
release.yml on tamarillo-ai/theta_py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
theta_py-0.0.3-py3-none-macosx_11_0_x86_64.whl -
Subject digest:
0eb81983e646e156d61e3157a8c35214d023671d8152f523e3f00a94d6694171 - Sigstore transparency entry: 1778937099
- Sigstore integration time:
-
Permalink:
tamarillo-ai/theta_py@8c261a51be4285ce1cea5952e66b9edd4d7adc91 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/tamarillo-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8c261a51be4285ce1cea5952e66b9edd4d7adc91 -
Trigger Event:
push
-
Statement type:
File details
Details for the file theta_py-0.0.3-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: theta_py-0.0.3-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 4.6 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4e81846671f3c42a29c5b5e2d533c8ff02e468caefd9f9a6c60c7ca5969fbaa
|
|
| MD5 |
61fa2e2a64a2fd1b838b4be9de474937
|
|
| BLAKE2b-256 |
aa7afd64910606b77b08e20d43cd39132c654b1caa44176634f161d2605f4d16
|
Provenance
The following attestation bundles were made for theta_py-0.0.3-py3-none-macosx_11_0_arm64.whl:
Publisher:
release.yml on tamarillo-ai/theta_py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
theta_py-0.0.3-py3-none-macosx_11_0_arm64.whl -
Subject digest:
d4e81846671f3c42a29c5b5e2d533c8ff02e468caefd9f9a6c60c7ca5969fbaa - Sigstore transparency entry: 1778937304
- Sigstore integration time:
-
Permalink:
tamarillo-ai/theta_py@8c261a51be4285ce1cea5952e66b9edd4d7adc91 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/tamarillo-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8c261a51be4285ce1cea5952e66b9edd4d7adc91 -
Trigger Event:
push
-
Statement type: