Metadata-Version: 2.4
Name: sparrow_nlp
Version: 0.1.0
Summary: Small Python client for Yandex AI Studio Responses API.
Project-URL: Homepage, https://github.com/artemvorobev/cheating_sparrow
Project-URL: Issues, https://github.com/artemvorobev/cheating_sparrow/issues
Author: Лунатик, Бродяга, Сохатый, Хвост
License-Expression: MIT
License-File: LICENSE
Keywords: ai-studio,deepseek,llm,yandex
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.9
Requires-Dist: openai<2,>=1.0
Description-Content-Type: text/markdown

# 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

```bash
python3 -m pip install -e .
```

After publishing to PyPI, users will install it as:

```bash
python3 -m pip install cheating_sparrow
```

The Python import stays underscore-based:

```python
from cheating_sparrow import ask
```

## Usage

```python
from cheating_sparrow import ask

answer = ask("Напиши Python-код для TF-IDF классификации текста.")
print(answer)
```

For more control:

```python
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:

```python
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

```bash
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:

```bash
python3 -m twine upload --repository testpypi dist/*
python3 -m pip install --index-url https://test.pypi.org/simple/ cheating_sparrow
```
