https://github.com/wblxyxolbkhv/beethon
Python-based microservice framework
https://github.com/wblxyxolbkhv/beethon
Last synced: about 2 months ago
JSON representation
Python-based microservice framework
- Host: GitHub
- URL: https://github.com/wblxyxolbkhv/beethon
- Owner: wblxyxolbkhv
- License: mit
- Created: 2019-10-23T10:34:40.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-04-11T23:45:13.000Z (about 1 year ago)
- Last Synced: 2025-02-28T13:46:01.284Z (2 months ago)
- Language: Python
- Size: 51.8 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# Beethon

[](https://pyup.io/repos/github/wblxyxolbkhv/beethon/)
[](https://coveralls.io/github/wblxyxolbkhv/beethon?branch=master)
[](https://pyup.io/repos/github/wblxyxolbkhv/beethon/)
[](https://github.com/psf/black)Simple async python-based microservice framework
## Example
Service example:
```python
import asyncioimport 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 resultif __name__ = '__main__':
loop = asyncio.get_event_loop()
loop.run_until_complete(beethon.run())```
Client example:
```pythonfrom 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 [email protected]
## License
[](http://badges.mit-license.org)
- **[MIT license](http://opensource.org/licenses/mit-license.php)**