This repository contains a curated set of Jupyter notebooks designed to build a strong Python foundation for data and AI work. It is structured to learn and progress from core language skills to advanced topics used in modern AI engineering:
decoratorsand advanced function patternspydanticfor validation and data modelingasynciofor asynchronous programmingai-agentsbuilding using plain Python without external frameworks
The notebooks focus on practical examples and runnable code so we can explore and adapt the patterns for Data and AI use cases.
[Decorators] --> [Pydantic] --> [Async Python] --> [AI Agents]
| | | |
| | | |
Better Strong Concurrent Framework-
abstractions validation executions free AI logic
- Clone the repository:
git clone https://github.com/pasrichashivam/python-for-ai-data.git
cd python-for-ai-data- Sync the project with
uvif available in your environment:
uv syncIf uv is not available, use your preferred package manager.
- Install dependencies required by a notebook environment. If you are using a Python virtual environment:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt| Module | Description |
|---|---|
01-decorators |
Decorator patterns, higher-order functions, and practical uses in data pipelines and AI |
02-pydantic_models |
Data validation, typed models, settings, and best practices using pydantic with AI |
03-async_runs |
Step bt step progess with Async programming with asyncio, concurrency patterns |
04-agent_building |
Building simple AI Agentic loop using bare Python logic, without external frameworks |
The repository follows a step-by-step learning path:
- Master decorators to build reusable abstractions.
- Use
pydanticto validate and structure data. - Add async programming skills for scalable API calls, IO and workflows.
- Build AI agent logic with bare Python, focusing on design rather than framework usage.
- Open each notebook sequentially to follow the learning flow.
- Run the examples and modify code blocks to experiment with behavior.
- Use the notebooks as templates for new AI and data projects.
- Combine patterns from multiple notebooks to build more advanced applications.
- This repository is ideal for learners who want to move beyond libraries and understand the Python foundations underpinning modern AI systems.
- The emphasis is on simple, practical examples that can be reused in real projects.