Programming foundations
Write production-quality Python for AI work
Write clean, tested Python with virtualenvs, typing, packaging and async basics — the lingua franca of every AI role.
~30 focused hours·beginner
Tools: Python 3.12, venv/uv, pytest, type hints (mypy), asyncio, ruff
Market relevance — share of job ads asking for this
What employers mean
You should be able to…
- Write clean, typed Python functions instead of untyped notebook cells
- Set up a virtualenv/uv project with pinned dependencies (requirements.txt or pyproject.toml)
- Write pytest unit tests with fixtures and mocks for functions that call external APIs
- Use async/await to call multiple LLM or third-party APIs concurrently
- Package a script into an importable module with a proper __init__.py and CLI entrypoint
- Handle exceptions and retries around flaky network calls instead of letting scripts crash
- Read and refactor someone else's Python codebase without breaking existing tests
Learn — free, link-checked
The few resources that matter
Read · beginner · 20 min · docs.pytest.org
pytest — Get Started
pytest is the de facto testing tool employers expect; this gets you writing and running real tests in minutes. — pytest
Read · beginner · 90 min · docs.python.org
The Python Tutorial
Ground yourself in modern Python syntax and idioms straight from the source before layering AI-specific libraries on top. — Python Software Foundation
Read · beginner · 120 min · fastapi.tiangolo.com
FastAPI — User Guide / Tutorial
The official, example-driven walkthrough from hello-world to a typed, validated, auto-documented API — the framework Indian AI job posts name most. — FastAPI (tiangolo)
Watch · beginner · 360 min · youtube.com
Data Structures and Algorithms in Python - Full Course for Beginners
Builds every core data structure from scratch in Python, cementing both DSA concepts and idiomatic Python at once. — freeCodeCamp.org
Read · intermediate · 25 min · docs.github.com
Building and testing Python
Shows exactly how to wire pytest and matrix Python versions into a CI workflow — the setup interviewers ask you to describe. — GitHub Docs
Read · intermediate · 30 min · docs.python.org
typing — Support for type hints
Type hints are expected in production AI codebases (Pydantic, FastAPI); the canonical reference for annotating functions and generics correctly. — Python Software Foundation
Read · intermediate · 35 min · docs.python.org
asyncio — Asynchronous I/O
LLM API calls are I/O-bound; understanding async/await lets you fan out concurrent model calls instead of blocking one at a time. — Python Software Foundation
Practice
UPI Support-Ticket Triage CLI
Build a typed Python package that reads a folder of mock UPI transaction-failure support tickets (JSON), classifies each into a category (refund, fraud, technical) using simple rules or a small model call, and writes a summary CSV. Wrap it in a Typer CLI, add async batch processing for a folder of 500+ tickets, and cover the classifier with pytest tests using fixtures.
Done when
- Runs via `python -m triage --input tickets/ --output summary.csv` with no crashes on malformed input
- At least 80% pytest coverage on the classification and I/O modules, run via `pytest --cov`
- Uses type hints throughout and passes `mypy` with zero errors
- Processes 500 mock tickets concurrently with asyncio in under 10 seconds on a laptop
Prove it
Evidence a recruiter can check
- Public GitHub repo with a README showing the architecture, sample input/output and how to run tests
- CI badge or screenshot showing pytest passing on every push
- A short write-up (or code comment) explaining one bug caught by the type checker or a test
Interview
Questions you'll get asked
- What's the difference between a list and a generator, and when would you use each?
- Explain GIL — does multithreading help a CPU-bound vs an I/O-bound Python task?
- How would you structure a Python project that calls an LLM API with retries and rate limiting?
- What does `async def` actually buy you over a regular function when calling 5 APIs?
- How do you mock an external API call in a pytest test?
- What's the difference between `@staticmethod`, `@classmethod` and a regular method?
- Walk me through how you'd add type hints to a function that returns either a dict or None.