Skip to main content

AILabTools SDK for Python (async)

Project description

AILabTools Python SDK (async)

Installation

pip install ailabtools-sdk

Quick Start

import os
import asyncio
from ailabtools import AILabClient

async def main():
    client = AILabClient(api_key=os.environ["AILAB_API_KEY"])
    credits = await client.common.commonQueryCredits({})
    print(credits.get("data"))
    await client.aclose()

asyncio.run(main())

Parameter Mapping

The SDK exposes camelCase parameters, for example upscaleFactor, and maps them to API field names such as upscale-factor internally.

File Uploads

File parameters support file-like objects with a read method, or bytes / bytearray.

Async Tasks

Async APIs return task_id. Poll results with commonQueryAsyncTaskResult({"taskId": ...}).

Testing

AILAB_API_KEY=xxx pytest -q

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

ailabtools_sdk-0.5.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

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

ailabtools_sdk-0.5-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

Details for the file ailabtools_sdk-0.5.tar.gz.

File metadata

  • Download URL: ailabtools_sdk-0.5.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for ailabtools_sdk-0.5.tar.gz
Algorithm Hash digest
SHA256 a3371cc808ac95de583a214f351df0364b64eae4acdacec2d7784a8785b277c0
MD5 6065fc8a45559bbf35618a8b18bcd9d0
BLAKE2b-256 9e0d746341f471ef9e4e45d9665a9e28ee91bdb70498444b6f9a78ee6ec3efd4

See more details on using hashes here.

File details

Details for the file ailabtools_sdk-0.5-py3-none-any.whl.

File metadata

  • Download URL: ailabtools_sdk-0.5-py3-none-any.whl
  • Upload date:
  • Size: 18.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for ailabtools_sdk-0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 793fa9de22cfb84cafba1d1fce34552461e113984a8e896e0fd0c9e691f67df1
MD5 a50eb557fd277932994dba25ff4e14b1
BLAKE2b-256 6cc42190cb590ea1724b2c6de9a3bf1cbedc0ce993c4db9451a6068af25c68c7

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