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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for jder_fastapi-0.1.4.tar.gz
Algorithm Hash digest
SHA256 f573348754beea1dab95857f980cda34011a2215bd266675b136c24ed0976ab1
MD5 97dfc1a9789033e47805420ba076ac66
BLAKE2b-256 fab0a1c8b83995ee23058b416cf4053a9167581735b94cc1af7e10686911bb9e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jder_fastapi-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 954783463573459eec49ba7d398634dc622e4f26a059259586df7e9947df4fb2
MD5 c0e82e1cc859c07a9bd00a159f39c6e3
BLAKE2b-256 82ee5e9ec544343bcc59544a1a7a826f5afd39d14c4d461c1a9a5ff2cc5da7ec

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