本文整理汇总了Python中voluptuous.Schema.__doc__方法的典型用法代码示例。如果您正苦于以下问题:Python Schema.__doc__方法的具体用法?Python Schema.__doc__怎么用?Python Schema.__doc__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类voluptuous.Schema
的用法示例。
在下文中一共展示了Schema.__doc__方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Schema
# 需要导入模块: from voluptuous import Schema [as 别名]
# 或者: from voluptuous.Schema import __doc__ [as 别名]
#!/usr/bin/env python
__all__ = [
"Environment", "EnvironmentalDataPoint", "FirmwareModule",
"FirmwareModuleType", "Recipe", "SoftwareModule", "SoftwareModuleType"
]
from openag_lib.firmware.categories import SENSORS, ACTUATORS, CALIBRATION, all_categories
from voluptuous import Schema, Required, Any, Extra, Optional, REMOVE_EXTRA
Environment = Schema({
"name": Any(str, unicode),
}, extra=REMOVE_EXTRA)
Environment.__doc__ = """
An :class:`Environment` abstractly represents a single homogenous
climate-controlled volume within a system. A food computer usually consists of
a single :class:`Environment`, but larger systems will often contain more than
one :class:`Environment`.
.. py:attribute:: name
(str) A human-readable name for the environment
"""
EnvironmentalDataPoint = Schema({
Required("environment"): Any(str, unicode),
Required("variable"): Any(str, unicode),
Required("is_manual", default=False): bool,
Required("is_desired"): bool,
"value": object,
Required("timestamp"): Any(float, int),
}, extra=REMOVE_EXTRA)