Welcome! This repository contains Jupyter notebooks covering the essential Python fundamentals you need to start working with LangChain.
Before diving into LangChain, you need to understand the Python basics that will actually be used in AI development. You don't need to master everything in Python - just the concepts and tools you'll encounter when building LangChain applications.
This course is designed to be:
- Focused: Only what you need for LangChain
- Practical: Real concepts you'll use daily
- Quick: Won't take much of your time
- Foundation: A solid base for AI development with LangChain
LangChain is a powerful Python framework for building AI applications. To use it effectively, you need to understand:
- Basic Python syntax
- Data structures (lists, dictionaries, sets)
- Control flow (loops, conditionals)
- Functions and decorators
- Object-oriented programming basics
- Modules and imports
- Context managers
- Environment variables
- Type hints
💡 Pro Tip: Use ChatGPT, Claude, or your favorite AI model to expand on any topic covered in the notebooks. These assistants are excellent for clarifying concepts and providing additional examples!
The notebooks are structured progressively to build your knowledge step by step:
- 01_syntax_basics.ipynb - Python syntax fundamentals
- 02_data_structures_core.ipynb - Lists, dictionaries, tuples, and sets
- 03_control_flow.ipynb - Conditionals, loops, and flow control
- 04_functions_and_decorators.ipynb - Function definitions and decorators
- 05_classes_objects_oop_light.ipynb - Object-oriented programming essentials
- 06_modules_imports_debugging.ipynb - Working with modules and debugging
- 07_context_managers.ipynb - Understanding context managers (
withstatements) - 08_env_and_secrets.ipynb - Environment variables and secrets management
- 09_typing_pydantic_vs_typedict.ipynb - Type hints and validation
You'll need two tools to work with these notebooks:
What is UV? UV is a fast, modern package and project manager for Python. It's significantly faster than pip and handles virtual environments seamlessly.
Installation:
# On macOS and Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh
# On Windows:
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"What is JupyterLab? JupyterLab is a web-based interactive development environment for notebooks, code, and data. It allows you to write and execute code in an interactive way, perfect for learning and experimentation.
-
Clone the repository:
git clone <repository-url> cd 01-python-fundamentals
-
Install dependencies:
uv sync
-
Launch JupyterLab:
uv run jupyter
-
Work through the notebooks in order (01 through 09)
-
Experiment! Modify the code, try new examples, and use AI assistants to deepen your understanding
- Don't rush: Take your time with each concept
- Practice: Modify the examples and create your own
- Ask questions: Use ChatGPT/Claude to clarify any doubts
- Focus on understanding: You don't need to memorize everything
- Keep it practical: Think about how each concept applies to LangChain
After completing these fundamentals, you'll be ready to dive into LangChain development! You'll have the Python knowledge needed to:
- Build AI-powered applications
- Understand LangChain's architecture
- Work with language models
- Create custom chains and agents
- Manage prompts and memory
Once you finish these fundamentals, continue with the next step in your learning path:
That repository will guide you through: • LangChain Expression Language (LCEL) • Prompt templates and chain composition • RAG (Retrieval-Augmented Generation) fundamentals • Vector stores (Chroma / FAISS) • LangGraph memory and modern AI app structure
🧠 You’ll move from learning Python for AI to building actual LLM applications.
See the LICENSE file for details.
Ready to start your LangChain journey? Begin with notebook 01! 🐍✨