Metadata-Version: 2.1
Name: merrymake
Version: 1.0.1
Summary: Service library for the Merrymake platform
Author: Nicolaj Græsholt
Author-email: ng@merrymake.eu
Requires-Python: >=3.11.2,<4.0.0
Classifier: Programming Language :: Python :: 3
Requires-Dist: requests (==2.31.0)
Description-Content-Type: text/markdown

# Merrymake Service Library

Service library for the [Merrymake](https://www.merrymake.eu/) platform.

## Installation

```shell
$ pip3 install merrymake
$ pip3 freeze > requirements.txt    # persist dependencies
```

## Example

A basic example that just returns `Hello, world!`,
if accessed on the platform using a payload `world`.

```python
# app.py
import sys

from merrymake import Merrymake
from merrymake.merrymimetypes import MerryMimetypes

def handleHello(payloadBytes, envelope):
    payload = bytes(payloadBytes).decode('utf-8')
    Merrymake.reply_to_origin(f"Hello, {payload}!", MerryMimetypes.txt);

def main():
    args = sys.argv[1:]
    print(args)
    Merrymake.service(args).handle("handleHello", handleHello);

if __name__ == "__main__":
    main()
```

