Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/007gzs/apiutils
https://github.com/007gzs/apiutils
Last synced: 14 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/007gzs/apiutils
- Owner: 007gzs
- License: gpl-3.0
- Created: 2020-01-09T02:42:48.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-01T04:23:54.000Z (almost 4 years ago)
- Last Synced: 2024-12-08T10:36:57.516Z (about 1 month ago)
- Language: Python
- Size: 75.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
#######################
ApiUtils
#######################.. image:: https://travis-ci.org/007gzs/apiutils.svg?branch=master
:target: https://travis-ci.org/007gzs/apiutils
.. image:: https://img.shields.io/pypi/v/apiutils.svg
:target: https://pypi.org/project/apiutilsCONSTANCE 配置::
CONSTANCE_CONFIG = OrderedDict((
('SL_CPROFILE_LOG', (False, '请求函数耗时统计')),
('SL_CPROFILE_LOG_MIN_SECONDS', (10, '函数耗时LOG最小时间')),
('SL_CPROFILE_LOG_SKIP_PATH', ("", '请求函数耗时统计排除URL')),
('SL_CPROFILE_LOG_WHITE_PATH', ("", '关闭函数耗时统计时仍然统计的URL')),
('SL_LONG_TIME_MAIL_MIN_SECONDS', (20, '函数耗时mail最小时间')),
('SL_LONG_TIME_COUNT_MIN_SECONDS', (10, '函数耗时记录到长时间统计')),('VERIFY_CODE_MOBILE_COUNT', (10, '每个手机号每天可发送次数')),
('VERIFY_CODE_WHITE_LIST_MOBILES', ('13800138000', '白名单手机号(逗号隔开)')),
('VERIFY_CODE_WHITE_LIST_CODE', ('6379', '白名单验证码')),
('VERIFY_CODE_SEND_EXPIRE_SECONDS', (60, '验证码发送限制秒数, 成功发送验证码后再次请求将在该时间过后才会重新发送')),
('VERIFY_CODE_EXPIRE_SECONDS', (1800, '验证码默认过期秒数')),
('VERIFY_CODE_MAX_TIMES', (10, '验证码可验证次数, 达到验证码次数后重新发送才能继续验证')),
('VERIFY_CODE_SMS_CONTENT', ('直接发送短信以验证手机号,半小时内发送有效', '验证码上行说明文字')),
))settings配置::
def async_call(func, *args, **kwargs):
return func(*args, **kwargs)SERVER_IP
SMS_ACCESS_KEY_ID = '阿里短信key'
SMS_ACCESS_KEY_SECRET = '阿里短信secret'
SMS_SIGNNAME_VCODE = '验证码短信签名'
SMS_TEMPLATE_VCODE = '验证码短信模板id'
SMS_TEMPLATE_VCODE_PARAM = '验证码短信模板参数明'