This release is a pre-release and may not be stable for production use.
rototo Python SDK
The Python SDK is a thin native wrapper around the Rust SDK. Python code gets an idiomatic async API while rototo keeps workspace loading, linting, refresh, and resolution behavior in the Rust core.
Install
rototo is currently published as an alpha package for Python 3.10 and newer:
python -m pip install rototo
If your package resolver is constrained to stable releases, allow prereleases explicitly:
python -m pip install --pre rototo
The rototo release version stays SemVer, for example 0.1.0-alpha.5. Python
packaging tools may display the equivalent PEP 440 spelling 0.1.0a5 for the
distribution.
Load A Workspace
import rototo
workspace = await rototo.Workspace.load("examples/basic")
Workspace.load accepts the same
source strings as the CLI. It
lints the workspace and rejects lint failures
before returning.
Resolve A Variable
resolution = await workspace.resolve_variable(
"premium-message",
{"user": {"tier": "premium"}},
)
print(resolution.value)
print(resolution.source)
VariableResolution has:
| Field | Meaning |
|---|---|
id |
Variable id. |
value |
Selected JSON-compatible Python value. |
source |
Selected source. |
Resolve A Qualifier
matches = await workspace.resolve_qualifier(
"premium-users",
{"user": {"tier": "premium"}},
)
print(matches)
Qualifier resolution returns the final boolean result.
Context Validation
Resolution validates context against a compatible request context schema by default. Skip validation for one call when a tool needs to evaluate partial context:
resolution = await workspace.resolve_variable(
"premium-message",
context,
validate_context=False,
)
The context still must be a JSON object.
Inspect And Lint
workspace = await rototo.Workspace.inspect("examples/basic")
lint = await workspace.lint()
Inspection is for tools. A workspace loaded through inspect cannot
resolve variables or qualifiers because it
does not compile the runtime model.
Refreshing Workspace
workspace = await rototo.RefreshingWorkspace.load(
source,
period_seconds=30,
)
resolution = await workspace.resolve_variable("premium-message", context)
status = await workspace.status()
await workspace.shutdown()
RefreshingWorkspace keeps serving the last
successfully loaded workspace when refresh fails. status returns a
RefreshStatus dataclass with fingerprint, success, attempt, failure, error,
refreshing, and immutable fields.
Errors
Rust RototoError values become rototo.RototoError in Python:
try:
await workspace.resolve_variable("missing", {})
except rototo.RototoError as error:
print(error)
Invalid Python option values, such as an unknown lint mode, raise Python
ValueError.
Public Types
| Type | Purpose |
|---|---|
Workspace |
Loaded workspace handle. |
RefreshingWorkspace |
Refreshing workspace handle for services. |
VariableResolution |
Selected variable value. |
RefreshStatus |
Refresh state snapshot. |
RototoError |
Error raised for rototo failures. |
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 rototo-0.1.0a5.tar.gz.
File metadata
- Download URL: rototo-0.1.0a5.tar.gz
- Upload date:
- Size: 422.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00eda019e2195a6f2629c1f931addde91e9ce18a78811f0acb85ad8d8de4f49e
|
|
| MD5 |
2ec2604552d261e8eb847fcdbc43381c
|
|
| BLAKE2b-256 |
8233de9532092603e7aba59da44477cb6bf9ae0e61650245077d51ca49c9511d
|
Provenance
The following attestation bundles were made for rototo-0.1.0a5.tar.gz:
Publisher:
release.yml on manasgarg/rototo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rototo-0.1.0a5.tar.gz -
Subject digest:
00eda019e2195a6f2629c1f931addde91e9ce18a78811f0acb85ad8d8de4f49e - Sigstore transparency entry: 1921932897
- Sigstore integration time:
-
Permalink:
manasgarg/rototo@0d2c417a389ce73625633a4fee9f5af8fb4e45ee -
Branch / Tag:
refs/tags/v0.1.0-alpha.5 - Owner: https://github.com/manasgarg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0d2c417a389ce73625633a4fee9f5af8fb4e45ee -
Trigger Event:
push
-
Statement type:
File details
Details for the file rototo-0.1.0a5-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: rototo-0.1.0a5-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 4.6 MB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20ff4d34265bad3febf1a551fb8a35def73d27f58c3ccfc3c1fa5e9ca942c083
|
|
| MD5 |
1bdaa69a0770eb129ce53eaa4240bf7a
|
|
| BLAKE2b-256 |
297c8f67b641852449d7c4a07b17417c32a4a036fcc9de49b108b8fa1f08ce82
|
Provenance
The following attestation bundles were made for rototo-0.1.0a5-cp310-abi3-win_amd64.whl:
Publisher:
release.yml on manasgarg/rototo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rototo-0.1.0a5-cp310-abi3-win_amd64.whl -
Subject digest:
20ff4d34265bad3febf1a551fb8a35def73d27f58c3ccfc3c1fa5e9ca942c083 - Sigstore transparency entry: 1921933756
- Sigstore integration time:
-
Permalink:
manasgarg/rototo@0d2c417a389ce73625633a4fee9f5af8fb4e45ee -
Branch / Tag:
refs/tags/v0.1.0-alpha.5 - Owner: https://github.com/manasgarg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0d2c417a389ce73625633a4fee9f5af8fb4e45ee -
Trigger Event:
push
-
Statement type:
File details
Details for the file rototo-0.1.0a5-cp310-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: rototo-0.1.0a5-cp310-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 5.4 MB
- Tags: CPython 3.10+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7a3bfa3404715ba1cbab4251a5a16cbb46841b51d1f98e539390aeb01e16e44
|
|
| MD5 |
f289237c5a45f6b053142c7a1d17476b
|
|
| BLAKE2b-256 |
9c5878724f961e9612a24359a03566380e94b018cfa1076c9f975e5ec5a53467
|
Provenance
The following attestation bundles were made for rototo-0.1.0a5-cp310-abi3-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on manasgarg/rototo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rototo-0.1.0a5-cp310-abi3-manylinux_2_28_x86_64.whl -
Subject digest:
b7a3bfa3404715ba1cbab4251a5a16cbb46841b51d1f98e539390aeb01e16e44 - Sigstore transparency entry: 1921933021
- Sigstore integration time:
-
Permalink:
manasgarg/rototo@0d2c417a389ce73625633a4fee9f5af8fb4e45ee -
Branch / Tag:
refs/tags/v0.1.0-alpha.5 - Owner: https://github.com/manasgarg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0d2c417a389ce73625633a4fee9f5af8fb4e45ee -
Trigger Event:
push
-
Statement type:
File details
Details for the file rototo-0.1.0a5-cp310-abi3-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: rototo-0.1.0a5-cp310-abi3-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 5.3 MB
- Tags: CPython 3.10+, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51964869bdfc74407741ea488c3f648fea44c8472e79ac47d3559b96d45508d3
|
|
| MD5 |
df70c30d7dda4d9ad5fb3c08193be336
|
|
| BLAKE2b-256 |
39ddb011272b128b2cf46884f6aacdb97028840501af97d9fa092be4df1905a6
|
Provenance
The following attestation bundles were made for rototo-0.1.0a5-cp310-abi3-manylinux_2_28_aarch64.whl:
Publisher:
release.yml on manasgarg/rototo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rototo-0.1.0a5-cp310-abi3-manylinux_2_28_aarch64.whl -
Subject digest:
51964869bdfc74407741ea488c3f648fea44c8472e79ac47d3559b96d45508d3 - Sigstore transparency entry: 1921933888
- Sigstore integration time:
-
Permalink:
manasgarg/rototo@0d2c417a389ce73625633a4fee9f5af8fb4e45ee -
Branch / Tag:
refs/tags/v0.1.0-alpha.5 - Owner: https://github.com/manasgarg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0d2c417a389ce73625633a4fee9f5af8fb4e45ee -
Trigger Event:
push
-
Statement type:
File details
Details for the file rototo-0.1.0a5-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: rototo-0.1.0a5-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 4.8 MB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4476874d9d0ee0e2e20f086eb06759419a7d4f6920f18f6daa276b6a32df657a
|
|
| MD5 |
b79c9c17a55e8319a05e799454d37b7e
|
|
| BLAKE2b-256 |
d60a28f085541c0d7a0e7ed158f8500bde6a7433f6d538c10cfd3546a95147a3
|
Provenance
The following attestation bundles were made for rototo-0.1.0a5-cp310-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on manasgarg/rototo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rototo-0.1.0a5-cp310-abi3-macosx_11_0_arm64.whl -
Subject digest:
4476874d9d0ee0e2e20f086eb06759419a7d4f6920f18f6daa276b6a32df657a - Sigstore transparency entry: 1921933467
- Sigstore integration time:
-
Permalink:
manasgarg/rototo@0d2c417a389ce73625633a4fee9f5af8fb4e45ee -
Branch / Tag:
refs/tags/v0.1.0-alpha.5 - Owner: https://github.com/manasgarg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0d2c417a389ce73625633a4fee9f5af8fb4e45ee -
Trigger Event:
push
-
Statement type:
File details
Details for the file rototo-0.1.0a5-cp310-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: rototo-0.1.0a5-cp310-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 5.0 MB
- Tags: CPython 3.10+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d52a8edddd50b08c3dca58db63b7ee009a12a0bf9e37dbd0a0e798ad25953813
|
|
| MD5 |
e18fc3b7be71344be2809307e90ee031
|
|
| BLAKE2b-256 |
693e57ebc987760896d091c5142290d57d96f89c0308920103c011d62055c066
|
Provenance
The following attestation bundles were made for rototo-0.1.0a5-cp310-abi3-macosx_10_12_x86_64.whl:
Publisher:
release.yml on manasgarg/rototo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rototo-0.1.0a5-cp310-abi3-macosx_10_12_x86_64.whl -
Subject digest:
d52a8edddd50b08c3dca58db63b7ee009a12a0bf9e37dbd0a0e798ad25953813 - Sigstore transparency entry: 1921933622
- Sigstore integration time:
-
Permalink:
manasgarg/rototo@0d2c417a389ce73625633a4fee9f5af8fb4e45ee -
Branch / Tag:
refs/tags/v0.1.0-alpha.5 - Owner: https://github.com/manasgarg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0d2c417a389ce73625633a4fee9f5af8fb4e45ee -
Trigger Event:
push
-
Statement type: