Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wblxyxolbkhv/beethon
Python-based microservice framework
https://github.com/wblxyxolbkhv/beethon
Last synced: 3 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 (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-04-11T23:45:13.000Z (9 months ago)
- Last Synced: 2024-10-10T05:34:58.348Z (3 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
![logo](https://i.ibb.co/PzjhcXG/beethon.png)
# Beethon
![travis badge](https://travis-ci.org/wblxyxolbkhv/beethon.svg?branch=master)
[![Python 3](https://pyup.io/repos/github/wblxyxolbkhv/beethon/python-3-shield.svg)](https://pyup.io/repos/github/wblxyxolbkhv/beethon/)
[![Coverage Status](https://coveralls.io/repos/github/wblxyxolbkhv/beethon/badge.svg?branch=master)](https://coveralls.io/github/wblxyxolbkhv/beethon?branch=master)
[![Updates](https://pyup.io/repos/github/wblxyxolbkhv/beethon/shield.svg)](https://pyup.io/repos/github/wblxyxolbkhv/beethon/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](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
[![License](http://img.shields.io/:license-mit-blue.svg?style=flat-square)](http://badges.mit-license.org)
- **[MIT license](http://opensource.org/licenses/mit-license.php)**