A Python API wrapper for Suvvy AI API
Project description
An async API wrapper for Suvvy AI
built on top of httpx and pydantic :)
Installation
pip install -U suvvyapi
Synchronous Usage
from suvvyapi import SuvvyAPIWrapper, Message
suvvy = SuvvyAPIWrapper("YOUR_TOKEN")
# You can get your token at https://home.suvvy.ai/
response = suvvy.predict(Message(text="Say hello to Python!"), "random_id")
# 'Hello!'
Asynchronous Usage
import asyncio
from suvvyapi import AsyncSuvvyAPIWrapper, Message
suvvy = AsyncSuvvyAPIWrapper("YOUR_TOKEN")
# You can get your token at https://home.suvvy.ai/
async def main():
response = await suvvy.predict(Message(text="Say hello to Python!"), "random_id")
# 'Hello!'
asyncio.run(main())
Building from sources
git clone https://github.com/barabum0/suvvyapi
cd suvvyapi
pip install -r requirements.txt
python -m build
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
suvvyapi-0.1a6.tar.gz
(6.9 kB
view details)
Built Distribution
File details
Details for the file suvvyapi-0.1a6.tar.gz
.
File metadata
- Download URL: suvvyapi-0.1a6.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53bc608426e028f40cc5328fe968d4706a74fabcaa3cd39642290aa555c1b3e8 |
|
MD5 | 4e9c519402d4e57c67b1945c8591e7af |
|
BLAKE2b-256 | 57da76b26150eefd995a5a2902e0e8cbc462004e1c0178bd9244414f801894b6 |
Provenance
File details
Details for the file suvvyapi-0.1a6-py3-none-any.whl
.
File metadata
- Download URL: suvvyapi-0.1a6-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5381561bac044551f8193549c19cd805603f15e5ee0dfa8aa5a9a76c3ab7661 |
|
MD5 | c6b373a2959ff61d1e5c7813c0769823 |
|
BLAKE2b-256 | 7dd374c17f64e47ea005a9d5a8122eaa83256a3bf349e02f08004088835b7470 |