https://github.com/ibm-messaging/macaque
Flask style library for microservices with MQ Light
https://github.com/ibm-messaging/macaque
Last synced: 6 months ago
JSON representation
Flask style library for microservices with MQ Light
- Host: GitHub
- URL: https://github.com/ibm-messaging/macaque
- Owner: ibm-messaging
- License: epl-1.0
- Created: 2015-06-25T13:51:48.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-06-26T10:52:46.000Z (almost 10 years ago)
- Last Synced: 2023-08-12T16:11:07.715Z (almost 2 years ago)
- Language: Python
- Homepage:
- Size: 145 KB
- Stars: 5
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Macaque
Flask style library for microservices with [MQ Light](https://developer.ibm.com/messaging/mq-light/)```python
import macaque
```
Importing the macaque library into your application code```python
srv = macaque.Server()
```
Creating an instance of the macaque server component```python
@srv.service("news/technology")
def news_tech_handler(request):
print request
return {"headline": "MQ Light rocks!"}
```
Creating a service endpoint handler```python
cl = macaque.Client()
```
Creating an instance of the macaque client component```python
def response_handler(response):
print response['headline']app.call("news/technology", "MQ Light?", response_handler)
```
Calling a service endpoint and handling the returned valueThis project is licensed under the Eclipse Public License, details can be found in the file `LICENSE`