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.2.tar.gz (22.0 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.2-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: intelion_cloud-0.2.2.tar.gz
  • Upload date:
  • Size: 22.0 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.2.tar.gz
Algorithm Hash digest
SHA256 7d972b72e32d4328dc0e96b1b8dcf7878254fd9713fe915bad1ee07375a513a1
MD5 e1886d4c78e1e07a8caa24dbcc95b89f
BLAKE2b-256 94d5cf3dc1fd0442aeeb176ffa145207b4a7c33d3cbbf901d786170e4c00bdf9

See more details on using hashes here.

Provenance

The following attestation bundles were made for intelion_cloud-0.2.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: intelion_cloud-0.2.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 26cdda958487f74429b9991a20c9a8024844c2a58ba90734da2ab9463e823212
MD5 f420e09dac5fa0eaec35f68dff2dab18
BLAKE2b-256 0a8f6a3c54eefeddf4a28dc2c46ef563690023e9d1d1970ed248231ea791c1b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for intelion_cloud-0.2.2-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