Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

Microservice APIs: Using Python, Flask, FastAPI, OpenAPI and more
Microservice APIs: Using Python, Flask, FastAPI, OpenAPI and more
Microservice APIs: Using Python, Flask, FastAPI, OpenAPI and more
Ebook850 pages7 hours

Microservice APIs: Using Python, Flask, FastAPI, OpenAPI and more

Rating: 0 out of 5 stars

()

Read preview

About this ebook

Strategies, best practices, and patterns that will help you design resilient microservices architecture and streamline your API integrations.

In Microservice APIs, you’ll discover:

Service decomposition strategies for microservices
Documentation-driven development for APIs
Best practices for designing REST and GraphQL APIs
Documenting REST APIs with the OpenAPI specification (formerly Swagger)
Documenting GraphQL APIs using the Schema Definition Language
Building microservices APIs with Flask, FastAPI, Ariadne, and other frameworks
Service implementation patterns for loosely coupled services
Property-based testing to validate your APIs, and using automated API testing frameworks like schemathesis and Dredd
Adding authentication and authorization to your microservice APIs using OAuth and OpenID Connect (OIDC)
Deploying and operating microservices in AWS with Docker and Kubernetes

Microservice APIs teaches you practical techniques for designing robust microservices with APIs that are easy to understand, consume, and maintain. You’ll benefit from author José Haro Peralta’s years of experience experimenting with microservices architecture, dodging pitfalls and learning from mistakes he’s made. Inside you’ll find strategies for delivering successful API integrations, implementing services with clear boundaries, managing cloud deployments, and handling microservices security. Written in a framework-agnostic manner, its universal principles can easily be applied to your favorite stack and toolset.

About the technology
Clean, clear APIs are essential to the success of microservice applications. Well-designed APIs enable reliable integrations between services and help simplify maintenance, scaling, and redesigns. Th is book teaches you the patterns, protocols, and strategies you need to design, build, and deploy effective REST and GraphQL microservices APIs.

About the book
Microservice APIs gathers proven techniques for creating and building easy-to-consume APIs for microservices applications. Rich with proven advice and Python-based examples, this practical book focuses on implementation over philosophy. You’ll learn how to build robust microservice APIs, test and protect them, and deploy them to the cloud following principles and patterns that work in any language.

What's inside

Service decomposition strategies for microservices
Best practices for designing and building REST and GraphQL APIs
Service implementation patterns for loosely coupled components
API authorization with OAuth and OIDC
Deployments with AWS and Kubernetes

About the reader
For developers familiar with the basics of web development. Examples are in Python.

About the author
José Haro Peralta is a consultant, author, and instructor. He’s also the founder of microapis.io.

Table of Contents
PART 1 INTRODUCING MICROSERVICE APIS
1 What are microservice APIs?
2 A basic API implementation
3 Designing microservices
PART 2 DESIGNING AND BUILDING REST APIS
4 Principles of REST API design
5 Documenting REST APIs with OpenAPI
6 Building REST APIs with Python
7 Service implementation patterns for microservices
PART 3 DESIGNING AND BUILDING GRAPHQL APIS
8 Designing GraphQL APIs
9 Consuming GraphQL APIs
10 Building GraphQL APIs with Python
PART 4 SECURING, TESTING, AND DEPLOYING MICROSERVICE APIS
11 API authorization and authentication
12 Testing and validating APIs
13 Dockerizing microservice APIs
14 Deploying microservice APIs with Kubernetes
LanguageEnglish
PublisherManning
Release dateMar 7, 2023
ISBN9781638350569
Microservice APIs: Using Python, Flask, FastAPI, OpenAPI and more
Author

Jose Haro Peralta

José Antonio Haro Peralta is a full-stack software consultant specializing in Python and DevOps. He has worked in different industries, including IoT, financial services and retail, helping clients tackle varied problems including migrating legacy code to Python, migrating on-premise software to the Cloud, and migrating monoliths to microservices architectures.

Related to Microservice APIs

Related ebooks

Internet & Web For You

View More

Related articles

Reviews for Microservice APIs

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    Microservice APIs - Jose Haro Peralta

    Pdbook_preview_excerpt.html}9I_6* 7{P(xfxf*2";J$]%RYF V%V0_2{﹇{Y5MRFeDݗ>bvCVYj%$Von㋭yh7hLQZeWHR{erߓNL}8?ZfUD6Yin-ɾly &MR;i#$%*U}dQ]~pt Yؘ >}PqlYf 9{XT+[mEnh#tmM%$GI&Чm`mU>|~;weYa{xoxKylQ@lad{Þ @cnKl2L!«tuޘvqyU )%<65QDCTu^X^ n nAkf4iRȫdMNg+ә?v㍼rL[rպ]BYY/'b^ZGmU1Y؜CNvTd!жD\u\ DM-;ydk}K\KciRk(:Yb|O"?9r;p /O,]`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