koyeb-sdk
Koyeb python sdk
What it is and what it does
The Koyeb SDK is the official Python interface to Koyeb's cloud platform, offering both synchronous and asynchronous REST API clients for programmatic control of deployments and services. Its primary feature is the Sandbox module, which lets you spin up isolated, ephemeral environments—containerized or virtualized spaces where you can safely execute untrusted code, test libraries, or prototype applications without affecting other systems. Sandboxes are designed to be short-lived and fully disposable, with complete control over dependencies and runtime context.
The SDK exposes methods for sandbox lifecycle management (create, delete), file operations (read, write), command execution, and port exposure. It depends on httpx for async HTTP calls, urllib3 for sync requests, pydantic for data validation, websockets for real-time communication, and python-dateutil for timestamp handling. It requires Python 3.9 or later and is actively maintained with low installation friction.
Use it for:
- Execute user-generated or untrusted code safely in isolated environments without risking your host system.
- Prototype and test applications quickly in clean, on-demand compute environments without local infrastructure setup.
- Run CI/CD pipeline steps in ephemeral sandboxes that spin up in seconds and leave no state behind.
- Provide safe, reproducible code execution environments for educational platforms or online coding tools.
- Evaluate AI models or run inference workloads in isolated, time-limited execution contexts.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Official Python SDK for Koyeb that provides synchronous and asynchronous REST API clients plus a Sandbox module for creating and managing isolated, ephemeral execution environments in the cloud.
Yes. The SDK is actively maintained, has low install friction, carries a permissive Apache-2.0 license, and solves a real problem—safe, on-demand code execution in the cloud. It's well-suited for CI/CD, untrusted code execution, and rapid prototyping. Requires an API token and Koyeb account; verify pricing and sandbox quotas before committing to production use.
Install
koyeb-sdk on PyPI
pip
pip install koyeb-sdkuv
uv add koyeb-sdkpoetry
poetry add koyeb-sdkInstalling koyeb-sdk
Before you install
Low install friction with a pure-Python wheel distribution. Actively maintained with recent releases; last commit on 2026-08-12. Depends on standard HTTP and async libraries (httpx, urllib3, websockets) plus pydantic for validation.
License in practice
Licensed under Apache-2.0 (permissive), allowing use in commercial and proprietary projects with minimal restrictions beyond attribution and liability disclaimers.
Quickstart
pip install koyeb-sdk
import os
from koyeb import Sandbox
sandbox = Sandbox.create(
image="ubuntu",
name="test",
wait_ready=True,
)
result = sandbox.exec("echo hello")
print(result.stdout)
sandbox.delete()
Requires a Koyeb API token set via the KOYEB_API_TOKEN environment variable; Python >= 3.9.
Verify before relying
- Whether the synchronous and asynchronous API clients have feature parity or differ in supported operations.
- Rate limits or quota constraints on sandbox creation and execution imposed by the Koyeb platform.
- Whether sandboxes support GPU or specialized compute resources beyond standard CPU/memory.
- Pricing model and whether the SDK itself is free to use or if Koyeb platform usage incurs costs.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — urllib3, python-dateutil, pydantic, typing-extensions, websockets, httpx |
| Maintenance | actively maintained — 36 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 171,705/month — #10,357 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: koyeb_sdk-1.5.1-py3-none-any.whl
Keywords: Koyeb, Koyeb API client, SDK, API client
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
prime-sandboxesPython SDK for creating, managing, and…
permissive · top 15,000 on PyPI
e2bE2B provides a Python SDK to create and control…
permissive · top 5,000 on PyPI
e2b-desktopProvides a Python SDK to create and control…
permissive · top 15,000 on PyPI
blaxelPython SDK for creating, managing, and…
unclear · top 15,000 on PyPI
opensandboxOpenSandbox SDK provides low-level Python…
permissive · top 15,000 on PyPI
k8s-agent-sandboxA Python client library for creating and…
permissive · top 15,000 on PyPI
e2b-code-interpreterRuns AI-generated or arbitrary Python code in…
permissive · top 5,000 on PyPI
contree-sdkPython SDK for ConTree, a container runtime…
permissive · top 15,000 on PyPI
hyperbrowserPython SDK for controlling remote browser…
permissive · top 15,000 on PyPI
todoist_api_pythonOfficial Python SDK for the Todoist API,…
permissive · top 15,000 on PyPI