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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for jder_fastapi-0.1.1.tar.gz
Algorithm Hash digest
SHA256 964c1a61900fef49a3eb555fe08b473664819386af61c64742f797bbc8aa1918
MD5 16b6bce536ba25800106fb2b3b49f47e
BLAKE2b-256 79b76a2102be5bfe9cc479c3a3c0a8c0e959202399a38671d8ce6ffb423c1467

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jder_fastapi-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4d5d25469527e8097c47cf474d831ff5a9d3c02c6ff3901b3ea3d9980dfe3331
MD5 2468574c0102fc3725cff8b1cd84d1ec
BLAKE2b-256 ea377bae1fda1c7a97dacff3a09b80e110c27fddded5706c1b24a940a6a3f12f

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