Skip to main content

Python Status Code based on ``kkconst``

Project description

Python Status Code based on kkconst

Installation

pip install StatusCode

Usage

from StatusCode import BaseStatusCode, StatusCodeField

class ProfileStatusCode(BaseStatusCode):
    """ 4000xx - Profile Relative Status Code """
    PROFILE_NOT_FOUND = StatusCodeField(410000, 'Profile Not Found', description=u'用户不存在')

ProfileStatusCode.PROFILE_NOT_FOUND
# 410001

ProfileStatusCode.PROFILE_NOT_FOUND.message
# u'Profile Not Found'

ProfileStatusCode.PROFILE_NOT_FOUND.description
# u'\u7528\u6237\u4e0d\u5b58\u5728'

Requirement

<require all letters capital> = StatusCodeField(<require no duplicated value>, <message>, <description>)

Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for StatusCode, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size StatusCode-1.0.0-py2.py3-none-any.whl (3.4 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size StatusCode-1.0.0.tar.gz (1.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page