Skip to content

raphaelauv/fastAPI-aiohttp-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python

Full example of FastAPI with an aiohttp client

This is an example with FastAPI, but you can use this logic with any async ( ASGI ) web framework

Implemented logic :

(with a fake server mocking answer of aiohttp)

  • Open ClientSession at fastAPI startup

  • Close ClientSession at fastAPI shutdown

Tests

  • fastAPI endpoint test
  • aiohttp test

About

How to use and test fastAPI with an aiohttp client

Topics

Resources

Stars

Watchers

Forks

Languages