Skip to main content

BTHLabs JSONRPC - aiohttp integration

Project description

BTHLabs JSONRPC - aiohttp integration

Docs | Source repository

Overview

BTHLabs JSONRPC is a set of Python libraries that provide extensible framework for adding JSONRPC interfaces to existing Python Web applications.

The aiohttp package provides aiohttp integration.

Installation

$ pip install bthlabs_jsonrpc_aiohttp

Example

# app.py
from aiohttp import web
from bthlabs_jsonrpc_core import register_method

from bthlabs_jsonrpc_aiohttp import JSONRPCView

@register_method('hello')
async def hello(request, who='World'):
    return f'Hello, {who}!'

app = web.Application()
app.add_routes([
    web.post('/rpc', JSONRPCView()),
])

Author

bthlabs-jsonrpc-aiohttp is developed by Tomek Wójcik.

License

bthlabs-jsonrpc-aiohttp is licensed under the MIT License.

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

bthlabs-jsonrpc-aiohttp-1.0.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

bthlabs_jsonrpc_aiohttp-1.0.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file bthlabs-jsonrpc-aiohttp-1.0.0.tar.gz.

File metadata

File hashes

Hashes for bthlabs-jsonrpc-aiohttp-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e311419d4ecb72c193b725875e64ad21350e66c4714ba7e1a8352958af4ac8d0
MD5 5fce7f5240cbd0b9df27c86853d0664c
BLAKE2b-256 a7d1e4326bb25dc3c496acca1bc01671e571457213cac9221c7cd21bf1b70bf2

See more details on using hashes here.

File details

Details for the file bthlabs_jsonrpc_aiohttp-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for bthlabs_jsonrpc_aiohttp-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6d984a086020b0bb08bfbd881fb04b0e53ecccd7fe01063c6a12db44f5aed6a6
MD5 07983209527dce871240bd9cf09b6711
BLAKE2b-256 9a1c2585381b23bcba503088ad9f96c2cf3bdc312d9106fe7a4fab1cacdfd6e5

See more details on using hashes here.

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