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 0 | 0 | 0 | 0 |
| 0.1.17 | 0 | 0 | 0 | 0 | 0 |
| 0.1.16 | 0 | 0 | 0 | 0 | 0 |
| 0.1.15 | 0 | 0 | 0 | 0 | 0 |
| 0.1.14 | 0 | 0 | 0 | 0 | 0 |
| 0.1.13 | 0 | 0 | 0 | 0 | 0 |
| 0.1.12 | 0 | 0 | 0 | 0 | 0 |
| 0.1.11 | 0 | 0 | 0 | 0 | 0 |
| 0.1.10 | 0 | 0 | 0 | 0 | 0 |
| 0.1.9 | 0 | 0 | 0 | 0 | 0 |
| 0.1.8 | 0 | 0 | 0 | 0 | 0 |
| 0.1.7 | 0 | 0 | 0 | 0 | 0 |
| 0.1.6 | 0 | 0 | 0 | 0 | 0 |
| 0.1.5 | 0 | 0 | 0 | 0 | 0 |
| 0.1.4 | 0 | 0 | 0 | 0 | 0 |
| 0.1.3 | 0 | 0 | 0 | 0 | 0 |
| 0.1.2 | 0 | 0 | 0 | 0 | 0 |
| 0.1.1 | 0 | 0 | 0 | 0 | 0 |
| 0.1.0 | 0 | 0 | 0 | 0 | 0 |
3.5.0 - This version is safe to use because it has no known security vulnerabilities at this time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform
Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.
MIT - MIT LicenseJSON-RPC 2.0 server on top of FastAPI. Write JSON-RPC methods the same way you write FastAPI endpoints and get OpenAPI, Swagger UI and OpenRPC for free.
📚 Documentation: https://smagafurov.github.io/fastapi-jsonrpc/
pip install fastapi-jsonrpcimport fastapi_jsonrpc as jsonrpc
from pydantic import BaseModel
from fastapi import Body
app = jsonrpc.API()
api_v1 = jsonrpc.Entrypoint('/api/v1/jsonrpc')
class MyError(jsonrpc.BaseError):
CODE = 5000
MESSAGE = 'My error'
class DataModel(BaseModel):
details: str
@api_v1.method(errors=[MyError])
def echo(data: str = Body(..., examples=['hello'])) -> str:
if data == 'error':
raise MyError(data={'details': 'boom'})
return data
app.bind_entrypoint(api_v1)
if __name__ == '__main__':
import uvicorn
uvicorn.run('app:app', port=5000, access_log=False)Run it with uvicorn and open:
POST /api/v1/jsonrpc — JSON-RPC endpointGET /docs — Swagger UIGET /openapi.json — OpenAPI schemaGET /openrpc.json — OpenRPC schemaDepends, Body, Header, Cookie, Pydantic models, async/await.DataModel included in the schema.fastapi_jsonrpc.contrib.sentry.FastApiJsonRPCIntegration).See the full docs at https://smagafurov.github.io/fastapi-jsonrpc/.
# Install dependencies
uv sync --frozen --group dev
# Run tests
uv run --frozen python -m pytest
# Run a single test
uv run --frozen python -m pytest tests/test_jsonrpc.py::test_name -x
# Change dependencies — edit pyproject.toml, then:
uv lock
# Build and publish
uv build
uv publishMIT — see LICENSE.