Edocti
Advanced Technical Training for the Software Engineer of Tomorrow
Edocti Training

Flask & SQLAlchemy — Micro Training (4h)

Intermediate
4 h
4.7 (503 reviews)

Scheduled sessions

No sessions are available at the moment.
Flask & SQLAlchemy — Micro Training (4h)

Flask & SQLAlchemy essentials: Build a highly functional, persistent web application from scratch in just 4 hours.

Get immediate hands-on practice creating flexible routing architectures, dynamic templates, and robust ORM data models.

Understand the exact mechanics of how Flask integrates with SQLAlchemy to handle queries, sessions, and secure database transactions.

Gain practical experience through fast-paced, guided labs where you will code every critical step of the application.

How this helps: You will be able to rapidly bootstrap working prototypes or seamlessly add database persistence to existing Python projects.

Who it’s for: Developers with a basic grasp of Python who want a quick, pragmatic entry into web development.

The session also includes optional pointers to enterprise scaling patterns and advanced ORM features for future growth.

Skills You Will Learn

Flask Foundations API Routing SQLAlchemy ORM Database Migrations RESTful Endpoints Transaction Management Automated Testing Deployment Tips

Curriculum

Part 1 — Project setup & architecture

  • App factory pattern, Blueprints and configuration (dev/test/prod)
  • Database URL, engine, Session; using Flask‑SQLAlchemy vs. plain SQLAlchemy
  • Request lifecycle and session‑per‑request pattern; teardown and error handlers
  • Alembic init and first migration; seeding data

Part 2 — Modeling & querying with SQLAlchemy ORM

  • Models, columns and constraints; timestamps and UUIDs
  • One‑to‑many / many‑to‑many relationships; backrefs, cascades
  • Query patterns: filtering, joins, selectinload vs joinedload; pagination
  • Validation at the boundary (Marshmallow or Pydantic)

Part 3 — REST endpoints & transactions

  • Create/read/update/delete endpoints; idempotency and upserts (brief)
  • Transactions and isolation basics; commit/rollback; 404/409/422 responses
  • Error handling and problem+json; mapping DB exceptions to HTTP
  • Auth placeholder: JWT skeleton (optional)

Part 4 — Tests, performance & deployment tips

  • pytest fixtures; temporary DB (SQLite) vs. Postgres in Docker
  • Factory‑driven app tests; transactional tests and rollbacks
  • Avoid N+1; indexes and EXPLAIN (intro); connection pool sizing basics
  • Packaging and running with Gunicorn; `.env` and 12‑factor notes

Optional modules

Optional — Docker Compose quickstart

  • Compose file with Postgres and the app; runtime env vars
  • Healthchecks, migrations on startup, and seed data

Course Day Structure

  • Part 1: 09:00–10:00
  • Break: 10:00–10:10
  • Part 2: 10:10–11:10
  • Break: 11:10–11:20
  • Part 3: 11:20–12:20
  • Break: 12:20–12:30
  • Part 4: 12:30–13:30

Did you attend this course?

Your feedback is invaluable to us. Please share your experience with us and help us improve this course for future participants.

Share your feedback

Want to find out more? We are here to help!

Or email us directly at training@edocti.com.