Skip to content

EvgeniyBurdin/api_service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 

Repository files navigation

api_service

An example of a json api service on aiohttp.

Build image:

docker build -t api_service . 
  • The simple service:
docker run -e RS="run_simple.py" --rm -it -p 5000:5000 --name api_service api_service
  • The service whose handlers can have different arguments:
docker run -e RS="run_kwargs.py" --rm -it -p 5000:5000 --name api_service api_service
  • The service where requests and responses have a wrap and the data is validated:
docker run -e RS="run_wraps.py" --rm -it -p 5000:5000 --name api_service api_service

Article with examples on the site harb.ru