$npx skillfedfor your agent

http-exceptions

Raisable HTTP Exceptions

With conditionsPyPI Python ModulesReleased Feb 2022283.5K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — http_exceptions-0.2.10-py3-none-any.whl
v0.2.10 · released 2022-02-15 · Python >=3.7,<4.0 · 1 runtime deps: importlib-metadata

Yes, if you are building HTTP APIs and want to decouple business logic from HTTP response construction. The package is stable, has no known vulnerabilities, and low install friction. The main caveat is that the latest release is from 2022-02-15, so verify that it integrates well with your specific framework version before committing to it.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low install friction with a single lightweight runtime dependency (importlib-metadata).
  • The package is actively maintained with a recent commit on 2026-08-10, though the latest release dates to 2022-02-15.

License · maintenance · safety

MIT (permissive) — Licensed under MIT (permissive), so you can use it freely in commercial and open-source projects without copyleft obligations.

last release 2022-02-15 (1641 days) · last repo commit 2026-08-10 · 3 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 283,513 downloads/mo, #8,073 on PyPI

Verify before relying

pip install http-exceptions

from http_exceptions import ForbiddenException, HTTPException

# Raise a specific exception
raise ForbiddenException()

# Or dynamically from a status code
raise HTTPException.from_status_code(status_code=403)(message="Access denied")
  • Whether the package's exception classes integrate seamlessly with popular frameworks like FastAPI, Django, or Starlette
  • Whether custom message or metadata can be attached to exceptions beyond the status code
Same gist for agents: .md · .json

What it is and what it does

http-exceptions is a lightweight exception library that maps HTTP status codes to Python exception classes. Instead of manually catching errors and constructing HTTP responses, you raise semantic exceptions like ForbiddenException or BadRequestException directly from your business logic, and let your web framework handle the conversion to an HTTP response.

The package provides exception classes for all standard HTTP client errors (400–499) and server errors (500–599), organized into ClientException and ServerException base classes for hierarchical catching. It also supports dynamic exception lookup via HTTPException.from_status_code(), letting you raise the appropriate exception based on a status code at runtime. The single runtime dependency is importlib-metadata, and it supports Python 3.7 through 3.10.

Use it for

  • Raise ForbiddenException or UnauthorizedException from service functions without coupling to HTTP response objects
  • Catch ClientException to handle all 4xx errors uniformly, or ServerException for all 5xx errors
  • Convert an incoming HTTP response status code to the corresponding exception and re-raise it in your application
  • Simplify FastAPI or other REST framework error handling by raising exceptions instead of returning error responses

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you are building HTTP APIs and want to decouple business logic from HTTP response construction.

The package is stable, has no known vulnerabilities, and low install friction. The main caveat is that the latest release is from 2022-02-15, so verify that it integrates well with your specific framework version before committing to it.

Install

http-exceptions on PyPI

Before you install

Low install friction with a single lightweight runtime dependency (importlib-metadata). The package is actively maintained with a recent commit on 2026-08-10, though the latest release dates to 2022-02-15.

License in practice

Licensed under MIT (permissive), so you can use it freely in commercial and open-source projects without copyleft obligations.

Quickstart

pip install http-exceptions

from http_exceptions import ForbiddenException, HTTPException

# Raise a specific exception
raise ForbiddenException()

# Or dynamically from a status code
raise HTTPException.from_status_code(status_code=403)(message="Access denied")

Verify before relying

  • Whether the package's exception classes integrate seamlessly with popular frameworks like FastAPI, Django, or Starlette
  • Whether custom message or metadata can be attached to exceptions beyond the status code

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.7,<4.0
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
importlib-metadata
MaintenanceActively maintained 1,641 days since the last release
Last repo commit
First released
Downloads283,513 / month, #8,073 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Build ToolsTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Evidence: http_exceptions-0.2.10-py3-none-any.whl

Tags

Capabilities
http status code exceptionsraise http errors in pythonhttp exception classesfastapi exception handlingrest api error responsessemantic http exceptions400 500 status exceptions
Topics
http-errorsexception-handlingrest-api
PyPI keywords
pythonpython3httpexceptionsfastapiapiwebrest

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “http status code exceptions”

  • http-exceptionsProvides a set of raisable exception classes corresponding to HTTP…
  • zExceptionszExceptions provides a collection of exception classes and utilities…
  • aioresponsesMocks HTTP requests made by aiohttp's ClientSession for testing…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also zExceptions · retryhttp · python-status · httsleep · httmock · fastapi-health · requestsexceptions · fastapi-decorators · exceptiongroup · tuspyserver