skillfed

koyeb-sdk

Koyeb python sdk

koyeb-sdk v1.5.1 171.7K downloads/30d#10,357 on PyPI0
Permissive license Apache-2.0 Active released

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-sdk

uv

uv add koyeb-sdk

poetry

poetry add koyeb-sdk

Installing 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

koyeb api clientcloud sandbox environmentephemeral compute executionkoyeb python sdkisolated code executioncloud deployment sdkasync http client
cloud-sdksandbox-executionasync-http

More Software Development packages