Skip to main content

Gestionnaire universel d'erreurs Flask — pages HTML, JSON et trace ID

Project description

Flask Error Manager

Un gestionnaire d’erreurs universel pour Flask, simple à intégrer.

Installation

pip install flask_error_manager

Utilisation

from flask import Flask
from flask_error_manager import init_error_manager

app = Flask(__name__)
init_error_manager(app)

@app.route("/boom")
def boom():
    1 / 0

app.run(port=5000)

Fonctionnalités

  • Gère toutes les erreurs (400–599 + exceptions Python)
  • Affiche une page HTML stylée si c’est un navigateur
  • Renvoie une réponse JSON si c’est une API
  • Génère un Trace ID unique pour chaque erreur
  • Permet de surcharger les pages (ex: templates/errors/404.html)

Licence MIT.

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

error_web-1.0.0.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

error_web-1.0.0-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file error_web-1.0.0.tar.gz.

File metadata

  • Download URL: error_web-1.0.0.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for error_web-1.0.0.tar.gz
Algorithm Hash digest
SHA256 86b8e6a580c8e02c79d671b6ea355a5d6e13788aabf1dc8eb208846724b1a885
MD5 1a3e2945b5a150afde4f1c6f0cf5eadd
BLAKE2b-256 fd7e7223051ed31462296ff9d70ee9ec5fec3b0a59d63f6111d4aac0ed0d2389

See more details on using hashes here.

File details

Details for the file error_web-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: error_web-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for error_web-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d4eaf99bce138904aed2c3de7aa7aadb654bdeebc0343e38be0b65cc9bfa0a08
MD5 08d91dff774b6018a79ef41a723e79fc
BLAKE2b-256 c0144bbe0e578da428c417b1daca6de63246392a360f940b4300cbc42db3715c

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