contree-sdk
SDK for ConTree container runtime with versioned filesystem state
What it is and what it does
ConTree SDK is a Python client for ConTree, a container runtime designed to support reproducible, versioned execution environments. It exposes both async and sync APIs to run commands, manage images, handle file uploads/downloads, and maintain persistent sessions within containers. The core abstraction treats container filesystem state like Git: you can branch, version, and reproduce execution contexts deterministically.
The SDK depends on httpx for HTTP communication, aiofiles for async file I/O, cattrs for serialization, strenum for enum handling, and typing-extensions for modern type hints. It's actively maintained but in pre-alpha, so the API may change. Use it when you need reproducible, versioned container execution from Python—particularly for research on software engineering agents or workflows requiring deterministic state snapshots.
Use it for:
- Run reproducible commands in versioned container environments for SWE agent research and testing.
- Manage persistent sessions with automatic version tracking across multiple command executions.
- Upload local files to containers, execute workflows, and download results programmatically.
- Branch container filesystem state and explore divergent execution paths like Git branches.
- Integrate container-based sandboxing into Python applications with async/sync flexibility.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Python SDK for ConTree, a container runtime that provides versioned, reproducible filesystem state for container execution with both async and sync interfaces.
Yes, if you need reproducible, versioned container execution from Python and are comfortable with a pre-alpha API. The low install friction, active maintenance, and permissive license make it a reasonable choice for research and agent development. Verify that the ConTree runtime service meets your infrastructure needs before committing to production use.
Install
contree-sdk on PyPI
pip
pip install contree-sdkuv
uv add contree-sdkpoetry
poetry add contree-sdkInstalling contree-sdk
Before you install
Low install friction with a pure-Python wheel and five lightweight dependencies. Active maintenance with a recent release (14 days old). Pre-alpha status means the API surface may shift.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; you must include a copy of the license and state significant changes.
Quickstart
pip install contree-sdk
from contree_sdk import Contree
import asyncio
async def main():
contree = Contree(token="your-token")
image = await contree.images.use("ubuntu:latest")
result = await image.run(shell='echo "Hello"')
print(result.stdout)
asyncio.run(main())
Requires Python 3.10–3.14; ConTree token needed to authenticate with the container runtime service.
Verify before relying
- Whether ConTree runtime service is self-hosted or cloud-managed, and what infrastructure setup is required.
- Performance characteristics and latency for typical workloads (command execution, file transfer).
- Stability guarantees and breaking-change policy during pre-alpha phase.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (<3.15,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — aiofiles, cattrs, httpx, strenum, typing-extensions |
| Maintenance | actively maintained — 14 days since the last release |
| First released | |
| Downloads | 578,246/month — #5,923 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: contree_sdk-0.3.6-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
cwsandboxA Python client library for running and…
permissive · top 15,000 on PyPI
bashkitBashkit is a sandboxed bash interpreter for…
permissive · top 15,000 on PyPI
llm-sandboxExecutes code generated by large language…
unclear · top 15,000 on PyPI
koyeb-sdkOfficial Python SDK for Koyeb that provides…
permissive · top 15,000 on PyPI
morefsmorefs provides fsspec-based filesystem…
permissive · top 15,000 on PyPI
zope.containerProvides container interfaces and…
unclear · top 15,000 on PyPI
pytest-containerA pytest plugin that automates container…
copyleft · top 15,000 on PyPI
dvc-sshAdds SSH remote storage support to DVC,…
permissive · top 15,000 on PyPI
dockerptyOperates the pseudo-terminal (PTY) allocated to…
permissive · top 15,000 on PyPI
fsProvides a unified filesystem abstraction layer…
permissive · top 5,000 on PyPI