Small Python client for Yandex AI Studio Responses API.
Project description
cheating_sparrow
Minimal Python client for Yandex AI Studio OpenAI-compatible Responses API.
Security
This package is intentionally minimal. If you publish it with a real API key inside the code, everyone who installs the package can extract and use that key.
Install locally
python3 -m pip install -e .
After publishing to PyPI, users will install it as:
python3 -m pip install cheating_sparrow
The Python import stays underscore-based:
from cheating_sparrow import ask
Usage
from cheating_sparrow import ask
answer = ask("Напиши Python-код для TF-IDF классификации текста.")
print(answer)
For more control:
from cheating_sparrow import YandexAIStudioClient
client = YandexAIStudioClient()
answer = client.ask(
"Объясни лемматизацию в NLP.",
instructions="Отвечай кратко.",
temperature=0.3,
max_output_tokens=500,
)
print(answer)
The package uses the same call as the raw OpenAI SDK:
import openai
YANDEX_CLOUD_FOLDER = "b1g22m7kb1cbitqfp8gf"
YANDEX_CLOUD_API_KEY = "***...X3OyrU"
YANDEX_CLOUD_MODEL = "gpt-oss-120b/latest"
client = openai.OpenAI(
api_key=YANDEX_CLOUD_API_KEY,
base_url="https://ai.api.cloud.yandex.net/v1",
project=YANDEX_CLOUD_FOLDER,
)
response = client.responses.create(
model=f"gpt://{YANDEX_CLOUD_FOLDER}/{YANDEX_CLOUD_MODEL}",
temperature=0.3,
instructions="",
input="",
max_output_tokens=500,
)
print(response.output_text)
Publish to PyPI
python3 -m pip install -U build twine
python3 -m build
python3 -m twine check dist/*
python3 -m twine upload dist/*
Use TestPyPI first while testing releases:
python3 -m twine upload --repository testpypi dist/*
python3 -m pip install --index-url https://test.pypi.org/simple/ cheating_sparrow
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
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 cheating_sparrow-0.1.0.tar.gz.
File metadata
- Download URL: cheating_sparrow-0.1.0.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a6c448d5def8c73f6966fc31534318a2234ae9e32c4d57142e09be977d8d715
|
|
| MD5 |
25f29badfb33fcc31343d14c5ca81b1e
|
|
| BLAKE2b-256 |
33c96c0135eee34f1a49b36ca08727316258298a896beb25a8e7e2a2a41cc86c
|
File details
Details for the file cheating_sparrow-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cheating_sparrow-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3779d902e8b8c63c7530294fee6f66023cd760a4568ea454f84b6574a0cde01
|
|
| MD5 |
4a9869146a5d46f168e51be071960f29
|
|
| BLAKE2b-256 |
5344f82456d1dc305df6f19c14cc7a1e9b1c3cc3e1a412a08519ea4d0718e17d
|