本文整理匯總了Python中marshmallow.fields.Bool方法的典型用法代碼示例。如果您正苦於以下問題:Python fields.Bool方法的具體用法?Python fields.Bool怎麽用?Python fields.Bool使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類marshmallow.fields
的用法示例。
在下文中一共展示了fields.Bool方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: app_config
# 需要導入模塊: from marshmallow import fields [as 別名]
# 或者: from marshmallow.fields import Bool [as 別名]
def app_config(app_config):
"""Override conftest.py's app_config
"""
app_config['ILS_RECORDS_METADATA_NAMESPACES'] = {
"document": {
"accelerator_experiments": {
"@context": "https://example.com/accelerator_experiments/terms"
},
"standard_status": {
"@context": "https://example.com/standard_status/terms"
},
}
}
app_config['ILS_RECORDS_METADATA_EXTENSIONS'] = {
"document": {
"accelerator_experiments:accelerator": {
"elasticsearch": "keyword",
"marshmallow": SanitizedUnicode(required=True)
},
'accelerator_experiments:project': {
'elasticsearch': 'text',
'marshmallow': SanitizedUnicode()
},
'accelerator_experiments:number_in_sequence': {
'elasticsearch': 'long',
'marshmallow': Integer()
},
'accelerator_experiments:scientific_sequence': {
'elasticsearch': 'long',
'marshmallow': List(Integer())
},
'standard_status:original_presentation_date': {
'elasticsearch': 'date',
'marshmallow': DateString()
},
'standard_status:right_or_wrong': {
'elasticsearch': 'boolean',
'marshmallow': Bool()
}
}
}
return app_config