This is a minimal starter project for PydanticAI, using uv to manage installations and run commands.
Need inspiration? Check out the official Pydantic AI Examples.
Clone this repository and install dependencies:
git clone https://github.com/cherninlab/pydantic-ai-starter.git
cd pydantic-ai-starter
uv sync
By default,
uv sync
reads pyproject.toml and installs the [project] dependencies.
Run the main script:
uv run --env-file .env -- python -m pydantic_ai_starter
This starter installs multiple providers via pydantic-ai-slim
extras:
- openai
- anthropic
- mistral
- groq
- logfire
Configure your keys (if needed)
- Build with Docker:
docker-compose build
- Run:
docker-compose up
This will run
__main__.py
by default inside the container.
- GitHub Actions in
.github/workflows/CI.yml
for linting (pre-commit
) - Pre-commit config in
.pre-commit-config.yaml
- Example test in
tests/test_example.py
Happy coding with PydanticAI! 🚀