Skip to main content

Python client for the Intelion Cloud API

Project description

Intelion Cloud Python Client

PyPI Python License

Official Python SDK for the Intelion Cloud GPU cloud API (/api/v2/).

Sync and async clients, typed dataclass models, automatic pagination, retries with exponential backoff.

Install

pip install intelion-cloud

Requires Python 3.9+.

Quickstart

from intelion_cloud import IntelionCloud

client = IntelionCloud(token="your_api_token")

# List your cloud servers
for server in client.cloud_servers.list():
    print(server.id, server.name, server.status)

# Start / stop a server
client.cloud_servers.start(server_id=42)
client.cloud_servers.stop(server_id=42)

# Create a new server
new_server = client.cloud_servers.create(
    name="my-h100-box",
    flavor_id=1,          # FlavorConfig PK
    ssd_count=100,        # network disk size, GB (min 30)
    os_id=1,              # OperationalSystemImage PK
    price_plan=0,         # 0 = hourly, 1 = monthly, ...
)

client.close()

Async client

import asyncio
from intelion_cloud import AsyncIntelionCloud

async def main():
    async with AsyncIntelionCloud(token="your_api_token") as client:
        me = await client.users.me()
        print(me.username, me.current_balance_rub_cents)

asyncio.run(main())

Context manager

with IntelionCloud(token="...") as client:
    servers = client.cloud_servers.list()

Available resources

Resource Methods
client.cloud_servers list(), get(), create(), update(), start(), stop(), reboot(), delete(), get_status(), get_password(), clone(), migrate()
client.flavors list()
client.os_images list(flavor_id=, gpu_id=)
client.users me(), get(), update()

Authentication

Get your API token from the Intelion Cloud dashboard. The client sends it as Authorization: Token {token}.

Error handling

from intelion_cloud import (
    AuthenticationError, NotFoundError, ConflictError,
    RateLimitError, ValidationError, ServerError,
)

try:
    server = client.cloud_servers.get(999)
except NotFoundError:
    print("Server not found")
except AuthenticationError:
    print("Invalid token")
except ValidationError as e:
    print("Field errors:", e.field_errors)

Links

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

intelion_cloud-0.2.3.tar.gz (22.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

intelion_cloud-0.2.3-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

Details for the file intelion_cloud-0.2.3.tar.gz.

File metadata

  • Download URL: intelion_cloud-0.2.3.tar.gz
  • Upload date:
  • Size: 22.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for intelion_cloud-0.2.3.tar.gz
Algorithm Hash digest
SHA256 1313a035b673bc3f57ed6b8eb55659ce9f939c153793d88e7e94d00e99841ba0
MD5 0b409788cef2845c6c9e0dab7f2f9985
BLAKE2b-256 cde4b58df96c87dfbbe088766123b50b1e22615cc011f1267c03e096a88e6002

See more details on using hashes here.

Provenance

The following attestation bundles were made for intelion_cloud-0.2.3.tar.gz:

Publisher: release.yml on IntelionCloud/ic_python_client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file intelion_cloud-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: intelion_cloud-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 22.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for intelion_cloud-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b871790dfd0ab4fc64f099efa12107879a5985098852abbe57490581041ae39a
MD5 dfb891d14f5dcbe938a764a9b9df3b12
BLAKE2b-256 0cbb79ee35d0762a3a22dffdc8b2da6bc7670209f5532b2eadf079093ee173f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for intelion_cloud-0.2.3-py3-none-any.whl:

Publisher: release.yml on IntelionCloud/ic_python_client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page