check-docking is a Python package that inspect request data from client for you.
Project description
check-docking.
介绍:
此子项目仅为总结前项目的经验, 在后续项目上, 接口文档的定义入库, 结合入库的数据生成配置文件.
根据生成的配置文件, 当客户端与服务端对接时, 让程序能够自动检查客户端的传入, 并将问题返回给客户端.
该模块的目的在于减少客户端开发过程中, 在琐屑问题上对服务端的干扰. 如请求类型错误, 多参, 少参, 重参, 数据类型错误, 是否必填项等等.
使用:
配置settings.py修改:
# check-docking配置项 IS_DATA_INSPECT = True # 仅 DEBUG 为 True 时有效 INSPECT_PROFILE = "project.check_config" # 检测依赖配置文件模块 # INSTALLED_APPS 增加: 'check_docking', 'check_docking.stored.django',下面两项非必须, 需要完成使用流程节点, 生成依赖的配置文件后启用其一.
MIDDLEWARE_CLASSES 增加: 'check_docking.middleware.InspectMiddleware' 除了MiddleWare形式, 你也可以使用装饰器形式: from check_docking.inspect import debug_request @debug_request你还可以使用工具, 从源代码中搜集数据并入库, 具体可以参看project_demo/demo/demo.py中代码.
流程:
$ python manage.py syncdb $ python manage.py runserver http://127.0.0.0:8000/admin 录入数据. $ python manage.py inspectprofile
Changelog
1.2 - 25-Jan-2015
First release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
check-docking-1.2.tar.gz
(14.9 kB
view details)
Built Distributions
check_docking-1.2-py2.7.egg
(37.9 kB
view details)
File details
Details for the file check-docking-1.2.tar.gz
.
File metadata
- Download URL: check-docking-1.2.tar.gz
- Upload date:
- Size: 14.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf90141728828cf24555077d1589d9fdefb6a1a8834378afebaee48763488111 |
|
MD5 | 82d00c359b5917a0d4751132dadaf4d5 |
|
BLAKE2b-256 | 47c4f864e4a1625efea937166053f43971717a52dd97b6ff7cfff9f2dc4102fc |
File details
Details for the file check_docking-1.2-py2.7.egg
.
File metadata
- Download URL: check_docking-1.2-py2.7.egg
- Upload date:
- Size: 37.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dfc037eb9cc94c7e68ca6bf07751698f3c174ac629339309654e07166ded9bac |
|
MD5 | a2a01e6c4136fcaa19d1f80636b125db |
|
BLAKE2b-256 | 2c83398a20a80e4bb204535bc0cb9b02e918e262090e1e013876edcab146fa78 |
File details
Details for the file check-docking-1.2.linux-x86_64.tar.gz
.
File metadata
- Download URL: check-docking-1.2.linux-x86_64.tar.gz
- Upload date:
- Size: 22.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88dc1748d549defce975cffd053d09e03c3e8ef86c14d3205db65050af96734c |
|
MD5 | 55c5337b0909579a0f7eea6d9bc2be40 |
|
BLAKE2b-256 | 8b881514bc0cd48b866948a49ae755feca876ed7128e4d1c9cff37ec63424b7b |