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
Metadata
Release files for check-docking 1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| check-docking-1.2.tar.gz | 14.9 kB | Without provenance | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| check_docking-1.2-py2.7.egg | Legacy Egg format | - | - | Details |
| check-docking-1.2.linux-x86_64.tar.gz | Details |
Total release size: 74.7 kB
Release files / check-docking-1.2.tar.gz
| Download URL | check-docking-1.2.tar.gz |
|---|---|
| Size | 14.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bf90141728828cf24555077d1589d9fdefb6a1a8834378afebaee48763488111
|
|
BLAKE2b-256 checksum How to use checksums |
47c4f864e4a1625efea937166053f43971717a52dd97b6ff7cfff9f2dc4102fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / check_docking-1.2-py2.7.egg
| Download URL | check_docking-1.2-py2.7.egg |
|---|---|
| Size | 37.9 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
dfc037eb9cc94c7e68ca6bf07751698f3c174ac629339309654e07166ded9bac
|
|
BLAKE2b-256 checksum How to use checksums |
2c83398a20a80e4bb204535bc0cb9b02e918e262090e1e013876edcab146fa78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / check-docking-1.2.linux-x86_64.tar.gz
| Download URL | check-docking-1.2.linux-x86_64.tar.gz |
|---|---|
| Size | 22.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
88dc1748d549defce975cffd053d09e03c3e8ef86c14d3205db65050af96734c
|
|
BLAKE2b-256 checksum How to use checksums |
8b881514bc0cd48b866948a49ae755feca876ed7128e4d1c9cff37ec63424b7b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for check-docking 1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.