Skip to content

wblxyxolbkhv/beethon

Repository files navigation

logo

Beethon

travis badge Python 3 Coverage Status Updates Code style: black

Simple async python-based microservice framework

Example

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())

In the plans

  • HTTP handler and client
  • Integration with Netfix Stack
  • OpenAPI Scheme generation

Contributing

Contributions are always welcome! Just fork and help the project.

Feedback

For feedback write to alexey.nikitenko1927@gmail.com

License

License

About

Python-based microservice framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages