Skip to main content

django-ninja-problems

RFC 7807 and RFC 9457 Problem Details for Django Ninja APIs.

Installation

pip install django-ninja-problems

Quick Start

from ninja import NinjaAPI
from django_ninja_problems import register_problem_handlers

api = NinjaAPI()
register_problem_handlers(api)

Supported Exceptions

  • ninja.errors.HttpError
  • django.http.Http404 and ObjectDoesNotExist
  • ninja.errors.ValidationError and pydantic.ValidationError (HTTP 422)
  • django.core.exceptions.ValidationError (HTTP 400 or 409)
  • django.db.IntegrityError (HTTP 409)
  • Custom authentication exceptions (HTTP 401)
  • Unexpected Exception (HTTP 500 masked in production)

Metadata

Release files for django-ninja-problems 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-ninja-problems 0.1.0
File Size Uploaded
django_ninja_problems-0.1.0.tar.gz 7.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-ninja-problems 0.1.0
File Interpreter ABI Platform
django_ninja_problems-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.8 kB

Release files / django_ninja_problems-0.1.0.tar.gz

Download URL django_ninja_problems-0.1.0.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ea5209ed4a5c68ee10ca2a0d01cec0780beacf65bde016a5869211ccf1bc2363
BLAKE2b-256 checksum
How to use checksums
638b5b73b8c75cbc12ac9a429a98a9c8fc570aba195443f1fa64e27694c1573b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.19

Release files / django_ninja_problems-0.1.0-py3-none-any.whl

Download URL django_ninja_problems-0.1.0-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
13a4f32274e7bb88c61301bb57d8efcf5b1c52b777f36866e25a25fc08f17e8c
BLAKE2b-256 checksum
How to use checksums
53e1ee38e749c884e6846031cfe058eaf7e40bc84ff7e8f105aaea20f1e2b47a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.19

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page