Level: Advanced | Prerequisite: All weeks 1–9
Learning Goals
- A practical project integrating asynchronous operations, external libraries, tests, and deployment
- Package structure + CI implementation
1. Project Structure (Recommended)
my_project/
├── pyproject.toml
├── README.md
├── src/my_project/
│ ├── __init__.py
│ ├── models.py (dataclass)
│ ├── client.py (httpx asynchronous)
│ ├── analyzer.py (Pandas)
│ └── cli.py (argparse entry point)
├── tests/
│ ├── test_models.py
│ ├── test_client.py
│ └── test_analyzer.py
└── .github/workflows/ci.yml (optional)
2. Skeleton — Asynchronous Crawler + Analysis
Refer to examples/crawler_skeleton.py.
3. Checklist
- Type hints +
mypy --strict - pytest tests (coverage 70%+)
- CLI (
argparseorclick) - Asynchronous or parallel processing
- External libraries (requests/httpx, pandas, etc.)
-
pyproject.tomlpackaging - README (installation guide, usage)
Key Examples (examples/)
| File | Content |
|---|---|
crawler_skeleton.py |
Skeleton for asynchronous crawling + Pandas analysis |
cli_skeleton.py |
Skeleton with argparse + module separation |
⚠️ Common Mistakes
- Monolithic single file — Hard to test and reuse
- Missing type hints — No IDE support
- Starting without tests — Harder to add later
- No README — Even you will forget after a few days
❓ FAQ
Q1. What is CI? A. Continuous Integration. Automatic testing on each push using GitHub Actions, etc.
Q2. Which domain should I choose? A. Something you can actually use yourself. Example: daily morning news summary, study time tracking, cryptocurrency price alerts.
📝 Final Assignment (exercises/)
Select 1 out of the following 4 options.
exercise1.md— Asynchronous crawler + analysisexercise2.md— CLI tool package (PyPI distribution)exercise3.md— Data pipeline (CSV → cleaning → visualization)exercise4.md— Automation bot (Slack/Discord webhook)
Submission
- GitHub repository link
- Execution video or screenshot
- README (installation, usage, examples)
- pytest tests
- (Optional) PyPI or TestPyPI link