Python Programming in Examples and Exercises
Alexey Vasiliev
- Programming
- Python
A Python textbook from syntax to working with different data types, classes and threads. Each topic comes with worked examples and exercises to check what you’ve learned.
Key ideas
- Lists, dictionaries and sets solve most tasks — what matters is choosing the right structure.
- Generators save memory on large data.
- Exceptions are part of a program’s normal flow and need to be thought through in advance.
- Threads speed up network and file work but require care with shared data.
How I apply it
Concurrent requests are an everyday task in AI agents: models, external APIs and databases respond with a delay, and without concurrency an agent is slow.
Where and how I applied it

Demo · Python scraper · runs in the browser
Competitor price monitoring
The parser crawls three competitors’ sites in parallel with asyncio.

Demo · Machine learning in Python · runs in the browser
Marketplace review analytics
Reviews from Wildberries, Ozon and Yandex Market are collected at the same time, each marketplace with its own pagination.

Demo · Python backend · webhooks → amoCRM and Bitrix24
Lead integration hub
Leads are delivered to CRM in parallel, with retries when the CRM is down.

Demo · Telegram and Max · knowledge base search
AI support from a knowledge base
The bot runs in Telegram and Max at the same time in one process.
More on the shelf
Reading
Hands-On APIs for AI and Data Science
Ryan Day
A practical book on building an API for data and connecting AI to it. The running project is a FastAPI service with a database and documentation, then an SDK for it, using the API in analytics and, finally, LangChain agents that call the API themselves.
AI and agentsPythonAPIApplied in 3 projectsReading
Server Applications in Python, Django, Flask and FastAPI
R. S. Bukharev
The path of server-side development in Python, from sockets and protocols to architecture and launch on a server. Django, Flask and FastAPI are covered through real projects: a CRM system, a Telegram bot with server-side logic, a REST API for a mobile app and a WebSocket chat. Separate chapters cover caching and scaling, Docker and Kubernetes, PostgreSQL, MySQL, SQLite and MongoDB, and security: password hashing, JWT and OAuth 2.0, protection against SQL injection, XSS and CSRF, TLS.
ProgrammingPythonBackendApplied in 1 project





