Metadata-Version: 2.4
Name: aiython
Version: 0.1.0
Summary: Run Python normally and invoke AI at the current statement
Keywords: ai,python,runtime,llm,agent
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Interpreters
Requires-Dist: grep-ast>=0.9,<1
Requires-Dist: httpx>=0.28,<1
Requires-Dist: jsonschema>=4,<5
Requires-Dist: litellm>=1.102.1,<1.103
Requires-Dist: openrouter>=1.2.19,<1.3
Requires-Dist: prompt-toolkit>=3.0.53,<4
Requires-Dist: pydantic>=2.10,<3
Requires-Dist: python-dotenv>=1,<2
Requires-Dist: tomlkit>=0.15,<1
Requires-Dist: typing-extensions>=4.15,<5
Requires-Dist: a2a-sdk>=1.1.5,<1.2 ; extra == 'a2a'
Requires-Python: >=3.11
Project-URL: Homepage, https://sunmodza.github.io/aiython-docs/
Project-URL: Documentation, https://sunmodza.github.io/aiython-docs/
Provides-Extra: a2a
Description-Content-Type: text/markdown

# Aiython

**When Python doesn’t know what to do, Aiython does.**

**Run an existing Python script by replacing the command:**

```text
python app.py  →  aiython app.py
```

The same works for modules: `python -m package` → `aiython -m package`. Your script and its arguments stay the same. Aiython checks declared types and can call AI for inline requests or eligible errors.

## Example

```python
from typing import Literal

tickets = [
    "After uploading a PDF, the ticket page freezes until I refresh the browser.",
    "Could you email last month's invoice and update the billing contact for our team?",
]
queues = {"bug": [], "billing": []}

for ticket in tickets:
    kind: Literal["bug", "billing"] = classify this ticket
    queues[kind].append(ticket)

summary = summarize the routed tickets in one sentence
print(queues, summary)
```

Python runs the loop and updates `queues`. Aiython handles the inline requests using live program state and checks the declared `Literal` result.

## Try it

Save the example as `tickets.py`:

```bash
pip install aiython
aiython setup
aiython tickets.py
```

Preview AI calls without running the script: `aiython --explain tickets.py`.

[Documentation](https://sunmodza.github.io/aiython-docs/) · [Examples](https://sunmodza.github.io/aiython-docs/examples/) · [Installation](https://sunmodza.github.io/aiython-docs/getting-started/)

Aiython is not a sandbox: AI tools run with your process permissions, and relevant code or data may be sent to your provider. MIT licensed.
