voluptuous 数据验证库

voluptuous简介

voluptuous,Github上显示为100%Python代码编写的Python第三方模块,用于数据验证,而且主要验证以JSON、YAML等形式进入Python的数据。

voluptuous实例

>>> schema = Schema(int)
>>> schema(1)
1
>>> try:
...   schema('one')
...   raise AssertionError('MultipleInvalid not raised')
... except MultipleInvalid as e:
...   exc = e
>>> str(exc) == "expected int"
True

voluptuous Github统计数据

BSD-3-Clause license

Github 1.8k stars

voluptuous安装命令

pip install voluptuous

voluptuous要求的Python版本

voluptuous 0.14.1 Requires: Python >=3.7(数据来源:pypi)

免责声明:内容编辑自网络,仅供参考,不保证正确性,不作任何决策依据!!以上数据皆截止于博文的写稿日期。


行业导航 / Python指南 :
























Copyright © 2022-2024 笨鸟工具 x1y1z1.com All Rights Reserved.