Библиотека для использования RuModeratorAI (https://moderator.pysols.ru)
Project description
RuModeratorAI
Библиотека для использования RuModeratorAI API (https://moderator.pysols.ru).
Установка
pip install rumoderatorai
Пример использования
from rumoderatorai import Client
import asyncio
from PIL import Image
import os
from pathlib import Path
async def main():
async with Client(
api_key=os.getenv("RUMODERATORAI_API_KEY")
) as client:
text_response = await client.get_text_class("Hello, world!")
print(text_response)
profile_response = await client.get_profile_class(
username="test",
first_name="test",
last_name="test",
description="test",
is_premium=False,
)
print(profile_response)
image = Image.open("tests/image.png")
image_response = await client.get_image_class(image)
print(image_response)
stats_response = await client.get_stats()
print(stats_response)
key_info_response = await client.get_key_info()
print(key_info_response)
prediction_response = await client.get_prediction(unique_id=text_response.unique_id)
print(prediction_response)
ips_response = await client.get_ips()
print(ips_response)
prices_response = await client.get_prices()
print(prices_response)
asyncio.run(main())
Примечание: Не забудьте установить переменную окружения RUMODERATORAI_API_KEY перед запуском кода.
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
rumoderatorai-0.1.0.tar.gz
(5.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rumoderatorai-0.1.0.tar.gz.
File metadata
- Download URL: rumoderatorai-0.1.0.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c8fabda90a21cda94c078ccb69c599389c145e734c3cc5a08b117d3efe7f5b3
|
|
| MD5 |
cd7ac07a72654c0967f99f1fa244cde6
|
|
| BLAKE2b-256 |
4bb9d9883ee0b6c634d721f512cdcbd21a0cbde2408871b81933846c7266ff50
|
File details
Details for the file rumoderatorai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: rumoderatorai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89ef4ba726ff19df7d986940f0cc9bbd46e3db573b4450fe597f1e4ed03dd2e5
|
|
| MD5 |
2c2b4d5b92a4d60fc0627d1d2abeb4bb
|
|
| BLAKE2b-256 |
9945f89729042d4f9b4362ad50b976a60d514c265a8aabbfa2f4dbbf6aa69a4d
|