Skip to content

Python AI Applications

AI apps written as ordinary, well-structured Python.

Most AI application code isn't about the model. It's request handling, validation, data processing, error handling and tests, written in Python with the same libraries used everywhere else.

These applications use FastAPI or Streamlit for the interface, Pydantic to validate data going in and out of the model, and pytest to check behaviour without calling a paid API on every test run.

Applications

Free guides

FAQ

FastAPI or Streamlit?

Streamlit is quickest for an internal tool or a demo with a user interface. FastAPI suits a backend that other apps or a separate front end will call.

How do you test code that calls an LLM?

Replace the model call with a fake that returns fixed replies, and test everything around it. Keep a small set of real-model checks for prompts you change.

More topics