Skip to main content

A Python SDK for the Zeabur platform, generated from the GraphQL schema.

Project description

Zeabur Python SDK

A Python SDK for the Zeabur platform, generated from the GraphQL schema.

Installation

You can install the SDK using pip:

pip install zeabur

Usage

First, you need to obtain an API key from the Zeabur dashboard.

Initialization

from zeabur import Zeabur

# Initialize the client
client = Zeabur(api_key="YOUR_API_KEY")

Async Usage

All methods in the SDK are asynchronous. You need to use await to call them.

import asyncio
from zeabur import Zeabur

async def main():
    client = Zeabur(api_key="YOUR_API_KEY")

    # List projects
    projects = await client.projects()
    for edge in projects.edges:
        print(f"Project ID: {edge.node.id}, Name: {edge.node.name}")

if __name__ == "__main__":
    asyncio.run(main())

Creating a Service

from zeabur import Zeabur, ServiceTemplate

async def create_service():
    client = Zeabur(api_key="YOUR_API_KEY")

    project_id = "YOUR_PROJECT_ID"

    service = await client.create_service(
        name="my-service",
        template=ServiceTemplate.GIT,
        project_id=project_id,
        # ... other parameters
    )
    print(f"Created service: {service.id}")

Development

  1. Install dependencies:

    pip install -e .[test]
    
  2. Generate operations and client code:

    python generate_operations.py
    ariadne-codegen
    
  3. Run tests:

    pytest
    

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

zeabur-0.1.1.tar.gz (44.7 kB view details)

Uploaded Source

Built Distribution

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

zeabur-0.1.1-py3-none-any.whl (88.5 kB view details)

Uploaded Python 3

File details

Details for the file zeabur-0.1.1.tar.gz.

File metadata

  • Download URL: zeabur-0.1.1.tar.gz
  • Upload date:
  • Size: 44.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for zeabur-0.1.1.tar.gz
Algorithm Hash digest
SHA256 150690a2676058beae114ddf28379c62a0c7860ed4c9954d5bfac9e1b2eeab9f
MD5 dd73b6066afb75e6512e4528260abfc4
BLAKE2b-256 dbef1099c5599bf962707a8934659c1af6ecb0cb86b4d22eaa82672ccd00d788

See more details on using hashes here.

File details

Details for the file zeabur-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: zeabur-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 88.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for zeabur-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 363e2538b978455d82f924005d1911615656272498fedc34f800fa0af3faed28
MD5 c1de9f85e9c50d58bc1934746b7e8451
BLAKE2b-256 10e85eaac2ecf6ee8a6de569c0c2c3ac5d47ff284bf2a5a0315a7804ebafb937

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