This release is a pre-release and may not be stable for production use.
rototo Python SDK
Every substantial software system eventually needs a configuration subsystem. The software provides the underlying capabilities; configuration steers those capabilities to behave in a particular way.
Some configuration is settings-style: things like database URLs and encryption keys, usually held in environment variables and fixed once the software is deployed. That's not the kind we're concerned with here. What interests us instead is the configuration that governs the system's runtime behavior: feature availability, model selection, tenant overrides, offers, retry policies, logging controls, rollout plans, and so on.
Rototo provides a control plane for this kind of runtime configuration. It rests on a simple premise: runtime configuration should be treated like code. It should live alongside the code and follow a similar release cycle, and it should be testable and contract-enforced in the same way.
To that end, Rototo models configuration as files that are versioned, reviewed, tested, and released as packages. The Rototo SDK loads these packages within the application runtime to guide the application's behavior. Configuration thus follows the same release process as code, while gaining a hot-swappable deployment mechanism.
Rototo's hello world
Let's take a simple use case: we want to vary the order amount beyond which customers get free shipping.
Customers in standard tier must have at least $50 as cart total while customers in premium tier get free shipping after $25.
To accomplish this, we would do two things:
- Create a Rototo configuration package.
- Load the configuration package and resolve free shipping threshold in our application.
Create and publish a configuration package
First, install the Rototo cli from crates.io:
cargo install rototo --version 0.1.0-alpha.8
Now, create a configuration package for the application:
# Create app-config package with a variable named free_shipping_threshold
rototo init app-config --variable free_shipping_threshold
You should see the following in app-config/ dir:
$> tree app-config
app-config
├── rototo-package.toml
├── variables
│ └── free_shipping_threshold.toml
├── model
│ ├── catalogs
│ └── context
├── data
│ └── catalogs
└── lint
7 directories, 2 files
We explain the package model in Rototo Concepts. For now, we would focus on the variable free_shipping_threshold. Replace the contents of free_shipping_threshold.toml with the following:
schema_version = 1
description = "$ threshold for free shipping."
type = "int"
[resolve]
default = 50 # by default, free shipping beyond $50.
[[resolve.rule]]
when = '(context.account.tier == "premium")'
value = 25 # for premium account tier, free shipping beyond $25.
We can now validate our configuration to ensure that we got it right:
rototo lint app-config
We can further ensure that free_shipping_threshold resolves as expected.
# default value: should give 50
rototo resolve app-config --variable free_shipping_threshold
# standard account tier: should give 50
rototo resolve app-config --variable free_shipping_threshold --context account.tier=standard
# premium account tier: should give 25
rototo resolve app-config --variable free_shipping_threshold --context account.tier=premium
Load the configuration package and resolve the threshold
Now let's read that value from an application. Install the rototo Python SDK:
python -m pip install rototo
Save this as hello-rototo.py. It loads a refreshing package (one that re-reads the source in the background) and prints the free-shipping threshold for a standard and a premium account every couple of seconds:
import asyncio
import rototo
VARIABLE_ID = "free_shipping_threshold"
def print_threshold(app_config, tier):
resolution = app_config.resolve_variable(
VARIABLE_ID,
{"account": {"tier": tier}},
)
print(f"{tier}: {resolution.value} USD")
async def main():
app_config = await rototo.RefreshingPackage.load("app-config", period_seconds=1.0)
try:
while True:
print("---")
print_threshold(app_config, "standard")
print_threshold(app_config, "premium")
await asyncio.sleep(2.0)
finally:
await app_config.shutdown()
asyncio.run(main())
Run it (python hello-rototo.py) from the directory that holds app-config, and it prints:
---
standard: 50 USD
premium: 25 USD
Now edit free_shipping_threshold.toml, change the default to 35, and save. Because the package refreshes every second, the next tick shows:
---
standard: 50 USD
premium: 35 USD
Documentation
Public docs are available on rototo.dev.
The rototo cli also ships with the same documents in markdown.
You and your agent can use the docs command in the cli:
# show available docs
rototo docs
# search for docs
rototo docs -s <search terms>
# fetch doc based on doc id prefix
rototo docs -p concepts
The use-cases page (rototo docs -p use-cases) tours what teams put in a
package - release control, experiments, pricing, tenant overlays, regional
policy, environment separation - and each job points at a worked example
package under examples/ in this repository.
Rototo is designed for people and agents
Agents are now among the most important users of any development tool. Hence, Rototo is designed from ground up to work well both for people and agents.
- The configuration package is simply a dir tree of files that brings battle-tested ergonomics of file organization and editing.
rototo docsto discover Rototo's capabilities and the recipes to use it.rototo lintas the backbone for configuration validation that can be run after every edit.rototo inspectto reason about the package structure and how everything resolves at runtime.rototo resolvefor test automation of invariants (e.g. customer X must always receive configuration Y otherwise something is wrong).rototo lspto provide feedback (and help) during editing.- The rototo console, a companion web app that ships separately as
rototo-console, for a friendly UI over inspecting and editing the package.
Roadmap: hard things rototo does not do yet
Runtime configuration earns trust in the ugly parts, not the feature tour, so we keep this list in the open. Each item is a real production complication we have looked at and not solved yet. (Some other hard things are deliberate non-goals rather than roadmap items: exposure logging and experiment stats, metric-driven auto-rollback, enumerated ID sets as targeting, secrets, identity resolution, and Terraform-style enforcement of resolved state all belong to the application or its other tools.)
For orientation, the things that used to be on this list and are now shipped
and demonstrated under examples/: structured composition (entry add, update,
and delete; atomic [resolve] override; namespaced variables; list member
union and delete), the governance.toml layering contract enforced at compose time,
layers and allocations for rollouts and experiments, catalog queries with
filter/sort/limit and effective dating on env.now, and dev/staging/prod as
vertical layers over one contract. What
remains:
- Canarying a value change. Staged rollout for a change to an existing variable's value, not just for new features. Config changes cause outages at the same rate as code changes.
- A break-glass path. Kill switches need seconds; git review takes minutes to hours. An emergency change mechanism with mandatory post-hoc review.
- Flag lifecycle. Owner and expiry metadata on variables, staleness warnings, and a worked "concluding an experiment" example: winner folded into the default, allocation removed.
- Grandfathering. Pinning accounts to the plans and prices as of when they signed up: frozen old account classes beside evolving new ones.
- Totality lint. "Exactly one entry for every cell of plan x market": completeness over list cross-products, not just uniqueness.
- Jurisdiction dominance. A deny that no lower layer, experiment, or tenant override can re-enable. Governance narrows grants; it cannot yet pin an outcome.
- Time-boundary awareness. Timezone semantics for effective dates, and cache invalidation when a rule is known to flip at a time.
- Version-skew honesty. Consumers refresh independently; multi-variable changes are not atomic in effect.
- Weighted rollout units. Tenant-unit migrations where one tenant is a third of the load.
- The one-hop dereference built-in. Following a catalog reference to an expression-typed field during a query, so audiences can carry authored conditions instead of fixed data bounds.
- Contract lockdown for vertical layers. Environment layering wants a package-level governance default (a wildcard grant), and an overlay can still introduce a brand-new variable without any grant. "Environments differ in values, never in contract" is convention plus review, not yet a hard guarantee.
- The custom-lint execution boundary. Loading a package runs its Lua lint today, including for remote sources you do not control. The invariant to establish: loading or resolving a package never executes package-supplied code; only author-time gates (pre-push, CI) do.
- Nested trace provenance. A resolution trace says which rule matched, but not why a referenced condition variable was true; the trace should follow the reference chain. Related: variables have no visibility marker yet (app-facing versus internal helper), so the cross-variable dependency graph is disciplined only by convention.
License
Licensed under either of:
- Apache License, Version 2.0
- MIT license
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 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.0a8.tar.gz.
File metadata
- Download URL: rototo-0.1.0a8.tar.gz
- Upload date:
- Size: 467.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d160dd027a578608787ce2ff9761237cdf9779df0ef90b1741614963b51b435a
|
|
| MD5 |
c5103b4fa8061cd45a90fde114543d9f
|
|
| BLAKE2b-256 |
6e2f780e7d656382d38908b51f00800a130c9f72a25326b0f52b3d67949e4cd8
|
Provenance
The following attestation bundles were made for rototo-0.1.0a8.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.0a8.tar.gz -
Subject digest:
d160dd027a578608787ce2ff9761237cdf9779df0ef90b1741614963b51b435a - Sigstore transparency entry: 2166713914
- Sigstore integration time:
-
Permalink:
manasgarg/rototo@b34d4c480751961e85622e7d3827bab66e44c2b8 -
Branch / Tag:
refs/tags/v0.1.0-alpha.8 - Owner: https://github.com/manasgarg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b34d4c480751961e85622e7d3827bab66e44c2b8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rototo-0.1.0a8-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: rototo-0.1.0a8-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 5.5 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 |
f4482f532bd77313595bc9b6c8ff42a7c6c714b3381e0878d211b3fea54234af
|
|
| MD5 |
10bee5bf2ba23bb8a561f5503f502082
|
|
| BLAKE2b-256 |
8f316bc633fd722970c9803bd2bc235ce35a99404609cb4740ba9c84849551e8
|
Provenance
The following attestation bundles were made for rototo-0.1.0a8-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.0a8-cp310-abi3-win_amd64.whl -
Subject digest:
f4482f532bd77313595bc9b6c8ff42a7c6c714b3381e0878d211b3fea54234af - Sigstore transparency entry: 2166713929
- Sigstore integration time:
-
Permalink:
manasgarg/rototo@b34d4c480751961e85622e7d3827bab66e44c2b8 -
Branch / Tag:
refs/tags/v0.1.0-alpha.8 - Owner: https://github.com/manasgarg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b34d4c480751961e85622e7d3827bab66e44c2b8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rototo-0.1.0a8-cp310-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: rototo-0.1.0a8-cp310-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 6.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 |
b4a922dab87858e5b016765c4785af475145a6210114ceba6be3d7e25645fb8c
|
|
| MD5 |
fa2ee54c5887cb621cc91e199db34d39
|
|
| BLAKE2b-256 |
10bbf43ee7e42c5ddfc17df6d881116c04130a7df439cee17631c2e77abb8c09
|
Provenance
The following attestation bundles were made for rototo-0.1.0a8-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.0a8-cp310-abi3-manylinux_2_28_x86_64.whl -
Subject digest:
b4a922dab87858e5b016765c4785af475145a6210114ceba6be3d7e25645fb8c - Sigstore transparency entry: 2166713926
- Sigstore integration time:
-
Permalink:
manasgarg/rototo@b34d4c480751961e85622e7d3827bab66e44c2b8 -
Branch / Tag:
refs/tags/v0.1.0-alpha.8 - Owner: https://github.com/manasgarg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b34d4c480751961e85622e7d3827bab66e44c2b8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rototo-0.1.0a8-cp310-abi3-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: rototo-0.1.0a8-cp310-abi3-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 6.5 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 |
8bc488689bfde6f2102c455344f2ea71b1c7ff6d96dec9ab40dcd2dd1ea451d7
|
|
| MD5 |
ce1246749270b09403b03b5302cbe173
|
|
| BLAKE2b-256 |
8d50264edd0f7dd9ccc1b2d1cdab9c050d723662c8287ac790ecdda8f7291e6e
|
Provenance
The following attestation bundles were made for rototo-0.1.0a8-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.0a8-cp310-abi3-manylinux_2_28_aarch64.whl -
Subject digest:
8bc488689bfde6f2102c455344f2ea71b1c7ff6d96dec9ab40dcd2dd1ea451d7 - Sigstore transparency entry: 2166713919
- Sigstore integration time:
-
Permalink:
manasgarg/rototo@b34d4c480751961e85622e7d3827bab66e44c2b8 -
Branch / Tag:
refs/tags/v0.1.0-alpha.8 - Owner: https://github.com/manasgarg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b34d4c480751961e85622e7d3827bab66e44c2b8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rototo-0.1.0a8-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: rototo-0.1.0a8-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 5.7 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 |
bc83f3e1280d8f74a1c711c4efbe8f52d83c3408870424ad0a385ccbea45ffa6
|
|
| MD5 |
7021a6946d8ffba42c4177e53a18b84b
|
|
| BLAKE2b-256 |
ea2394943faa346cb535cb155211b8a12446e8df26b6f9044ff457d537530864
|
Provenance
The following attestation bundles were made for rototo-0.1.0a8-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.0a8-cp310-abi3-macosx_11_0_arm64.whl -
Subject digest:
bc83f3e1280d8f74a1c711c4efbe8f52d83c3408870424ad0a385ccbea45ffa6 - Sigstore transparency entry: 2166713946
- Sigstore integration time:
-
Permalink:
manasgarg/rototo@b34d4c480751961e85622e7d3827bab66e44c2b8 -
Branch / Tag:
refs/tags/v0.1.0-alpha.8 - Owner: https://github.com/manasgarg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b34d4c480751961e85622e7d3827bab66e44c2b8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rototo-0.1.0a8-cp310-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: rototo-0.1.0a8-cp310-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 5.9 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 |
1e11fb9bade17700d9c7388e20eccd91d472238e19462dd4bc589037ad828b2b
|
|
| MD5 |
65f14f3456df26a1992de13b77a87d66
|
|
| BLAKE2b-256 |
56794baaf4568ccd1919b1d14336bcadc9902f11d643746a09121c12e18d7ce0
|
Provenance
The following attestation bundles were made for rototo-0.1.0a8-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.0a8-cp310-abi3-macosx_10_12_x86_64.whl -
Subject digest:
1e11fb9bade17700d9c7388e20eccd91d472238e19462dd4bc589037ad828b2b - Sigstore transparency entry: 2166713923
- Sigstore integration time:
-
Permalink:
manasgarg/rototo@b34d4c480751961e85622e7d3827bab66e44c2b8 -
Branch / Tag:
refs/tags/v0.1.0-alpha.8 - Owner: https://github.com/manasgarg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b34d4c480751961e85622e7d3827bab66e44c2b8 -
Trigger Event:
push
-
Statement type: