This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## | |
| ## How to run multiple uvicorn server apps in the same process | |
| ## | |
| import asyncio | |
| from uvicorn import Server, Config | |
| class MyServer(Server): | |
| async def run(self, sockets=None): | |
| self.config.setup_event_loop() | |
| return await self.serve(sockets=sockets) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/local/bin/python | |
| # -*- coding: utf-8 -*- | |
| """ Um cliente python para a API Olho Vivo """ | |
| import requests | |
| class SPTransClient(object): | |
| """ Um cliente python para a API Olho Vivo """ |