The repository or configuration that created this release differ from a previous release. View details.
IBEE Solutions Python SDK
Official Python SDK for the IBEE Solutions API: cloud and GPU VMs, VPC networking, Reserved IPs, firewalls, regional load balancers, Object Storage, Block Storage, CDN, Secret Manager, Container Registry and the organization wallet.
The API manages resources. Data stays on each product's own endpoint, with the
clients that already exist for it: files over the S3 API
(<workspace>.blob.ibeestorage.com, any S3 tool, or one file at a time with an
upload or download link), container images with docker at registry.ibee.ai, and
secret values with bao or vault at your Secret Manager endpoint.
The SDK is the client generated from the public API contract
(reference): every operation is one method,
sync (Ibee) and async (AsyncIbee), and the request is sent as you pass it. The
only hand-written code is configuration from the environment, safe retries,
automatic idempotency keys, error fields that read the server's answer unchanged, and
upload_file, which sends one file with an upload link.
The server decides everything else (prices, eligibility, limits, states): the SDK
looks nothing up, fills in no defaults and validates no request.
Install
pip install ibee
Python 3.10 or later.
Authenticate
Create a platform API token in the portal under Settings > API Tokens.
from ibee import Ibee
client = Ibee(token="ibee_prod_key_...", workspace_id="710995")
Or from the environment, first match wins:
| Setting | Argument | Environment |
|---|---|---|
| Token | token= |
IBEE_API_TOKEN, then IBEE_TOKEN |
| Workspace | workspace_id= (each call may pass its own) |
IBEE_WORKSPACE_ID |
| Endpoint | base_url=, environment=IbeeEnvironment.DEVELOPMENT |
IBEE_BASE_URL, IBEE_ENDPOINT, then IBEE_ENV (dev or prod) |
The default endpoint is production, https://api.ibee.ai/v1. A base URL must be
https (http only for localhost).
Example: create a VM
VM create needs billing_catalog, the contract's ComputeBillingSelection: copy the
chosen plan's billing_catalog from list_compute_plans and merge in the whole
billing_options entry of the term you choose (billing_interval, committed,
commitment_period, commitment_months, committed_hours, price_unit,
unit_price_minor), keeping its price_currency. The SDK does not build it for you;
this is the recipe:
from ibee import Ibee
client = Ibee() # IBEE_API_TOKEN and IBEE_WORKSPACE_ID from the environment
site = client.compute_catalog.list_compute_sites().sites[0]
plan = client.compute_catalog.list_compute_plans(vm_type="cloud", site_id=site.site_id).plans[0]
image = client.compute_catalog.list_compute_images(vm_type="cloud", site_id=site.site_id).images[0]
# HOURLY (pay as you go), or MONTHLY: a one-month commitment, during which delete and
# resize answer 409 VM_COMMITTED.
option = next(o for o in plan.billing_catalog["billing_options"] if o["billing_interval"] == "HOURLY")
billing_catalog = {**plan.billing_catalog, **option}
operation = client.cloud_vms.create_cloud_vm(
name="web-1",
site_id=site.site_id,
plan_id=plan.plan_id,
template_id=image.template_id,
os_type=image.os_type,
os_distro=image.os_distro,
cpu=plan.cpu,
ram_mb=plan.ram_mb,
disk_gb=plan.disk_gb,
billing_catalog=billing_catalog,
ssh_keys=["ssh-ed25519 AAAA... me"],
)
status = client.cloud_vms.get_compute_operation(operation.operation_id)
print(status.status) # accepted, running, ..., succeeded, failed
Without a term the server answers 400 compute_billing_term_required; a partial or
changed entry gets 400 invalid_compute_billing_selection. GPU VMs work the same way
with vm_type="gpu", create_gpu_vm, gpu_count and gpu_model.
A few calls to know:
- Resize moves the VM to another plan:
resize_cloud_vm(vm_id, cpu=..., ram_mb=..., disk_gb=..., billing_catalog=...)with the target plan's exact size fromlist_compute_plansand itsbilling_catalogwith abilling_optionsterm merged in, as for a create (precheck_cloud_vm_resizefirst, with the size only, is optional). client.billing.get_billing_wallet()reads the organization's wallet;client.billing.create_billing_topup(amount_minor=...)returns a payment page (checkout_url) that tops it up once paid.- Snapshot create and backup enable take a
billing_catalogfromcompute_catalog.list_snapshot_storage_plans()/list_backup_storage_plans(). disable_cloud_vm_backups(vm_id, request={})/disable_gpu_vm_backups: passrequest={}. Contract 0.7.1 declares an empty JSON object body; the production virtualization engine answers 422 to a request with no body.- VM delete sends
public_ip_actiononly when you pass it; for a VM with an automatically assigned public IP the server answers 400 until you passreleaseorreserve. - Lists return the page the server sends (
limit/offsetwhere the contract has them). - S3 keys:
revoke_s3credential(POST .../revoke, the record stays) anddelete_s3credential(DELETE, permanent). get_bucket_corsraisesibee.core.parse_error.ParsingErrorwhile the server returns S3-cased keys (AllowedOrigins, ...); the response is on the error'sbody.
Upload and download one file
upload_file computes the file's size and SHA-256, asks for an upload link
(create_object_upload_link) and PUTs the file to it on the workspace's S3 host.
The file never passes through the API and the API token is not sent with it. One link
carries one whole file of at most 80,000,000 bytes (the server's limit, in the
link's max_bytes); use an S3 tool for larger files.
uploaded = client.upload_file("my-bucket", "docs/report.pdf", "report.pdf",
content_type="application/pdf")
meta = client.object_storage.get_object_metadata("my-bucket", "docs/report.pdf")
assert meta.size_bytes == uploaded.size_bytes
assert meta.checksum_sha256 == uploaded.checksum_sha256
link = client.object_storage.create_object_download_link(
"my-bucket", "docs/report.pdf", expires=600, disposition="attachment")
print(link.url) # anyone holding it can download the file until it expires
A refused upload raises ApiError with the S3 gateway's answer (status_code, body).
Object keys go into the path as you pass them, with plain / between segments;
percent-encode other reserved characters (a space as %20).
Container Registry
registry = client.container_registry.create_container_registry(
registry_name="acme-apps",
confirm_registry_name="acme-apps",
billing_catalog={"sku_code": "REGISTRY-STORAGE-250GB"},
)
# 202 while provisioning: poll get_container_registry until observed_state is ACTIVE.
token = client.container_registry.create_container_registry_access_token(
registry.registry_id, token_name="ci-push", permission="PULL_PUSH", expires_in_days=30
)
# token.username and token.secret are returned once (docker login registry.ibee.ai).
The registry service asks Billing and answers; the SDK sends the request as given.
upgrade_container_registry_package gets a random Idempotency-Key when you pass no
idempotency_key, like the other keyed writes.
The full method list is in src/ibee/reference.md.
Errors
Every HTTP error raises the status-named class from ibee.errors for the statuses
the contract declares (BadRequestError, UnauthorizedError, PaymentRequiredError,
ForbiddenError, NotFoundError, ConflictError, UnprocessableEntityError,
LockedError, ServiceUnavailableError), or ApiError for any other status
(429, 500, 502, 504, ...). All of them subclass
ibee.core.api_error.ApiError and carry the server's answer as received:
from ibee.core.api_error import ApiError
try:
client.cloud_vms.start_cloud_vm("vm-1")
except ApiError as error:
print(error.status_code) # 402
print(error.code) # "billing_denied" (the gateway's error, or detail.code)
print(error.billing_reason) # "resource_limit_reached", "initial_topup_required", ...
print(error.required_topup_minor) # with initial_topup_required: 50000 (minor units)
print(error.billing_currency) # the currency of required_topup_minor, e.g. "INR"
print(error.message) # the server's message, or None when it sent none
print(error.admission_context_id) # billing admission context, when present
print(error.request_id) # the x-request-id response header
print(error.body) # the body exactly as received
print(error.idempotency_key) # the key sent, to retry the same write
The SDK adds no wording of its own. Bad configuration (a missing token, an unsafe base
URL, an unknown IBEE_ENV) raises ibee.client.IbeeValidationError, a ValueError,
before anything is sent; requests themselves are never validated by the SDK.
Retries and idempotency
- Where the contract has the
X-Idempotency-Keyheader (orIdempotency-Key, on Container Registry plan upgrade) and you pass noidempotency_key, the SDK sends a random one and reuses it on every retry. - Reads (GET, HEAD, OPTIONS) are retried on 429, 502, 503 and 504.
- Writes are retried only when they carry an idempotency key, and only on 429 and 503. VM creates (cloud and GPU) are never retried.
- A response with a billing or admission answer (
billing_reason,admission_context_id, or a billing, admission, catalog or quote code) is never retried, and neither is any other status. - A failed connection is retried; other network errors follow the rules above.
- At most
max_retriesretries (default 2;Ibee(max_retries=0)orrequest_options={"max_retries": 0}turns them off), with exponential backoff that honoursRetry-After.
Async
import asyncio
from ibee import AsyncIbee
async def main() -> None:
client = AsyncIbee()
print(await client.cloud_vms.list_cloud_vms())
asyncio.run(main())
Development
src/ibee is generated by Fern from contract/ibee-cloud.yaml, an exact copy of
fern/openapi/ibee-cloud.yaml in platform-docs, with the settings in fern/. The
hand-written files are listed in src/ibee/.fernignore; fern/overrides.yml makes
the workspace and idempotency headers optional (the SDK fills them). Regenerate with
scripts/regenerate.sh (Fern CLI 5.45.3 and Docker). Run the tests with
pip install -e . pytest && pytest -q.
CI checks every pull request:
scripts/check_generated.sh: regenerating fromcontract/ibee-cloud.yamlgives the committedsrc/ibee(the hand-written files aside).scripts/check_contract_calls.py: the hand-written files wrap no generated operation and name only paths ofcontract/ibee-cloud.yaml.
A pull request that changes contract/** gets the regenerated code pushed to its
branch (.github/workflows/regenerate.yml).
License
MIT
Metadata
Release files for ibee 0.11.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Change of provenance
The repository or configuration that created these release files differ from that of a previous release.
We recommend inspecting the repository and configuration before proceeding. View details.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ibee-0.11.1.tar.gz | 365.5 kB | With provenance | Details for ibee-0.11.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ibee-0.11.1-py3-none-any.whl | Python 3 | none | any | Details for ibee-0.11.1-py3-none-any.whl |
Total release size: 905.4 kB
Release files / ibee-0.11.1.tar.gz
Change of provenance
This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.
We recommend inspecting the repository and configuration before proceeding. View details.
| Download URL | ibee-0.11.1.tar.gz |
|---|---|
| Size | 365.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
18072f681519ff848080254ffc4f4e6ab679442fc3cfb03ce8e83bcc5ea79921
|
|
BLAKE2b-256 checksum How to use checksums |
8e5f327412b1cecb954ab15c759f4ca96cd65d37f0296ef632d0013e636604d5
|
| 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 30, 2026.
Transparency logRelease files / ibee-0.11.1-py3-none-any.whl
Change of provenance
This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.
We recommend inspecting the repository and configuration before proceeding. View details.
| Download URL | ibee-0.11.1-py3-none-any.whl |
|---|---|
| Size | 539.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e499e11007703cc83fefa4557474757f1be22931eeb476930c928a3bcbae6b3d
|
|
BLAKE2b-256 checksum How to use checksums |
155888610215590198a2651763c1f7d4a797e7e2e98a75fa228845a2a6159165
|
| 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 30, 2026.
Transparency logSecurity for ibee 0.11.1
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.
Change of provenance
The repository and configuration that created this release differ from a previous release.
While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.
Repository
- Removed 0.11.0 github.com/devs-ibee/ibee-python
- Added 0.11.1 github.com/IBEE/ibee-python
Attestation for ibee-0.11.1.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 30, 2026.
Transparency logA 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.