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>)

Download files

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

Source Distribution

StatusCode-1.0.0.tar.gz (1.7 kB view hashes)

Uploaded Source

Built Distribution

StatusCode-1.0.0-py2.py3-none-any.whl (3.4 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page