Skip to main content

Opovid Python Runtime

This directory contains the Python runtime for Opovid.

The first Python slice ships the framework-agnostic core plus the shared remembered-state ability:

  • Actor and the preferred User facade
  • task, question, and check helpers
  • with_retry for wrapping flaky or eventually-consistent tasks
  • nested execution reports and timeline events
  • render_timeline, timeline_to_json, and summarize_failure diagnostics
  • listener hooks for step boundaries
  • RememberTheState for small actor-local state

Install Locally

From this directory:

python3 -m pip install -e .

Basic Usage

from opovid import Actor, RememberTheState, remembered_by, question, task

casey = Actor.named("Casey").can(RememberTheState.using_defaults())

casey.attempts_to(
    task("remembers a subscription", lambda actor: remembered_by(actor).remember("plan", "pro"))
)

plan = casey.asks_for(question("reads the selected plan", lambda actor: remembered_by(actor).recall("plan")))

assert plan == "pro"

Module Layout

The Python runtime follows the same concept boundaries as the TypeScript, Java, and Ruby runtimes:

  • actor.py, user.py, and attempt_chain.py own the user/actor flow.
  • task.py, question.py, and check.py keep the executable contracts separate.
  • execution.py and execution_options.py own reports, timelines, errors, listeners, and execution options.
  • timeline.py owns text/JSON timeline rendering and failure summaries.
  • retry.py owns retry task wrappers.
  • actor_memory.py, remember_the_state.py, and memory.py provide the shared remembered-state ability.
  • core.py and __init__.py are public re-export entrypoints.

The Python runtime does not currently include the scenario spec module available in the TypeScript, Java, and Ruby runtimes.

Run Tests

From this directory:

PYTHONPATH=src python3 -m unittest discover -s tests

Lint And Format

Ruff is the Python runtime's linter and formatter.

python3 -m pip install -e ".[dev]"
ruff check .
ruff format --check .

Publish

The Python runtime publishes as opovid on PyPI.

Tagged releases are handled by the root GitLab release pipeline. The Python release job builds the source distribution and wheel, checks them with Twine, and uploads with PyPI Trusted Publishing through GitLab OIDC. Configure the PyPI trusted publisher for the sunrise.water/opovid GitLab project, the top-level .gitlab-ci.yml workflow, and the release environment before the first publish.

Browser flows remain intentionally centered in the TypeScript runtime with Playwright. The Python runtime is currently focused on service, request, job, and plain unit/integration flows.

Metadata

Release files for opovid 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for opovid 0.1.7
File Size Uploaded Provenance Actions
opovid-0.1.7.tar.gz 15.4 kB Without provenance Details for opovid-0.1.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for opovid 0.1.7
File Interpreter ABI Platform Actions
opovid-0.1.7-py3-none-any.whl Python 3 none any Details for opovid-0.1.7-py3-none-any.whl

Total release size: 31.2 kB

Release files / opovid-0.1.7.tar.gz

Download URL opovid-0.1.7.tar.gz
Size 15.4 kB
Tags Source
SHA-256 checksum
How to use checksums
08982fc22a79426dcfb47f8724a5a4a2bd37c23c12307e97d7d6590a70067400
BLAKE2b-256 checksum
How to use checksums
5d6a19745e28599376c99ec242777b2aa5459a5f6429482f5d6b01181158f1b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / opovid-0.1.7-py3-none-any.whl

Download URL opovid-0.1.7-py3-none-any.whl
Size 15.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dfe9f26de98e404fca920ba8cc5fc2a75b9d94ffbd489a25e61d25a32ac2f29b
BLAKE2b-256 checksum
How to use checksums
0c3ab39dbad469da4fb9b2b90389ee34fa900f115d8464e6aa9e8d2129aacebb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.2.0 CPython/3.14.4

Security for opovid 0.1.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.7 This release

2 release files No provenance

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