Socket
Socket
Sign inDemoInstall

http-status-codes

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http-status-codes

The set of standard http constants


Maintainers
1

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"

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc