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:
Development
Install poetry
Update dependencies
poetry update
Install dependencies
poetry install
Install dephell
pip install dephell
Regenerate setup.py
dephell deps convert
Changelog
[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
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.2.tar.gz
(6.6 kB
view hashes)
Built Distribution
Close
Hashes for fastapi_jsonrpc-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | beacaa627acf197dda2adac2d497c650bbe8fdb9417afdefca834b65c8dd627d |
|
MD5 | 0136883c20d2bb9864a501b8ee616700 |
|
BLAKE2b-256 | 1d224299d0b29622df8fe3ac8d82ac7a347956481529b0f2ae9a38e8cce7fe01 |