Skip to main content

opendsec

Async Python client for opendsec: open-source Sandboxes for RL rollouts.

Each trial gets a World: a Sandbox for the agent's workspace and one for every service the task needs, on one private network, started and torn down as one.

pip install opendsec
import asyncio

import opendsec


async def main():
    # Reads OPENDSEC_URL (default http://localhost:7700) and OPENDSEC_TOKEN.
    async with opendsec.Client() as client:
        world = await client.create_world(
            [
                opendsec.Sandbox(name="env", image="docker.io/library/python:3.12-slim",
                                 command=["python", "-m", "http.server", "8080"],
                                 aliases=["svc.internal"]),
                opendsec.Sandbox(name="main", image="docker.io/library/python:3.12-slim",
                                 command=["sleep", "infinity"]),
            ],
            ttl="5m",
        )
        result = await world.exec("main", "getent hosts svc.internal")
        print(result.exit_code, result.stdout)
        await world.stop()


asyncio.run(main())
  • Client.create_world(sandboxes, ttl) returns once every Sandbox is ready, or raises WorldFailed if the platform couldn't deliver the World.
  • Client.build_image(dir) builds an image on the platform from a Dockerfile and its build context, and returns once it is ready (a lookup if those files were built before). Use its ref as a Sandbox's image. No Docker needed; only you can run it.
  • World.exec, upload and download act in one Sandbox, by name.
  • get_world and list_worlds look Worlds up.

Run Harbor rollouts on the hosted test bed: https://opendsec.vibrantlabs.com

Licensed under Apache-2.0.

Metadata

Release files for opendsec 0.2.0

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

Source distribution (sdist)

Source distribution for opendsec 0.2.0
File Size Uploaded Provenance Actions
opendsec-0.2.0.tar.gz 10.4 kB With provenance Details for opendsec-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 21.5 kB

Release files / opendsec-0.2.0.tar.gz

Download URL opendsec-0.2.0.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
44ece2335f3a9221974a47b180ceb907b7e2a8a3252a95677a3522fddccbc8ec
BLAKE2b-256 checksum
How to use checksums
96caccea33508fc639ebb20d129b49b698f0889a55a77c990a4c8ac710be5c67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Release files / opendsec-0.2.0-py3-none-any.whl

Download URL opendsec-0.2.0-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8e49a682ad6cf6912e19614fff2dfee1796f99771d9023328142e5d06ecfd29a
BLAKE2b-256 checksum
How to use checksums
286ec7858f62a6c7097533468030c467b659cfffbb984075289a34a5c84b5423
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Security for opendsec 0.2.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for opendsec-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

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.2.0 This release

2 release files Full 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