A very simple Python library providing human-understandable HTTP status codes and helper methods to improve code readability. Originally forked from Django Rest Framework, it reached version 1.0.1 in October 2015 and has not seen further updates since, making it an effectively abandoned project.
Install & Compatibility
Where this runs
tested against v1.0.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.2MB
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 2.4s · import 0.000s · 20MB
17MB installed
● package 17MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
The function expects a numeric status code, not a response object directly.
status.is_success(code)
This quickstart demonstrates how to import and use the `status` library with HTTP status codes and helper functions, often in conjunction with a library like `requests`.
import requests
import status
import os
# Example usage with a requests response
response = requests.get(os.environ.get('TEST_URL', 'https://httpbin.org/status/200'))
if status.is_success(code=response.status_code):
print(f"Request successful: {response.status_code} {status.phrase(response.status_code)}")
elif status.is_client_error(code=response.status_code):
print(f"Client error: {response.status_code} {status.phrase(response.status_code)}")
elif status.is_server_error(code=response.status_code):
print(f"Server error: {response.status_code} {status.phrase(response.status_code)}")
# Direct access to status codes
print(f"HTTP OK: {status.HTTP_200_OK}")
print(f"HTTP Not Found: {status.HTTP_404_NOT_FOUND}")
Upgrade
Version history
Breaking-change detection hasn't run for this library yet.
Audit
Security & dependencies
CVE tracking and dependency tree are planned for a later release.