Metadata-Version: 2.1
Name: drakaina
Version: 0.3.3
Summary: Module for simple RPC server implementation
Home-page: https://gitlab.com/tau_lex/drakaina
License: Apache-2.0
Keywords: rpc,jsonrpc
Author: Aleksey Terentyev
Author-email: terentyev.a@pm.me
Requires-Python: >=3.7,<4.0
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Networking
Provides-Extra: msgpack
Provides-Extra: orjson
Provides-Extra: ujson
Requires-Dist: msgpack (>=1.0.4,<2.0.0) ; extra == "msgpack"
Requires-Dist: orjson (>=3.8.5,<4.0.0) ; extra == "orjson"
Requires-Dist: ujson (>=5.7.0,<6.0.0) ; extra == "ujson"
Project-URL: Repository, https://gitlab.com/tau_lex/drakaina
Description-Content-Type: text/markdown

# drakaina

[![image](https://img.shields.io/pypi/v/drakaina.svg)](https://pypi.python.org/pypi/drakaina)
[![image](https://img.shields.io/pypi/l/drakaina.svg)](https://pypi.python.org/pypi/drakaina)
[![image](https://img.shields.io/pypi/pyversions/drakaina.svg)](https://pypi.python.org/pypi/drakaina)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json)](https://github.com/charliermarsh/ruff)
[![Code style: black](https://img.shields.io/badge/code%20style-black-black.svg)](https://github.com/psf/black)

❗ WIP

Module for simple RPC server implementation


## Quickstart

Drakaina may be installed via `pip` and requires Python 3.7.0 or higher :

```shell
pip install drakaina
```

A minimal Drakaina example is:

```python
from drakaina import remote_procedure
from drakaina.rpc_protocols import JsonRPCv2
from drakaina.wsgi import WSGIHandler


@remote_procedure
def my_method():
    return "Hello Bro! ✋️"


JsonRPCv2().handle({"jsonrpc": "2.0", "method": "my_method", "id": 1})
# or define WSGI application
app = WSGIHandler()
```

Drakaina may be ran with any WSGI-compliant server,
such as [Gunicorn](http://gunicorn.org).

```shell
gunicorn main:app
```


## Features

- WSGI protocol implementation
  - Compatible with simple middlewares for others wsgi-frameworks,
    like as [Werkzeug](https://palletsprojects.com/p/werkzeug/),
    [Flask](https://palletsprojects.com/p/flask/)

