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,
    "data": null,
    "errors": []
}

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.2.4.tar.gz (3.7 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.2.4-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jder_fastapi-0.2.4.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for jder_fastapi-0.2.4.tar.gz
Algorithm Hash digest
SHA256 e64f532d4ee5a181cebfecf5cbd68f3988a28e2442df132fd22a51a9d2f2a917
MD5 4753b522e88be55444d834c84aab928a
BLAKE2b-256 1c37f7a80ab8287a40ae71029f32fbba7b2415345aa1d9c25bf6d54acc5251df

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jder_fastapi-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for jder_fastapi-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3a94652bd06bba1aec3a79a8dc4d7bd4ba8fee88b200c724c90d39abaa0e5563
MD5 5d1524ac460212a9cfa6dd9b2ebd5bd5
BLAKE2b-256 d04059e46895848d40920a35371bb8c131295cee92fdc919f725021b1a95deac

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