Skip to main content

Platz.io SDK for Python

Project description

Platz.io Python SDK

Typed Python client for the Platz.io API. It is generated from the backend's OpenAPI schema with openapi-python-client and ships both synchronous and asynchronous clients built on httpx, with full type hints.

Installation

pip install platz

Pre-release versions track the Platz backend betas, so install those with --pre:

pip install --pre platz

Requires Python 3.10+.

Usage

The client is token-authenticated. Create an AuthenticatedClient, then call the operation functions grouped by API collection under platz.api.*. Every operation exposes four entry points: sync / asyncio (return the parsed body) and sync_detailed / asyncio_detailed (return a Response with the status code, headers, and parsed body).

Synchronous

from platz import AuthenticatedClient
from platz.api.deployments import all_deployments

client = AuthenticatedClient(
    base_url="https://your-platz-instance.example.com",
    token="YOUR_API_TOKEN",
)

# Parsed body:
page = all_deployments.sync(client=client, enabled=True)
for deployment in page.items:
    print(deployment.id, deployment.name)

# Full response (status code, headers, parsed body):
response = all_deployments.sync_detailed(client=client)
print(response.status_code, response.parsed.num_total)

Asynchronous

import asyncio

from platz import AuthenticatedClient
from platz.api.deployments import all_deployments


async def main():
    async with AuthenticatedClient(
        base_url="https://your-platz-instance.example.com",
        token="YOUR_API_TOKEN",
    ) as client:
        page = await all_deployments.asyncio(client=client)
        for deployment in page.items:
            print(deployment.name)


asyncio.run(main())

Layout

  • platz.api.<collection>.<operation> — request functions, e.g. platz.api.deployments.all_deployments, platz.api.secrets.create_secret.
  • platz.models — request and response models (attrs classes).
  • platz.AuthenticatedClient / platz.Client — the httpx-backed clients (usable as sync and async context managers).
  • platz.types.Response — the wrapper returned by the *_detailed functions.

Development

The platz/ package is generated from the backend OpenAPI schema and is not committed. To build locally you need uv:

# Regenerate from a schema file, then build the distribution:
./generate-sdk.sh path/to/openapi.yaml
uv build

See AGENTS.md for versioning and release details.

License

Apache-2.0

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

platz-0.7.0b4.tar.gz (65.9 kB view details)

Uploaded Source

Built Distribution

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

platz-0.7.0b4-py3-none-any.whl (246.1 kB view details)

Uploaded Python 3

File details

Details for the file platz-0.7.0b4.tar.gz.

File metadata

  • Download URL: platz-0.7.0b4.tar.gz
  • Upload date:
  • Size: 65.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for platz-0.7.0b4.tar.gz
Algorithm Hash digest
SHA256 64d971037ee8236b82501e640b0bf51ab2a1379681b3ab184e58b323f34452ad
MD5 5bbffc0ea84d4f1fda3f9370e5454b1e
BLAKE2b-256 c309d4dc7911e970dc6da1dcd45a480290f49a8dde0deb9fcc16cf87ca8a8f1d

See more details on using hashes here.

File details

Details for the file platz-0.7.0b4-py3-none-any.whl.

File metadata

  • Download URL: platz-0.7.0b4-py3-none-any.whl
  • Upload date:
  • Size: 246.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for platz-0.7.0b4-py3-none-any.whl
Algorithm Hash digest
SHA256 25a3bbd2c1640b25664da4efc3f53604499d982ac9dfbb975381c69763672f2d
MD5 fc2f218527c149ebe535edbaf9050958
BLAKE2b-256 d3497e2b46b5994b786c08a3787827f5fc91b80c689d711ccb6c2c92fa8c07d1

See more details on using hashes here.

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