Share E-Book

Python Microservices with FastAPI 1st Ed (Giunio De Luca, Igor Benav)(Z-Library)

Author

,

Python
Language English

Design production-ready, AI-enabled microservices with Python Design, test, and deploy FastAPI microservices with confidence. Use clean architecture, async patterns, and strong security, then add practical AI (RAG, agents, analytics) to deliver a scalable babysitting marketplace.

Format EPUB
Size 10.1 MB
5
Views

AI Guide

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

Full assistant
AI guide
【One-Line Pitch】 A hands-on guide to building production-grade Python microservices with FastAPI, taking you from project scaffolding and clean architecture through async patterns, security, and practical AI features. Best for Python developers and architects who want a concrete, end-to-end build rather than abstract theory. 【Book Arc】 - **Opening (~0%–15%)**: Frames what microservices actually are (and the myths around them), then scaffolds the first FastAPI project using `uv`, virtual environments, and the FastAPI CLI with auto-generated OpenAPI/ReDoc docs. - **Early (~15%–35%)**: Establishes the development foundation — dependency injection concepts (IoC, sub-dependencies, caching, singletons, overrides), testing with pytest, and tooling like Ruff and pre-commit hooks. - **Middle (~35%–60%)**: Moves into building the marketplace itself: the Parents and Seller portals, clean architecture and middleware, and connecting buyers and sellers as separate microservices. - **Late (~60%–85%)**: Adds persistence and cross-cutting concerns — SQLAlchemy/PostgreSQL, MongoDB document storage, authentication with OAuth2 and JWT, plus async tasks and WebSockets for complaints handling. - **Ending (~85%–100%)**: Layers in AI capabilities (a generative-AI support chatbot, an analytics portal with business intelligence) and closes with performance, profiling, and production optimization for high traffic. 【Key Takeaways】 - **Microservices are about independent deployability, not code size** (Early): the book stresses that a service must be autonomously deployable and versioned, and warns against adopting microservices on day one or expecting them to solve all scalability problems. - **Dependency injection is a first-class FastAPI skill** (Early): sub-dependencies, class vs. function dependencies, scopes, caching, singletons, and test overrides are treated as core architecture, not an afterthought. - **A reproducible environment is the starting point** (Early): `uv` handles Python distribution, virtual environments, and dependency locking, so every service gets isolated, consistent tooling. - **Testing and code quality are wired in from the start** (Middle): pytest with `TestClient`, plus Ruff for formatting/linting and pre-commit hooks, keep multi-service codebases maintainable. - **Clean architecture and middleware shape the service boundaries** (Middle): the Seller portal chapter ties architectural structure to how requests flow through the platform. - **Persistence choices are deliberate, not default** (Late): relational data goes to SQLAlchemy/PostgreSQL while document-shaped data (a car catalogue) goes to MongoDB, illustrating polyglot persistence. - **Security is built with standards** (Late): OAuth2 and JWT underpin authentication for appointment scheduling, showing how auth integrates into real service flows. - **AI is treated as a practical feature layer** (Ending): RAG-style chatbots and analytics are added on top of a working platform, not as isolated demos. 【Reading Tips】 - Deep-read the dependency injection and clean architecture chapters — they are the conceptual backbone that later microservices depend on. - Skim the tooling setup (Ruff, pre-commit, `uv` commands) if you already have a preferred stack, but note the conventions used throughout the book. - Treat the marketplace build as a running case study: follow the Parents/Seller portals and service connections in order rather than jumping to the AI chapters. - The AI and analytics chapters assume the platform already works — read them last, and expect to adapt the patterns to your own domain. - Hard spots are likely dependency scoping/caching and async task/WebSocket handling; budget extra time there. 【Coverage Limits】 This guide is based on stratified excerpts covering roughly the first half of the book in detail (project setup, dependency injection, tooling, testing) with only chapter titles available for the later persistence, security, AI, and production chapters. Specific implementation details of the AI, analytics, and performance chapters are not covered by the excerpts.

Passage locations

Excerpt 1
ingham B3 1RB, UK. ISBN 978-1-83588-250-4 www.packtpub.com Python Microservices with FastAPI Table of Contents Welcome to Packt Early Access Python Microserv...
View in text
Excerpt 2
conception 2: “Microservices solve all scalability problems.” Microservices can help with horizontal scalability, but they also introduce operational complex...
View in text
Excerpt 3
ion, and rapid execution powered by Starlette and Pydantic . In this section, you will build your first endpoint with FastAPI and explore some of the core co...
View in text
Excerpt 4
ickly understand, test, and modify the code with confidence. The simplest way to enable this is by enforcing consistent coding standards through automated to...
View in text

Recommended for You

Loading recommended books...
Failed to load, please try again later

Tip the Site

Scan the WeChat Pay or Alipay code to tip. No login required.

WeChat Pay
Alipay
Back to List