A comprehensive collection of Python scripts, programs, and exercises organized for beginners and intermediate Python developers. This repository covers everything from fundamental programming concepts to advanced topics like async programming, web frameworks, and cloud services.
- 01. Fundamentals
- 02. Data Structures
- 03. Advanced Concepts
- 04. Standard Library
- 05. File and Data
- 06. Web and APIs
- 07. Frameworks
- 08. Cloud Services
- 09. Algorithms
- 10. Projects
- 11. Exercises
- 12. Pytest
Location: 01_fundamentals/
Core Python programming concepts and basics for beginners.
- Conditions - If/elif/else statements, conditional logic
- Loops - For loops, while loops, iteration techniques
- Functions - Function definitions, parameters, return values
- User Input - Reading and processing user input
- Randomization - Random number generation, random choices
- Output Filtering - Formatting and filtering output
- String Manipulation - String operations, methods, formatting
- Argument Manipulation - Command-line arguments, args/kwargs, argparse
Location: 02_data_structures/
Python data structures and comprehension techniques.
- Data Structures - Core data structures implementation
- Lists, dictionaries, sets, tuples
- Mixed data structures examples
- List Comprehension - Efficient list creation and transformation
- Dictionary Comprehension - Creating and transforming dictionaries
Location: 03_advanced_concepts/
Advanced Python programming paradigms and patterns.
- Object-Oriented Programming (OOP) - Classes, inheritance, polymorphism, dataclasses
- Class definitions and inheritance
- Abstract classes and interfaces
- Magic methods and dunder methods
- Dataclasses and properties
- Multiple inheritance and composition
- Projects: Coffee Machine, Pong Game, Quiz Game, Snake Game, Turtle Crossing, Turtle Race
- Decorator Functions - Function decorators, decorator patterns
- Caching with decorators
- Timing and profiling decorators
- Decorator classes and metadata
- Generator Functions - Generators, yield, lazy evaluation
- Lambda Functions - Anonymous functions, functional programming
- Dunder Methods - Magic methods, operator overloading
- Async Programming - Asyncio, coroutines, tasks, event loops
- Task groups and synchronization
- Semaphores and futures
- Multiprocessing - Parallel processing, process pools
- Multithreading - Concurrent execution, thread management
- Exception Handling - Try/except, error handling patterns
- Call Stack - Stack operations, call stack examples
- Pattern Matching - Structural pattern matching (Python 3.10+)
Location: 04_standard_library/
Working with Python's built-in modules and libraries.
- DateTime - Date and time operations, formatting, calculations
- JSON - JSON parsing, serialization, file operations
- Regular Expressions - Pattern matching, text processing
- Itertools - Iterator building blocks, combinations, permutations
- Standard Library - Other standard library modules
- Modules - Module creation, imports, packages
- URL Manipulation - URL parsing, construction, encoding
Location: 05_file_and_data/
File handling, data processing, and database operations.
- File Manipulation - Reading, writing, copying files
- CSV Operations - CSV reading, writing, processing
- Database Operations - Database connectivity and queries
- Pandas - Data analysis and manipulation
- DataFrame operations
- Data iteration and manipulation
- Projects: Squirrel Census, US States Game
- OCR - Optical Character Recognition
Location: 06_web_and_apis/
Web scraping, API requests, and network communication.
- API Requests - HTTP requests, REST APIs
- Weather API, ISS Tracking
- Google Search, XKCD downloader
- Requests module and error handling
- Projects: Flight Deals Finder, Habit Tracking App, Kanye Quotes, Rainmeter App, Stock Price News Alert
- Web Scraping - HTML parsing, data extraction
- SMTP Library - Email sending, SMTP operations
Location: 07_frameworks/
Web application frameworks and their implementations.
Location: 08_cloud_services/
Cloud platform integrations and services.
- AWS - Amazon Web Services integration
- SQS message sending and receiving
- AWS SDK (boto3) examples
Location: 09_algorithms/
Algorithm implementations and data structure algorithms.
- Sorting Algorithms - Various sorting techniques
- Bubble sort, merge sort, quick sort
- Custom sorting functions
- Data Search - Search algorithms
- Linear search, binary search
- Finding min/max values
- Heap - Heap data structure implementations
Location: 10_projects/
Complete projects, games, and GUI applications.
- Simple Games - Text-based and simple games
- Bagels, Blackjack, Coin Toss
- Dice Roller, Fantasy Game Inventory
- Guessing Game, Hangman, Higher Lower
- Random Quiz Generator
- Rock Paper Scissors, Tic Tac Toe
- Treasure Island, Zigzag
- Tkinter - GUI applications using Tkinter
- Turtle Graphics - Graphics and animation projects
Location: 11_exercises/
Practice exercises and miscellaneous scripts.
- Harvard CS50 - Harvard CS50 Python course exercises
- Basic programs (greet, calculator, names)
- Face detection and identification
- Phonebook, QR code generation
- SQL exercises
- Speech synthesis
- Miscellaneous - Various practice scripts
- BMI Calculator, Fizz Buzz, Prime Number Checker
- Mortgage Calculator, Tip Calculator
- File operations (backup to ZIP, CSV operations)
- Data processing (character counting, word counter)
- System utilities (stopwatch, UUID identifier)
- Excel operations (census reader, styled sheets)
- Mathematical programs (factorial, RecamΓ‘n sequence)
- Password manager, mail merge
- And many more practice exercises!
Location: 12_pytest/
A progressive, hands-on introduction to testing Python code with pytest, ordered from beginner to advanced concepts. See the 12_pytest README for full details on each section.
- source/ - Source modules used as subjects under test
my_functions.py- Basic arithmetic functionsshapes.py- OOP shape classes (Circle, Rectangle, Square)service.py- Service layer with an external HTTP call
- tests/ - Test suite organised by increasing complexity
test_my_functions.py- Basic assertions,pytest.raises, and test markers (skip,xfail,slow)test_circle.py- Class-based tests withsetup_method/teardown_methodtest_rectangle.py- Function-level fixtures injected fromconftest.pytest_square.py- Parametrized tests with@pytest.mark.parametrizetest_service.py- Mocking external HTTP dependencies withunittest.mockconftest.py- Shared fixtures available across the whole test suite
- Python 3.8 or higher
- pip (Python package installer)
- Clone the repository:
git clone https://github.com/psyll0n/python-training.git
cd python-training- Install required dependencies (varies by project):
pip install -r requirements.txt # If availableNavigate to any directory and run the Python scripts:
cd 01_fundamentals/conditions
python conditions_example.py- Start with 01. Fundamentals - Learn basic syntax, conditions, loops, and functions
- Move to 02. Data Structures - Master lists, dictionaries, and comprehensions
- Practice with 11. Exercises - Apply your knowledge with practical exercises
- Try 10. Projects/Simple Games - Build fun projects to solidify concepts
- Explore 03. Advanced Concepts - OOP, decorators, async programming
- Study 04. Standard Library - Learn to use Python's powerful built-in tools
- Work with 05. File and Data - Data processing and analysis
- Build with 06. Web and APIs - Create real-world applications
- Dive into 07. Frameworks - Web application development
- Explore 08. Cloud Services - Cloud integration and deployment
- Master 09. Algorithms - Efficient algorithm implementations
- Study 12. Pytest - Write professional tests with fixtures, parametrize, and mocking
- Create complex applications using multiple concepts together
Contributions are welcome! Feel free to:
- Add new examples or exercises
- Improve existing code
- Fix bugs or typos
- Enhance documentation
This project is licensed under the terms specified in the LICENSE file.
For questions or suggestions, please open an issue in the repository.
Happy Coding! π