A practical Python 3.14 handbook built as a VitePress documentation site.
This repository is organized as a deep-dive study and reference project for:
- Pythonic design and the data model
- modern Python typing
- CPython runtime internals
asyncio- FastAPI
- Pydantic v2
- SQLAlchemy 2.0
- service architecture playbooks
The documentation is available in both Korean and English, with runnable examples and tests alongside the handbook chapters.
- Korean: https://jaeyoung0509.github.io/python-handbook/
- English: https://jaeyoung0509.github.io/python-handbook/en/
flowchart LR
A["Intro"] --> B["Pythonic"]
B --> C["Typing"]
C --> D["Runtime"]
D --> E["Asyncio"]
E --> F["FastAPI"]
F --> G["Pydantic"]
G --> H["SQLAlchemy"]
H --> I["Playbooks"]
I --> J["Examples and Tests"]
- Korean home: docs/index.md
- English home: docs/en/index.md
- Playbooks (Korean): docs/playbooks/index.md
- Playbooks (English): docs/en/playbooks/index.md
- Examples guide: examples/README.md
- Key tests: tests/test_abc_fake_uow_pytest.py, tests/test_pydantic_settings_patterns.py, tests/test_fastapi_fixtures_and_teardown.py, tests/test_idempotency_and_contracts.py
This is not just a note dump or a version changelog.
The goal is to make the repository useful in three ways at once:
- as a readable handbook for learning modern Python 3.14
- as a reference for application architecture and runtime behavior
- as a runnable study workspace with examples, tests, and strict tooling
Intro: how to read the handbook, import/packaging/environment fundamentals, the CGI/WSGI/ASGI evolution, and the Python 3.10 to 3.14 transitionPythonic: data model, descriptors, decorators, context managers, dataclasses, metaclassesTyping: modern typing, generics, protocols, narrowing, static vs runtime typingRuntime: execution model, object model, GC, GIL, subinterpreters, specializationAsyncio: event loop, task groups, cancellation, queues, backpressure, testingFastAPI: ASGI/Uvicorn, structure, DI, request and response modeling, security/auth, lifespan, background task boundaries, websockets/streaming, Redis pub/sub, reconnect protocol, proxy and shutdown ops, observabilityPydantic: core schema, validation pipeline,BaseModelvsTypeAdapter, internalsSQLAlchemy: session/UoW, engine settings, relationships, async usage, migration patterns, Alembic, zero-downtime rolloutPlaybooks: settings, testing, contract and property-based testing, UoW, idempotency, outbox, deployment choices, progressive delivery, and service design patterns
docs/ VitePress handbook source
examples/ runnable Python examples
tests/ pytest-based study and architecture tests
.github/ GitHub Actions for docs deployment
.vscode/ workspace settings, including ty-based type checking
- Python
3.14+ - Node.js
20+ uvnpm
Install Python dependencies:
uv syncInstall docs tooling:
npm installRun the docs site locally:
npm run docs:devBuild the docs site:
npm run docs:buildRun a few example files:
./.venv/bin/python examples/py310_pattern_matching.py
./.venv/bin/python examples/import_packaging_environment_lab.py
./.venv/bin/python examples/usecase_with_uow_abc.py
./.venv/bin/python examples/pydantic_settings_patterns.pyRun tests:
uv run pytestThis repository uses strict static checks.
Type checking:
uv run ty checkLinting:
uv run ruff check .Tests:
uv run pytestThe workspace is configured to use ty instead of pyright.
.vscode/settings.jsondisables the Python language servertyis used for workspace-wide diagnostics- Ruff is used for linting
If you open this repository in VS Code and use the project virtual environment, the default workspace setup should already be aligned with the repository tooling.
The handbook is meant to be read with code, not separately from it.
examples/README.mdexplains what each example demonstrates and when to read itexamples/contains runnable scripts for import/package behavior, version features, runtime behavior, FastAPI, security/auth, SQLAlchemy, migration rollout, dataclasses, settings, and asynciotests/contains focused pytest examples for fixtures, settings,ABC + Fake UoW, idempotency invariants, and ASGI contract testing
Good starting points:
examples/usecase_with_uow_abc.pyexamples/import_packaging_environment_lab.pyexamples/fastapi_security_auth_lab.pyexamples/alembic_zero_downtime_lab.pyexamples/idempotency_outbox_lab.pyexamples/progressive_delivery_backfill_lab.pyexamples/sqlalchemy_deployment_profiles.pyexamples/pydantic_settings_patterns.pytests/test_abc_fake_uow_pytest.pytests/test_fastapi_fixtures_and_teardown.pytests/test_idempotency_and_contracts.py
The docs site supports both Korean and English.
- Korean pages live under
docs/ - English pages live under
docs/en/
The VitePress site is configured with:
- local search
- locale-aware navigation
- custom theme styling
- Mermaid diagrams
- GitHub Pages deployment
If you are new to this repository, this order works well:
IntroPythonicTypingRuntimeAsyncioFastAPIPydanticSQLAlchemyPlaybooks
If you are already building services, a more practical path is:
PlaybooksFastAPIPydanticSQLAlchemyTestingand deployment-related chapters
The documentation site is deployed with GitHub Pages via GitHub Actions.
- workflow:
.github/workflows/deploy-docs.yml - site generator: VitePress
- repository URL: https://github.com/jaeyoung0509/python-handbook
- The Python project metadata still uses the package name
python-deepinpyproject.toml, while the documentation site branding isPython Handbook. - The repository is optimized for handbook content and study examples rather than for packaging as a reusable Python library.