Python 3.5 http.HTTPStatus
backported to 3.4 and 2.7
Install:
$ pip install httpstatus35
...or if you want to use Python 2.7 run:
$ pip install httpstatus35[py2x]
Enjoy:
$ python2.7 Python 2.7.10 (default, Oct 23 2015, 19:19:21) [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from httpstatus import HTTPStatus >>> HTTPStatus.OK <HTTPStatus.OK: 200>
httpstatus35 is licensed under the MIT license. See the license file for details.