Skip to main content

python-app-exceptions

Base exception hierarchy for Python web applications.

Installation

pip install python-app-exceptions

Usage

from python_app_exceptions import (
    BaseApplicationException,
    BusinessLogicError,
    ValidationError,
    InvalidInputError,
    RetryExhaustedException,
    RetryableError
)

# Raise validation errors
raise ValidationError("email", "invalid@", "Invalid email format")

# Raise business logic errors
raise BusinessLogicError("user_must_be_active", "User account is disabled")

# Raise retry errors
raise RetryExhaustedException("api_call", attempts=3)

Features

  • ✅ Clean exception hierarchy
  • ✅ Detailed error messages with optional details
  • ✅ Framework-agnostic (works with FastAPI, Flask, Django, etc.)
  • ✅ Type-safe
  • ✅ Zero dependencies

Exception Hierarchy

BaseApplicationException
├── BusinessLogicError
├── ValidationError
│   └── InvalidInputError
└── RetryExhaustedException
└── RetryableError

License

MIT

Metadata

Release files for python-app-exceptions 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 python-app-exceptions 0.1.0
File Size Uploaded Provenance Actions
python_app_exceptions-0.1.0.tar.gz 5.4 kB Without provenance Details for python_app_exceptions-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for python-app-exceptions 0.1.0
File Interpreter ABI Platform Actions
python_app_exceptions-0.1.0-py3-none-any.whl Python 3 none any Details for python_app_exceptions-0.1.0-py3-none-any.whl

Total release size: 9.4 kB

Release files / python_app_exceptions-0.1.0.tar.gz

Download URL python_app_exceptions-0.1.0.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ed7b5862e7545f4fb66e617259982d245df19dd9ebc7d092602ca09344642e7d
BLAKE2b-256 checksum
How to use checksums
d07a74b9b88895f7305996be468f44092428a9672b6427d011bb7c608130eb6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

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

Download URL python_app_exceptions-0.1.0-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5dc040ba3e1a0d02603dc774d20e61f4132eb48cef804302be91a50777f0f2b3
BLAKE2b-256 checksum
How to use checksums
3862069d108be5a0bb5f3e3a9708e2f73cf65756e2775d9142a573258f9bcd99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Security for python-app-exceptions 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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