Simple async python-based microservice framework
Service example:
import asyncio
import beethon
from beethon.handlers.amqp import AMQPHandler
from beethon.management.decorators import register
from beethon.services.base import Service
@register(with_handler=AMQPHandler)
class SomeService(Service):
name = "some-service"
async def do_something(self, foo, bar=None):
# ...
await something_else()
# ...
return result
if __name__ = '__main__':
loop = asyncio.get_event_loop()
loop.run_until_complete(beethon.run())
Client example:
from beethon.clients.amqp import AMQPClient
async def main():
async with AMQPClient(service_name='some-service') as client:
result = await client.call('do_something', foo="foo", bar="bar")
if __name__ = '__main__':
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
- HTTP handler and client
- Integration with Netfix Stack
- OpenAPI Scheme generation
Contributions are always welcome! Just fork and help the project.
For feedback write to alexey.nikitenko1927@gmail.com