Skip to main content

A response builder for FastAPI

Project description

JDER FastAPI

A response builder for FastAPI.

This package includes different response builders based on the JSON response structure specified in JSON Data Errors Response (JDER). With the builders, various kinds of responses can be created easily instead of sending plain text responses.

Quick Start

To create a JSON response, use the following code:

from fastapi import FastAPI
from fastapi.responses import Response
from jder_fastapi.responses.json import createJsonResponse

app: FastAPI = FastAPI()

@app.get("/")
async def route() -> Response:
    return createJsonResponse()

And the response will be shown as below:

{
    "success": true
}

License

This project is licensed under the terms of 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

jder_fastapi-0.1.3.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

jder_fastapi-0.1.3-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file jder_fastapi-0.1.3.tar.gz.

File metadata

  • Download URL: jder_fastapi-0.1.3.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.0

File hashes

Hashes for jder_fastapi-0.1.3.tar.gz
Algorithm Hash digest
SHA256 b23491e929a2d12f9a3115ea70e95c4cfa9dbe398f36ea6b0fc3ac6f44ffbaa3
MD5 b14e1755becce2c6ad3ae38d0407aa91
BLAKE2b-256 bf8f043348605ec7ce741a58603ee96f24e7b33f9ceb71c2f1a66f31229b57f9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jder_fastapi-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 88d9b54de766e82587b42e9fde1c38cc61df20af5dfe8c927bac30557f33fba1
MD5 0e006eb98d0dc86cc135404e4844b0fb
BLAKE2b-256 6f5c13fe63c49040c1536d429e22b2d85a645a5103445d43a624494e1f83513d

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