(
)\ ) ) )
(()/( ( ( /( ( /(
/(_)))\ ) )\()))\()) ( (
(_)) (()/( (_))/((_)\ )\ )\ )
| _ \ )(_))| |_ | |(_) ((_) _(_/(
| _/| || || _|| ' \ / _ \| ' \))
|_| \_, | \__||_||_|\___/|_||_|
|__/
A repository that documents my journey learning and practicing Python — from language fundamentals to algorithm challenges, OOP, decorators, generators, scripting tools, and containerized mini-projects. The long-term goal is to reach professional / mid-level proficiency for backend and tooling roles.
This README also doubles as a personal learning roadmap: every level
below lists what is already covered (with file/folder references) and what is
still pending. Items marked [x] are practiced, [~] are partially covered,
and [ ] are gaps I am actively planning to fill.
- Repository Map
- Learning Path
- Stage 1 — Foundations
- Stage 2 — Core Data Structures & Idioms
- Stage 3 — Functions, Decorators & Generators
- Stage 4 — Object-Oriented Programming
- Stage 5 — Algorithms & Problem Solving
- Stage 6 — Practical Scripting, Regex & APIs
- Stage 7 — Packaging & Containers
- Stage 8 — Testing
- Stage 9 — Advanced Typing, Logging & Context Managers
- Stage 10 — Concurrency & Async I/O
- Stage 11 — Web APIs & Databases
- Stage 12 — Engineering Practices
- Tech Stack
- How to Run
| Folder | Purpose |
|---|---|
CS50P/ |
Exercises from Harvard's CS50P (Chapter0–3, APIs, comprehensions, imports). |
Concepts/ |
Deep dives into individual language features (decorators, generators, OOP, comprehensions, sets, interfaces, queues). |
Retos/ |
Algorithmic challenges and small problem-solving katas (incl. Retos/LeetCode/). |
Scripting/ |
Real-world CLI tools — CSV→JSON converter, calculator, networking/API fuzzing. |
Mini_Docker_Proyects/ |
Small containerized exercises (generators, web server, volumes). |
The path is ordered by conceptual difficulty, not by chronological order of practice. Each stage points to the folder(s) or file(s) that act as proof of practice.
Variables, control flow, I/O, basic types, modules, imports.
- Variables, conditionals, loops →
CS50P/Chapter0/,CS50P/Chapter1/ - Functions & basic I/O →
CS50P/Chapter2/,CS50P/Chapter3/ - Module imports & code reuse →
CS50P/importing_code/ - Standard library basics (
random,math) →CS50P/Random/
Lists, dicts, sets, tuples and the Pythonic way of expressing transformations.
- Lists & list algorithms →
Concepts/List/ - List comprehensions →
Concepts/List_Comprehension/,CS50P/comprehencions/ - Dict comprehensions →
Concepts/Dictionary_Comprehension/ - Sets (membership, dedup, set algebra) →
Concepts/Set/ - Queues (FIFO patterns) →
Concepts/Queue/
Higher-order functions, closures, lazy iteration.
- Decorators (logging, timing, retry, memoization, composition) →
Concepts/Decorator/ - Generators &
yield/send()→Concepts/Generator/,Concepts/Yield/ - File handling with generators →
Concepts/Generator/File_Handling_and_Generators/,Concepts/Generator/lazy_file_line_generator/ - Finish incomplete exercise →
Concepts/Decorator/memoisation_cache_decorator.py(currently only contains the prompt). - Finish incomplete exercise →
Concepts/Generator/async_number_stream_geneator.py(only the prompt; depends on Stage 10).
Classes, inheritance, polymorphism, abstraction, interfaces.
- Classes, encapsulation, dunder methods →
Concepts/OOP/back_account_lvUP.py - Inheritance &
super()→Concepts/OOP/inheritance_vehicle_lvUP.py- Bug to fix:
Motorcycle.speed()is defined twice in this file — the second silently overrides the first.
- Bug to fix:
- Abstract Base Classes (
ABC,@abstractmethod) →Concepts/OOP/Abstraction/ - Interfaces & duck typing →
Concepts/Interface/(incl.protocol_runtime_interface.py,duck_typed_interface.py,plug_in_system_interface.py) -
@property,@staticmethod,@classmethodpatterns (refactorback_account_lvUP.pyandinheritance_vehicle_lvUP.pyto use@propertyfor getters). -
dataclasses(@dataclass,field,frozen=True).
Complexity awareness (O(n) vs O(n²)), classic patterns.
- Set-based optimizations (Two Sum, Longest Consecutive Sequence) →
Concepts/Set/ - String/number katas (palindromes, Armstrong numbers, prime numbers, factorials, fibonacci) →
Retos/palindromos/,Retos/ArmstrongNumber/,Retos/numbersPrimes/,Retos/factorial/,Retos/fibonacci/ - Frequency counting & text analysis →
Retos/wordCount/,Retos/frequencyCounter/,Retos/analizarTexto/ - LeetCode practice →
Retos/LeetCode/(two_Sum.py,add_two_numbers.py) - Bug to fix:
Retos/wordCount/word_counter_lvUP.pyimportsCounterfromtyping— it should befrom collections import Counter. - Dynamic programming (memoization + tabulation) — start with classic problems (climb stairs, coin change, longest common subsequence).
- Graph / tree traversals (BFS, DFS) — frequent in interviews.
Real tooling — CLI args, file I/O, HTTP clients, regular expressions.
- Interactive CLI tools →
Scripting/basic_calculator/ - Production-grade CSV/JSON converter (
argparse, encoding detection, error handling) →Scripting/csv_to_json/csv_to_json_v2.py - Log analysis →
Scripting/csv_to_json/log_analyzer.py - HTTP requests with
requests→CS50P/APIs/,Scripting/Networking/requests_http.py - API fuzzing with wordlists →
Scripting/Networking/ - Regular expressions, 3 difficulty tiers →
Retos/exprecionesRegulares_Regex/level_1/,level_2/,level_3/
Containerized exercises and environment isolation.
- Containerizing Python scripts →
Mini_Docker_Proyects/docker_proyect_1/(generators + env vars) - Minimal containerized HTTP server →
Mini_Docker_Proyects/networking_docker_proyect/ - Docker volumes for persistence →
Mini_Docker_Proyects/volume_proyect/ - Python virtual environments (
venv,pip freeze,requirements.txt) — add a rootrequirements.txtand per-project venvs. - Modern packaging (
pyproject.toml,poetryoruv).
The single most important missing skill for an interview.
-
unittestbasics — write tests forConcepts/OOP/back_account_lvUP.py. -
pytestfundamentals —assert, fixtures,parametrize. - Test the algorithms in
Concepts/Set/andRetos/LeetCode/(great for property-style assertions). - Mocking external calls — write tests for
Scripting/Networking/requests_http.pyusingunittest.mockorpytest-mock. - Coverage reporting with
coverage.pyorpytest-cov.
Target: A new top-level tests/ folder with at least one test module per existing Concepts/ subtopic.
The polish that separates intermediate from senior code.
- [~] Basic type hints — already used in ~75% of files.
- [~]
Protocol/ structural subtyping — partially explored inConcepts/Interface/protocol_runtime_interface.pyandfile_protocol_interfaces.py. -
TypedDict,Generic[T],Callable[..., T],Optional,Union/X | Y. - Static type checking with
mypy. - Custom context managers — both class-based (
__enter__/__exit__) and@contextlib.contextmanager. Suggested exercise: awith timer():helper. - Structured logging with the
loggingmodule (replaceprintdebugging inScripting/). - Custom exception hierarchies.
Required for backend/networking roles.
- Threading basics —
threading.Thread,Lock,Queue. -
concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor. -
asynciofundamentals —async def,await,asyncio.run,asyncio.gather. - Async HTTP with
httpxoraiohttp. - Suggested project: rewrite the API fuzzer in
Scripting/Networking/as an async client and benchmark it against the synchronous version. - Complete
Concepts/Generator/async_number_stream_geneator.py.
The flagship missing project. This is what the interviewer will want to see.
- FastAPI — minimal CRUD with at least 5 endpoints, Pydantic models for validation.
- SQLite + raw SQL (the basics matter).
- SQLAlchemy (Core or ORM) — one model with relationships.
- Request/response schemas, dependency injection, error handling middleware.
- Auth basics (API keys or JWT).
- Tests for the API using
pytest+ FastAPI'sTestClient.
Suggested target: a Projects/task_api/ folder containing the full mini-project.
Tooling and habits expected in any professional team.
- Formatter —
blackorruff format. - Linter —
ruff(preferred) orflake8+pylint. - Pre-commit hooks (
pre-commitframework). - CI on GitHub Actions — run tests + lint + mypy on every push.
- Conventional commit messages (currently mixed Spanish/English — pick one and stick to a convention like
feat:,fix:,docs:). - A
CONTRIBUTING.mdor at least a documented project structure in this README.
- Language: Python 3.10+ (uses
list[int]syntax,match/case). - Currently used libs:
requests,csv,json,re,abc,collections,typing. - Planned:
pytest,httpx,fastapi,pydantic,sqlalchemy,mypy,ruff. - Tooling: Docker (for the
Mini_Docker_Proyects/).
Most files are self-contained scripts:
python3 path/to/script.pyScripts with CLI arguments (e.g. the CSV→JSON converter) document their flags
via --help:
python3 Scripting/csv_to_json/csv_to_json_v2.py --helpThe Docker mini-projects each contain their own Dockerfile; build and run
from inside the relevant folder:
cd Mini_Docker_Proyects/docker_proyect_1
docker build -t safe-divider .
docker run --rm safe-divider| Stage | Status |
|---|---|
| 1. Foundations | Done |
| 2. Core data structures & idioms | Done |
| 3. Functions, decorators & generators | Done (2 exercises pending) |
| 4. OOP | Done (minor bug + @property refactor pending) |
| 5. Algorithms | Active (DP & graphs pending) |
| 6. Scripting, regex & APIs | Done |
| 7. Packaging & containers | Partial (modern packaging pending) |
| 8. Testing | Not started — highest priority |
| 9. Advanced typing, logging, context managers | Partial |
| 10. Concurrency & async | Not started |
| 11. Web APIs & databases | Not started |
| 12. Engineering practices | Not started |