Skip to content
devanshu-puriPublic

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Python: From First Principles to AI Engineering

Python Focus Status Last commit

A living learning lab for building Python intuition, one small system at a time.


πŸ“Š Journey Dashboard

Journey dashboard

Current checkpoint: Python foundations + mental-bridge applications
Overall: β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘ 63%

Plain-text view
Python foundations    [β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ] 100%
Pythonic thinking     [β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ] 100%
Object-oriented code  [β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘]  90%
Module library        [β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘]   0%
Intermediate Python   [β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘]   0%
Small applications    [β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ] 100%
Backend engineering   [β–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘]  17%
ML fundamentals       [β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘]   0%
LLM / RAG / agents    [β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘]   0%
Production AI         [β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘]   0%

Edit journey.json, push, and the dashboard, map, and book below rebuild automatically. See How to update.

πŸ—ΊοΈ Learning Map

flowchart LR
    t0["🧱 Python foundations<br/>100%"]
    t1["🐍 Pythonic thinking<br/>100%"]
    t2["🧩 Object-oriented code<br/>90%"]
    t3["πŸ“š Module library<br/>0%"]
    t4["πŸ› οΈ Intermediate Python<br/>0%"]
    t5["πŸš€ Small applications<br/>100%"]
    t6["πŸ—οΈ Backend engineering<br/>17%"]
    t7["πŸ“ˆ ML fundamentals<br/>0%"]
    t8["πŸ€– LLM / RAG / agents<br/>0%"]
    t9["πŸ›‘οΈ Production AI<br/>0%"]
    t0 --> t1 --> t2 --> t3 --> t4 --> t5 --> t6 --> t7 --> t8 --> t9
    classDef done fill:#bbf7d0,stroke:#166534,color:#052e16;
    classDef current fill:#fde68a,stroke:#92400e,color:#451a03,stroke-width:3px;
    classDef future fill:#e0f2fe,stroke:#075985,color:#082f49;
    class t0,t1,t5 done;
    class t2,t6 current;
    class t3,t4,t7,t8,t9 future;
Loading

🟒 complete Β· 🟑 in progress Β· πŸ”΅ upcoming

πŸ“– The Book: Chapters, Topics, Subtopics

Every chapter lists what was covered, and where that idea shows up later in AI or backend engineering.

Part 1 Β· 🧱 Python foundations β€” 100%

Chapter 1: Data, Logic & Functions Β Β·Β  7/7 topics

Lessons 1 to 7: the raw material every program is made of.

Topic Source Subtopics covered Future reference (AI / backend)
βœ… Strings 1Strings.py slicing, f-strings, methods Prompt templates and text cleaning for LLM inputs
βœ… Numeric data 2NumericData.py int/float, operators, conversion Token counts, scores, and metrics
βœ… Lists, sets, tuples 3List_Set_Tuple.py mutability, membership, ordering Batches of documents, permission sets, immutable configs
βœ… Dictionaries 4Dictonaries.py lookup, nesting, iteration JSON payloads and API records
βœ… Conditionals & booleans 5Conditional_Boolean.py if/elif/else, truthiness Request routing and guardrail checks
βœ… Loops & iterators 6Loosps_Iterator.py for/while, iter/next Streaming tokens and retry loops
βœ… Functions 7Function.py args/kwargs, return values, scope Service handlers and agent tool functions

Part 2 Β· 🐍 Pythonic thinking β€” 100%

Chapter 2: Idiomatic Python Β Β·Β  2/2 topics

Writing less code that says more.

Topic Source Subtopics covered Future reference (AI / backend)
βœ… Comprehensions 9Comprehension.py list, dict, set Fast data shaping in ETL and feature prep
βœ… Python mental models Python_Mental_Models.md syntax to systems Seeing backend and AI patterns in plain Python

Part 3 Β· 🧩 Object-oriented code β€” 90%

Chapter 3: Classes & Abstraction Β Β·Β  4/5 topics

Bundling data and behavior.

Topic Source Subtopics covered Future reference (AI / backend)
βœ… Classes & instances 10OOP.py init, class variables Models, clients, and service objects
βœ… Class & static methods 10OOP.py @classmethod, @staticmethod Alternate constructors, e.g. Model.from_config()
βœ… Inheritance 10OOP.py super(), overriding Base provider classes for LLM vendors
βœ… Special methods & properties 10OOP.py repr, @property Validated fields, as in Pydantic
🟑 Composition 10OOP.py has-a vs is-a Agents composed of tools, memory, and a model

Part 4 Β· πŸ“š Module library β€” 0%

Chapter 4: Module Library Β Β·Β  0/0 topics

Everything in 8Module_Library/, discovered automatically.

Topic Source Subtopics covered Future reference (AI / backend)
Chapter 5: Still to explore Β Β·Β  0/1 topics

Planned stdlib topics.

