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.2.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.2-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for jder_fastapi-0.1.2.tar.gz
Algorithm Hash digest
SHA256 20a01ab29b70ab1623e9788729387c02e7f44ef3cf03f9f89c05e6a3382d6bd9
MD5 e938256cda6f2d57a13851f702d7188e
BLAKE2b-256 52e1421c4f33c0bbf5e7c646810c5f19ab52bf2897f3c2257698586674d8cd93

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jder_fastapi-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fe1df6dcc8b30cf9fb7eeacdf232a999f61411f816b1d605dab593cc68016c4d
MD5 d802a2a0f25f1495179d6769ddd30df6
BLAKE2b-256 46d8389b63c588bba05ce03dd0eb9c979f0dedee5622f311dcda4d84677f8b2f

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