Run Python normally and invoke AI at the current statement
When Python doesn’t know what to do, Aiython does.
Run an existing Python script by replacing the command:
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.
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.
pip install aiython aiython setup aiython tickets.py Preview AI calls without running the script: aiython --explain tickets.py.
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.
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.