Topic Source Subtopics covered Future reference (AI / backend)
⬜ logging & typing β€” β€” Observability and typed API contracts

Part 5 Β· πŸ› οΈ Intermediate Python β€” 0%

Chapter 6: Real-world Plumbing Β Β·Β  0/0 topics

Everything in intermediate/, discovered automatically.

Topic Source Subtopics covered Future reference (AI / backend)
Chapter 7: Still to explore Β Β·Β  0/2 topics

Planned next steps.

Topic Source Subtopics covered Future reference (AI / backend)
⬜ Validation β€” β€” Structured outputs from models
⬜ Async basics β€” β€” Concurrent model and tool calls

Part 6 Β· πŸš€ Small applications β€” 100%

Chapter 8: Mental-Bridge Applications Β Β·Β  10/10 topics

Ten scenarios that connect syntax to systems.

Topic Source Subtopics covered Future reference (AI / backend)
βœ… 01 Zip & dictionary mapping 01_zip_dictionary_mapping.py zip, filtering Authorization and tool access
βœ… 02 Set permissions 02_set_permissions.py set ops Permission checks
βœ… 03 Filter users 03_filter_users.py predicates Query-like selection / metadata retrieval
βœ… 04 Transform API data 04_transform_api_data.py map API response shaping
βœ… 05 Group users by role 05_group_users_by_role.py grouping Aggregation and reporting
βœ… 06 JSON data processing 06_json_data_processing.py json External data boundaries
βœ… 07 Function as data 07_function_as_data.py callbacks Pluggable model/tool strategies
βœ… 08 Decorator logging 08_decorator_logging.py decorators Tracing and observability
βœ… 09 Generator data 09_generator_large_data.py yield Streaming and memory efficiency
βœ… 10 Error-handling pipeline 10_error_handling_pipeline.py try/except Resilient processing

Part 7 Β· πŸ—οΈ Backend engineering β€” 17%

Chapter 9: Services & Data Β Β·Β  0/3 topics

Turning scripts into services.

Topic Source Subtopics covered Future reference (AI / backend)
🟑 Patterns connected β€” handlers, pipelines FastAPI services
⬜ REST with FastAPI β€” β€” Serving models
⬜ Databases β€” β€” Vector stores and metadata

Part 8 Β· πŸ“ˆ ML fundamentals β€” 0%

Chapter 10: Learning from Data Β Β·Β  0/2 topics

The next frontier.

Topic Source Subtopics covered Future reference (AI / backend)
⬜ NumPy & pandas β€” β€” Embeddings and datasets
⬜ Model basics β€” β€” Evaluation mindset

Part 9 Β· πŸ€– LLM / RAG / agents β€” 0%

Chapter 11: AI Systems Β Β·Β  0/3 topics

Prompts, retrieval, tools.

Topic Source Subtopics covered Future reference (AI / backend)
⬜ LLM APIs & structured output β€” β€” β€”
⬜ RAG β€” β€” β€”
⬜ Agents & tool use β€” β€” β€”

Part 10 Β· πŸ›‘οΈ Production AI β€” 0%

Chapter 12: Shipping Safely Β Β·Β  0/3 topics

Testing, observability, deployment.

Topic Source Subtopics covered Future reference (AI / backend)
⬜ Testing β€” β€” β€”
⬜ Observability β€” β€” β€”
⬜ Deployment β€” β€” β€”

πŸ§ͺ Projects and the Concepts They Use

No projects yet. Add one to journey.json under projects and this table fills itself in.

🧠 The Core Mental Model

flowchart TD
    A[Lists + dictionaries + sets] --> B[Records, mappings, membership]
    B --> C[Filtering, grouping, validation]
    C --> D[Functions, callbacks, pipelines]
    D --> E[Modules, decorators, generators, errors]
    E --> F[Backend services and data flows]
    F --> G[Prompts, tools, retrieval, model responses]
    G --> H[Observable production AI]
Loading
Python idea Becomes
Dictionary mapping Authorization
Filter Metadata retrieval
Generator Streaming
Decorator Logging / tracing
Exception handler Resilient processing
Function passed as data Model or tool strategy

🧭 Repository Guide

python Python_Application/01_zip_dictionary_mapping.py

πŸ”„ How to update

  1. Change a topic's status in journey.json to done, wip, or todo (wip counts as half).
  2. Add subtopics and the future reference as you learn them.
  3. Add a project under projects:
    {"name": "Tool router", "link": "https://github.com/you/tool-router", "status": "building",
     "concepts": ["Inheritance", "10 Error-handling pipeline"]}
    concepts must match topic names; each resolves to its chapter automatically.
  4. Run python scripts/build_readme.py locally, or just push: the GitHub Action does it for you.

⭐ North Star

Learn a concept. Use it in a realistic problem.
Recognize the larger system it belongs to. Build the next layer.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages