Skip to main content

No project description provided

Project description

Installation

pip install fastapi-jsonrpc

Usage

pip install uvicorn
import fastapi_jsonrpc as jsonrpc
from fastapi_jsonrpc import Param

app = jsonrpc.API()

api_v1 = jsonrpc.Entrypoint('/api/v1/jsonrpc')

@api_v1.method()
def echo(
    data: str = Param(..., example="123"),
) -> str:
    return data

app.bind_entrypoint(api_v1)

if __name__ == '__main__':
    import uvicorn
    uvicorn.run(app, port=5000, debug=True, access_log=False)

Go to:

http://127.0.0.1:5000/docs

Development

  1. Install poetry

    https://github.com/sdispater/poetry#installation

  2. Install dependencies

    poetry update
  3. Install dephell

    pip install dephell
  4. Regenerate setup.py

    dephell deps convert

Changelog

[0.1.3] fix README.rst

[0.1.2] Add usage example to README.rst

[0.1.1] README.rst

[0.1.0] Initial commit

Project details


Release history Release notifications | RSS feed

This version

0.1.3

Download files

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

Source Distribution

fastapi-jsonrpc-0.1.3.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastapi_jsonrpc-0.1.3-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file fastapi-jsonrpc-0.1.3.tar.gz.

File metadata

  • Download URL: fastapi-jsonrpc-0.1.3.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.17 CPython/3.7.3 Darwin/18.7.0

File hashes

Hashes for fastapi-jsonrpc-0.1.3.tar.gz
Algorithm Hash digest
SHA256 83cd62d8855f896a3ce1652d807fadcd0f69b798c87ba463eba3c4be85ef5674
MD5 ec3f18d190335f4819ea2924e8fa8ae8
BLAKE2b-256 3f53ebd36e5ccc058156e8d804b858928917bb452e80dc477fd4c58d215c5438

See more details on using hashes here.

File details

Details for the file fastapi_jsonrpc-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: fastapi_jsonrpc-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.17 CPython/3.7.3 Darwin/18.7.0

File hashes

Hashes for fastapi_jsonrpc-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 83bb125b5001914151a052232522ac30b448e7cfe35dfde92e2e6365304e11e3
MD5 8b34af7202b25e48665dd544ac187c63
BLAKE2b-256 be9713235b4e463a051de4b466942b7fce37e71241b60ac000406efd8f4d7124

See more details on using hashes here.

Supported by

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