Skip to main content

Asyncio wrapper for TensorArt API

Project description

AsyncTensorArt

Asynchronous wrapper for the TensorArt API


async_tensorart is a Python package for asynchronous access to the TensorArt API.

Installation

pip install async-tensorart

Usage

import asyncio
from pathlib import Path

from aiohttp import ClientSession

from async_tensorart import TensorArt
from async_tensorart.signature import PrivateKey


async def main():
    # Create a TensorArt client
    tensor = TensorArt(
        app_id="APP_ID",
        endpoint="ENDPOINT",
        session=ClientSession(),
        private_key=PrivateKey(path=Path("private_key.pem")),
    )

    # Get model info
    model_info = await tensor.get_model(model_id=42)
    print(model_info)


asyncio.run(main())

License

This project is licensed under the terms of the MIT license.

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

async_tensorart-0.2.0.tar.gz (10.6 kB view hashes)

Uploaded Source

Built Distribution

async_tensorart-0.2.0-py3-none-any.whl (19.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page