Skip to main content

Python SDK for the TQNN AnyEngine API

Project description

TQNN SDK

Python SDK for the TQNN AnyEngine API.

Access TQNN's cloud-hosted inference engine through a simple Python interface.


Installation

pip install tqnn


Quick Start

from tqnn import TQNNClient

client = TQNNClient( api_key="TQNN_xxxxxxxxxxxxxxxxx", base_url="[https://tqnn-anyengine-api-914075492772.northamerica-northeast1.run.app]" )

result = client.run_any( data=[1, 2, 3, 4], mode="ANY" )

print(result)


Supported Modes

Mode| Description ANY| Automatic inference EEG| EEG and biosignal analysis FINANCE| Financial data analysis CHEM| Molecular and chemistry analysis TEXT| Text inference TABULAR| Structured data analysis IMAGE| Image feature analysis


Authentication

Every request requires a valid TQNN API key.

client = TQNNClient( api_key="TQNN_xxxxxxxxxxxxxxxxx", base_url="https://tqnn-anyengine-api-914075492772.northamerica-northeast1.run.app" )

API keys are issued after subscribing through TQNN Labs.


Basic Usage

from tqnn import TQNNClient

client = TQNNClient( api_key="TQNN_xxxxxxxxxxxxxxxxx", base_url="[https://tqnn-anyengine-api-914075492772.northamerica-northeast1.run.app]" )

result = client.run_any( data=[1, 2, 3, 4], mode="ANY" )

print(result)


EEG Example

result = client.run_any( data=eeg_samples, mode="EEG", sfreq=250 )


Finance Example

result = client.run_any( data={ "rsi": 63.2, "macd": 1.12, "slope": 0.05 }, mode="FINANCE" )


Chemistry Example

result = client.run_any( data="CCO", mode="CHEM" )


Optional Parameters

result = client.run_any( data=my_data, mode="ANY", label="sample", metadata={ "source": "demo" } )


API Reference

client.run_any( data, mode="ANY", label=None, metadata=None, sfreq=None )

Parameters

Parameter| Description data| Input data for inference mode| ANY, EEG, FINANCE, CHEM, TEXT, TABULAR, IMAGE label| Optional sample label metadata| Optional metadata dictionary sfreq| Sampling frequency for EEG data


Example Response

{ "prediction": "class_a", "confidence": 0.94, "mode": "ANY" }


Status

TQNN SDK Version: 0.1.0

Public API: Active

Supported Modes:

  • ANY
  • EEG
  • FINANCE
  • CHEM
  • TEXT
  • TABULAR
  • IMAGE

Requirements

  • Python 3.9+
  • requests >= 2.31.0

License

MIT License

Copyright (c) TQNN Labs


TQNN SDK provides access to the TQNN AnyEngine API.

The underlying inference engine, backend infrastructure, and proprietary computational methods remain the intellectual property of TQNN Labs.

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

tqnn-0.1.3.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

tqnn-0.1.3-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file tqnn-0.1.3.tar.gz.

File metadata

  • Download URL: tqnn-0.1.3.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for tqnn-0.1.3.tar.gz
Algorithm Hash digest
SHA256 45619a63b90ae080a2633f99a225124fb1136d2549306ea91ed5f97695e9729f
MD5 f308e1be04610b341df6f6af0bbde9b9
BLAKE2b-256 88c10009a6ee499c6f6288216ad296892b2c384fca549079d4bd9651a1a5b3cf

See more details on using hashes here.

File details

Details for the file tqnn-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: tqnn-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for tqnn-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d07fa79e28543be711200eb7bbf0cd52d7d9f61edff4a3962ef04ba609a02490
MD5 a0f6e8a7f057dd7cf66f3c0d57f96e75
BLAKE2b-256 a31ebb177e6aada8f3ffffa89afe4506b18f7848f8c1fc14d92b03b1452e0bb7

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