Skip to main content

Module for simple RPC server implementation

Project description

drakaina

image image image Ruff Code style: black

❗ WIP

Module for simple RPC server implementation

Quickstart

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

pip install drakaina

A minimal Drakaina example is:

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.

gunicorn main:app

Features

  • WSGI protocol implementation
    • Compatible with simple middlewares for others wsgi-frameworks, like as Werkzeug, Flask

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

drakaina-0.3.3.tar.gz (29.1 kB view hashes)

Uploaded Source

Built Distribution

drakaina-0.3.3-py3-none-any.whl (35.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page