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.1.0.tar.gz (16.7 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.1.0-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ailabtools_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 16.7 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.1.0.tar.gz
Algorithm Hash digest
SHA256 7d5dccd7438ef8b523f90dcc178ed2824c5c9f2084a143b890acf805887ad8bc
MD5 256c92e7a7697ce3035566daa31ddb97
BLAKE2b-256 41e010867a134507246915b9efbf5a162c9aa3343505af6072eea9954712dc30

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ailabtools_sdk-0.1.0-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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f9a3e61d17e6e19a7a57e87028d4fbc37d0e3afe323eba4953d5bfbe8d903a43
MD5 16073af995ea39645d4640dc6222ca07
BLAKE2b-256 d1a58d84650c1732612c85ef89a049ff9d42a77347744c2d5d8e861b02e7441d

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