Skip to content

Alpha release

Choose a tag to compare

@super-jaba super-jaba released this 22 Feb 00:54
· 4 commits to main since this release
eb3c572

Full Changelog: https://github.com/d2c-app/dev2cloud/commits/v0.2.0

dev2cloud v0.2.0

Python client library for the Dev2Cloud sandbox management API.

Highlights

  • Sandbox provisioning — create, poll, and manage Postgres and Redis sandboxes with a simple synchronous API
  • Typed models — Pydantic-based Sandbox, PostgresCredentials, and RedisCredentials with auto-generated connection URLs
  • Trusted publishing — published to PyPI via GitHub Actions OIDC (no stored tokens)

Quick start

pip install dev2cloud
from dev2cloud import Dev2Cloud, SandboxType

client = Dev2Cloud(api_key="your-key")  # or set D2C_API_KEY env var
sandbox = client.create_sandbox(SandboxType.POSTGRES)
print(sandbox.url)  # postgresql://user:pass@connect.dev2.cloud:5432/postgres

API

Method Description
create_sandbox(type) Provision a sandbox and wait until it's running
get_sandbox(id) Retrieve a sandbox by ID
list_sandboxes() List all active sandboxes
delete_sandbox(id) Delete a sandbox
delete_all() Delete all active sandboxes

Requirements

  • Python >= 3.9
  • httpx >= 0.28.1
  • pydantic >= 2.12.5