Skip to main content

The set of standard http constants

Project description

HTTP Status Constants

A set of constants for HTTP statuses and headers. Improve your code readability.

Installation

You can install Http Constants from PyPI:

pip install http_constants

The library is supported on Python 3.7+.

Usage

Headers

from http_constants.headers import HTTPHeaders
HTTPHeaders.ACCEPT
> 'Accept'

HTTPHeaders.CONTENT_TYPE_VALUES.json
> 'application/json'

Statuses

In[1]: 
    from http_constants import status
    status.SERVICE_UNAVAILABLE
Out[1]:
    503
---
In[2]: 
    from http_constants.status import HttpStatus
    HttpStatus(500).get_meaning()

Out[2]: 
    'Internal Server Error'

Methods

In[1]: 
    from http_constants import method
    method.GET
Out[1]:
    "GET"

URI Schemas

In[1]: 
    from http_constants import schema
    schema.HTTP
Out[1]:
    "http"

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

http-status-codes-1.0.3.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

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

http_status_codes-1.0.3-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file http-status-codes-1.0.3.tar.gz.

File metadata

  • Download URL: http-status-codes-1.0.3.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9

File hashes

Hashes for http-status-codes-1.0.3.tar.gz
Algorithm Hash digest
SHA256 6587d0fc0dc646eeacf14446fe0567981cf6182337708a011c17946f85f632d6
MD5 0914d5b8e29d3fd76318b53be74841f7
BLAKE2b-256 43d75297839301d7ab50e6054b3170699145b4addd84c7a81007b676347c7a20

See more details on using hashes here.

File details

Details for the file http_status_codes-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: http_status_codes-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9

File hashes

Hashes for http_status_codes-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 139ccd38af7debc9fc46b876788a08239f3e1be477e5a281555371c6867cf3b2
MD5 615ff6868e87e52add03f7b90fc9cdfe
BLAKE2b-256 77f9fd040965ef0982725cd31eae9f201069044459308f752421e2cd6b29cf98

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