python fields_Python fields.Nested方法代码示例
本文整理汇总了Python中marshmallow.fields.Nested方法的典型用法代码示例。如果您正苦于以下问题:Python fields.Nested方法的具体用法?Python fields.Nested怎么用?Python fields.Nested使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在模块marshmallow.fields的用法示例。
在下文中一共展示了fields.Nested方法的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: test_nested_descriptions
点赞 6
# 需要导入模块: from marshmallow import fields [as 别名]
# 或者: from marshmallow.fields import Nested [as 别名]
def test_nested_descriptions():
class TestNestedSchema(Schema):
myfield = fields.String(metadata={"description": "Brown Cow"})
yourfield = fields.Integer(required=True)
class TestSchema(Schema):
nested = fields.Nested(
TestNestedSchema, metadata={"description": "Nested 1", "title": "Title1"}
)
yourfield_nested = fields.Integer(required=True)
schema = TestSchema()
dumped = validate_and_dump(schema)
nested_def = dumped["definitions"]["TestNestedSchema"]
nested_dmp = dumped["definitions"]["TestSchema"]["properties"]["nested"]
assert nested_def["properties"]["myfield"]["description"] == "Brown Cow"
assert nested_dmp["$ref"] == "#/definitions/TestNestedSchema"
assert nested_dmp["description"] == "Nested 1"
assert nested_dmp["title"] == "Title1"
开发者ID:fuhrysteve,项目名称:marshmallow-jsonschema,代码行数:24,
示例2: test_nested_string_to_cls
点赞 6
# 需要导入模块: from marshmallow import fields [as 别名]
# 或者: from marshmallow.fields import Nested [as 别名]
def test_nested_string_to_cls():
class TestNamedNestedSchema(Schema):
foo = fields.Integer(required=True)
class TestSchema(Schema):
foo2 = fields.Integer(required=True)
nested = fields.Nested("TestNamedNestedSchema")
schema = TestSchema()
dumped = validate_and_dump(schema)
nested_def = dumped["definitions"]["TestNamedNestedSchema"]
nested_dmp = dumped["definitions"]["TestSchema"]["properties"]["nested"]
assert nested_dmp["type"] == "object"
assert nested_def["properties"]["foo"]["format"] == "integer"
开发者ID:fuhrysteve,项目名称:marshmallow-jsonschema,代码行数:18,
示例3: test_list_nested
点赞 6
# 需要导入模块: from marshmallow import fields [as 别名]
# 或者: from marshmallow.fields import Nested [as 别名]
def test_list_nested():
"""Test that a list field will work with an inner nested field."""
class InnerSchema(Schema):
foo = fields.Integer(required=True)
class ListSchema(Schema):
bar = fields.List(fields.Nested(InnerSchema), required=True)
schema = ListSchema()
dumped = validate_and_dump(schema)
nested_json = dumped["definitions"]["ListSchema"]["properties"]["bar"]
assert nested_json["type"] == "array"
assert "items" in nested_json
item_schema = nested_json["items"]
assert "InnerSchema" in item_schema["$ref"]
开发者ID:fuhrysteve,项目名称:marshmallow-jsonschema,代码行数:21,
示例4: test_deep_nested
点赞 6
# 需要导入模块: from marshmallow import fields [as 别名]
# 或者: from marshmallow.fields import Nested [as 别名]
def test_deep_nested():
"""Test that deep nested schemas are in definitions."""
class InnerSchema(Schema):
boz = fields.Integer(required=True)
class InnerMiddleSchema(Schema):
baz = fields.Nested(InnerSchema, required=True)
class OuterMiddleSchema(Schema):
bar = fields.Nested(InnerMiddleSchema, required=True)
class OuterSchema(Schema):
foo = fields.Nested(OuterMiddleSchema, required=True)
schema = OuterSchema()
dumped = validate_and_dump(schema)
defs = dumped["definitions"]
assert "OuterSchema" in defs
assert "OuterMiddleSchema" in defs
assert "InnerMiddleSchema" in defs
assert "InnerSchema" in defs
开发者ID:fuhrysteve,项目名称:marshmallow-jsonschema,代码行数:25,
示例5: test_respect_only_for_nested_schema
点赞 6
# 需要导入模块: from marshmallow import fields [as 别名]
# 或者: from marshmallow.fields import Nested [as 别名]
def test_respect_only_for_nested_schema():
"""Should ignore fields not in 'only' metadata for nested schemas."""
class InnerRecursiveSchema(Schema):
id = fields.Integer(required=True)
baz = fields.String()
recursive = fields.Nested("InnerRecursiveSchema")
class MiddleSchema(Schema):
id = fields.Integer(required=True)
bar = fields.String()
inner = fields.Nested("InnerRecursiveSchema", only=("id", "baz"))
class OuterSchema(Schema):
foo2 = fields.Integer(required=True)
nested = fields.Nested("MiddleSchema")
schema = OuterSchema()
dumped = validate_and_dump(schema)
inner_props = dumped["definitions"]["InnerRecursiveSchema"]["properties"]
assert "recursive" not in inner_props
开发者ID:fuhrysteve,项目名称:marshmallow-jsonschema,代码行数:23,
示例6: test_respect_dotted_exclude_for_nested_schema
点赞 6
# 需要导入模块: from marshmallow import fields [as 别名]
# 或者: from marshmallow.fields import Nested [as 别名]
def test_respect_dotted_exclude_for_nested_schema():
"""Should ignore dotted fields in 'exclude' metadata for nested schemas."""
class InnerRecursiveSchema(Schema):
id = fields.Integer(required=True)
baz = fields.String()
recursive = fields.Nested("InnerRecursiveSchema")
class MiddleSchema(Schema):
id = fields.Integer(required=True)
bar = fields.String()
inner = fields.Nested("InnerRecursiveSchema")
class OuterSchema(Schema):
foo2 = fields.Integer(required=True)
nested = fields.Nested("MiddleSchema", exclude=("inner.recursive",))
schema = OuterSchema()
dumped = validate_and_dump(schema)
inner_props = dumped["definitions"]["InnerRecursiveSchema"]["properties"]
assert "recursive" not in inner_props
开发者ID:fuhrysteve,项目名称:marshmallow-jsonschema,代码行数:25,
示例7: test_nested_instance
点赞 6
# 需要导入模块: from marshmallow import fields [as 别名]
# 或者: from marshmallow.fields import Nested [as 别名]
def test_nested_instance():
"""Should also work with nested schema instances"""
class TestNestedSchema(Schema):
baz = fields.Integer()
class TestSchema(Schema):
foo = fields.String()
bar = fields.Nested(TestNestedSchema())
schema = TestSchema()
dumped = validate_and_dump(schema)
nested_def = dumped["definitions"]["TestNestedSchema"]
nested_obj = dumped["definitions"]["TestSchema"]["properties"]["bar"]
assert "baz" in nested_def["properties"]
assert nested_obj["$ref"] == "#/definitions/TestNestedSchema"
开发者ID:fuhrysteve,项目名称:marshmallow-jsonschema,代码行数:21,
示例8: test_additional_properties_from_nested_meta
点赞 6
# 需要导入模块: from marshmallow import fields [as 别名]
# 或者: from marshmallow.fields import Nested [as 别名]
def test_additional_properties_from_nested_meta(additional_properties_value):
class TestNestedSchema(Schema):
class Meta:
additional_properties = additional_properties_value
foo = fields.Integer()
class TestSchema(Schema):
nested = fields.Nested(TestNestedSchema())
schema = TestSchema()
dumped = validate_and_dump(schema)
assert (
dumped["definitions"]["TestNestedSchema"]["additionalProperties"]
== additional_properties_value
)
开发者ID:fuhrysteve,项目名称:marshmallow-jsonschema,代码行数:20,
示例9: schema
点赞 6
# 需要导入模块: from marshmallow import fields [as 别名]
# 或者: from marshmallow.fields import Nested [as 别名]
def schema(**kwargs):
"""
Create a schema. Mostly useful for creating single-use schemas on-the-fly.
"""
items = list(kwargs.items())
if len(items) != 1 or not isinstance(items[0][1], dict):
raise RuntimeError('schema required 1 keyword argument of type dict')
name, spec = items[0]
schema_dict = {}
for key, value in spec.items():
cls, description = value if isinstance(value, tuple) else (value, None)
required = key.endswith('*')
key = key.rstrip('*')
kwargs = {'required': required, 'description': description}
if isinstance(cls, SchemaMeta):
schema_dict[key] = Nested(cls, required=required)
elif isinstance(cls, list) and len(cls) == 1:
cls = cls[0]
schema_dict[key] = List(Nested(cls), **kwargs) if isinstance(cls, SchemaMeta) else List(cls, **kwargs)
else:
schema_dict[key] = cls.__call__(**kwargs) if callable(cls) else cls
return type(name, (Schema,), schema_dict)
开发者ID:Tribler,项目名称:py-ipv8,代码行数:26,
示例10: test_using_as_nested_schema
点赞 6
# 需要导入模块: from marshmallow import fields [as 别名]
# 或者: from marshmallow.fields import Nested [as 别名]
def test_using_as_nested_schema(self):
class SchemaWithList(m.Schema):
items = f.List(f.Nested(MySchema))
schema = SchemaWithList()
result = schema.load(
{
"items": [
{"type": "Foo", "value": "hello world!"},
{"type": "Bar", "value": 123},
]
}
)
assert {"items": [Foo("hello world!"), Bar(123)]} == result
with pytest.raises(m.ValidationError) as exc_info:
schema.load(
{"items": [{"type": "Foo", "value": "hello world!"}, {"value": 123}]}
)
assert {"items": {1: {"type": [REQUIRED_ERROR]}}} == exc_info.value.messages
开发者ID:marshmallow-code,项目名称:marshmallow-oneofschema,代码行数:22,
示例11: test_using_as_nested_schema_with_many
点赞 6
# 需要导入模块: from marshmallow import fields [as 别名]
# 或者: from marshmallow.fields import Nested [as 别名]
def test_using_as_nested_schema_with_many(self):
class SchemaWithMany(m.Schema):
items = f.Nested(MySchema, many=True)
schema = SchemaWithMany()
result = schema.load(
{
"items": [
{"type": "Foo", "value": "hello world!"},
{"type": "Bar", "value": 123},
]
}
)
assert {"items": [Foo("hello world!"), Bar(123)]} == result
with pytest.raises(m.ValidationError) as exc_info:
schema.load(
{"items": [{"type": "Foo", "value": "hello world!"}, {"value": 123}]}
)
assert {"items": {1: {"type": [REQUIRED_ERROR]}}} == exc_info.value.messages
开发者ID:marshmallow-code,项目名称:marshmallow-oneofschema,代码行数:22,
示例12: create_app
点赞 6
# 需要导入模块: from marshmallow import fields [as 别名]
# 或者: from marshmallow.fields import Nested [as 别名]
def create_app(self):
app = Flask(__name__)
Rebar().init_app(app=app)
class NestedSchema(validation.RequestSchema):
baz = fields.List(fields.Integer())
class Schema(validation.RequestSchema):
foo = fields.Integer(required=True)
bar = fields.Email()
nested = fields.Nested(NestedSchema)
@app.route("/stuffs", methods=["POST"])
def json_body_handler():
data = get_json_body_params_or_400(schema=Schema)
return response(data)
return app
开发者ID:plangrid,项目名称:flask-rebar,代码行数:20,
示例13: __init__
点赞 6
# 需要导入模块: from marshmallow import fields [as 别名]
# 或者: from marshmallow.fields import Nested [as 别名]
def __init__(self, allow_extra):
class LocationSchema(Schema):
latitude = fields.Float(allow_none=True)
longitude = fields.Float(allow_none=True)
class SkillSchema(Schema):
subject = fields.Str(required=True)
subject_id = fields.Integer(required=True)
category = fields.Str(required=True)
qual_level = fields.Str(required=True)
qual_level_id = fields.Integer(required=True)
qual_level_ranking = fields.Float(default=0)
class Model(Schema):
id = fields.Integer(required=True)
client_name = fields.Str(validate=validate.Length(max=255), required=True)
sort_index = fields.Float(required=True)
# client_email = fields.Email()
client_phone = fields.Str(validate=validate.Length(max=255), allow_none=True)
location = fields.Nested(LocationSchema)
contractor = fields.Integer(validate=validate.Range(min=0), allow_none=True)
upstream_http_referrer = fields.Str(validate=validate.Length(max=1023), allow_none=True)
grecaptcha_response = fields.Str(validate=validate.Length(min=20, max=1000), required=True)
last_updated = fields.DateTime(allow_none=True)
skills = fields.Nested(SkillSchema, many=True)
self.allow_extra = allow_extra # unused
self.schema = Model()
开发者ID:samuelcolvin,项目名称:pydantic,代码行数:32,
示例14: makePaginationSchema
点赞 5
# 需要导入模块: from marshmallow import fields [as 别名]
# 或者: from marshmallow.fields import Nested [as 别名]
def makePaginationSchema(itemsCls, field_cls=fields.Nested):
return type("{}Paging".format(itemsCls.__class__.__name__),
(BasePaging, ), dict(items=field_cls(itemsCls, many=True)))
开发者ID:beavyHQ,项目名称:beavy,代码行数:5,
示例15: test_nested_recursive
点赞 5
# 需要导入模块: from marshmallow import fields [as 别名]
# 或者: from marshmallow.fields import Nested [as 别名]
def test_nested_recursive():
"""A self-referential schema should not cause an infinite recurse."""
class RecursiveSchema(Schema):
foo = fields.Integer(required=True)
children = fields.Nested("RecursiveSchema", many=True)
schema = RecursiveSchema()
dumped = validate_and_dump(schema)
props = dumped["definitions"]["RecursiveSchema"]["properties"]
assert "RecursiveSchema" in props["children"]["items"]["$ref"]
开发者ID:fuhrysteve,项目名称:marshmallow-jsonschema,代码行数:15,
示例16: test_additional_properties_nested_default
点赞 5
# 需要导入模块: from marshmallow import fields [as 别名]
# 或者: from marshmallow.fields import Nested [as 别名]
def test_additional_properties_nested_default():
class TestNestedSchema(Schema):
foo = fields.Integer()
class TestSchema(Schema):
nested = fields.Nested(TestNestedSchema())
schema = TestSchema()
dumped = validate_and_dump(schema)
assert not dumped["definitions"]["TestSchema"]["additionalProperties"]
开发者ID:fuhrysteve,项目名称:marshmallow-jsonschema,代码行数:14,
示例17: test_accepts_with_nested_schema
点赞 5
# 需要导入模块: from marshmallow import fields [as 别名]
# 或者: from marshmallow.fields import Nested [as 别名]
def test_accepts_with_nested_schema(app, client): # noqa
class TestSchema(Schema):
_id = fields.Integer()
name = fields.String()
class HostSchema(Schema):
name = fields.String()
child = fields.Nested(TestSchema)
api = Api(app)
@api.route("/test")
class TestResource(Resource):
@accepts(
"Foo",
dict(name="foo", type=int, help="An important foo"),
schema=HostSchema,
api=api,
)
def post(self):
assert request.parsed_obj
assert request.parsed_obj["child"] == {"_id": 42, "name": "test name"}
assert request.parsed_obj["name"] == "test host"
return "success"
with client as cl:
resp = cl.post(
"/test?foo=3",
json={"name": "test host", "child": {"_id": 42, "name": "test name"}},
)
assert resp.status_code == 200
开发者ID:apryor6,项目名称:flask_accepts,代码行数:33,
示例18: test_unpack_nested
点赞 5
# 需要导入模块: from marshmallow import fields [as 别名]
# 或者: from marshmallow.fields import Nested [as 别名]
def test_unpack_nested():
app = Flask(__name__)
api = Api(app)
class IntegerSchema(Schema):
my_int: ma.Integer()
result = utils.unpack_nested(ma.Nested(IntegerSchema), api=api)
assert result
开发者ID:apryor6,项目名称:flask_accepts,代码行数:12,
示例19: test_unpack_nested_self
点赞 5
# 需要导入模块: from marshmallow import fields [as 别名]
# 或者: from marshmallow.fields import Nested [as 别名]
def test_unpack_nested_self():
app = Flask(__name__)
api = Api(app)
class IntegerSchema(Schema):
my_int = ma.Integer()
children = ma.Nested("self", exclude=["children"])
schema = IntegerSchema()
result = utils.unpack_nested(schema.fields.get("children"), api=api)
assert type(result) == fr.Nested
开发者ID:apryor6,项目名称:flask_accepts,代码行数:15,
示例20: test_unpack_nested_self_many
点赞 5
# 需要导入模块: from marshmallow import fields [as 别名]
# 或者: from marshmallow.fields import Nested [as 别名]
def test_unpack_nested_self_many():
app = Flask(__name__)
api = Api(app)
class IntegerSchema(Schema):
my_int = ma.Integer()
children = ma.Nested("self", exclude=["children"], many=True)
schema = IntegerSchema()
result = utils.unpack_nested(schema.fields.get("children"), api=api)
assert type(result) == fr.List
开发者ID:apryor6,项目名称:flask_accepts,代码行数:15,
示例21: unpack_nested_self
点赞 5
# 需要导入模块: from marshmallow import fields [as 别名]
# 或者: from marshmallow.fields import Nested [as 别名]
def unpack_nested_self(val, api, model_name: str = None, operation: str = "dump"):
model_name = model_name or get_default_model_name(val.schema)
fields = {
k: map_type(v, api, model_name, operation)
for k, v in (vars(val.schema).get("fields").items())
if type(v) in type_map and _check_load_dump_only(v, operation)
}
if val.many:
return fr.List(
fr.Nested(
api.model(f"{model_name}-child", fields), **_ma_field_to_fr_field(val)
)
)
else:
return fr.Nested(
api.model(f"{model_name}-child", fields), **_ma_field_to_fr_field(val)
)
开发者ID:apryor6,项目名称:flask_accepts,代码行数:19,
示例22: scheme_factory
点赞 5
# 需要导入模块: from marshmallow import fields [as 别名]
# 或者: from marshmallow.fields import Nested [as 别名]
def scheme_factory(scheme_name: str) -> FieldFactory:
"""
Maps a scheme or scheme name into a field factory
"""
def _(
converter: AbstractConverter, subtypes: Tuple[type], opts: ConfigOptions
) -> FieldABC:
return fields.Nested(scheme_name, **opts)
_.__name__ = f"{scheme_name}FieldFactory"
_.__is_scheme__ = True # type: ignore
return _
开发者ID:justanr,项目名称:marshmallow-annotations,代码行数:15,
示例23: test_can_register_scheme_for_type
点赞 5
# 需要导入模块: from marshmallow import fields [as 别名]
# 或者: from marshmallow.fields import Nested [as 别名]
def test_can_register_scheme_for_type():
class SomeTypeScheme(Schema):
pass
class SomeType:
pass
registry = DefaultTypeRegistry()
registry.register_scheme_factory(SomeType, "SomeTypeScheme")
constructor = registry.get(SomeType)
field = constructor(None, (), {})
assert isinstance(field, fields.Nested)
assert isinstance(field.schema, SomeTypeScheme)
开发者ID:justanr,项目名称:marshmallow-annotations,代码行数:17,
示例24: test_builds_nested_many_field_when_typehint_is_scheme
点赞 5
# 需要导入模块: from marshmallow import fields [as 别名]
# 或者: from marshmallow.fields import Nested [as 别名]
def test_builds_nested_many_field_when_typehint_is_scheme(registry_):
class Album:
name: str
class Artist:
name: str
albums: t.List[Album]
class AlbumScheme(AnnotationSchema):
class Meta:
registry = registry_
target = Album
register_as_scheme = True
class ArtistScheme(AnnotationSchema):
class Meta:
registry = registry_
target = Artist
register_as_scheme = True
artist_fields = ArtistScheme._declared_fields
assert isinstance(artist_fields["albums"], fields.Nested)
assert artist_fields["albums"].many
开发者ID:justanr,项目名称:marshmallow-annotations,代码行数:28,
示例25: _validate_missing
点赞 5
# 需要导入模块: from marshmallow import fields [as 别名]
# 或者: from marshmallow.fields import Nested [as 别名]
def _validate_missing(self, value):
# Do not display detailed error data on required fields in nested
# schema - in this context, they're actually not required.
super(fields.Nested, self)._validate_missing(value)
开发者ID:4Catalyzer,项目名称:flask-resty,代码行数:6,
示例26: schemas
点赞 5
# 需要导入模块: from marshmallow import fields [as 别名]
# 或者: from marshmallow.fields import Nested [as 别名]
def schemas():
class NestedSchema(Schema):
value = fields.Integer()
class WidgetSchema(Schema):
id = fields.Integer(as_string=True)
name = fields.String(required=True, allow_none=True)
nested = fields.Nested(NestedSchema)
nested_many = fields.Nested(NestedSchema, many=True)
return {"widget": WidgetSchema()}
开发者ID:4Catalyzer,项目名称:flask-resty,代码行数:13,
示例27: test_marshmallow_dataclass
点赞 5
# 需要导入模块: from marshmallow import fields [as 别名]
# 或者: from marshmallow.fields import Nested [as 别名]
def test_marshmallow_dataclass(self):
class NewSchema(Schema):
pass
@dataclass(base_schema=NewSchema)
class NewDataclass:
pass
self.assertFieldsEqual(
field_for_schema(NewDataclass, metadata=dict(required=False)),
fields.Nested(NewDataclass.Schema),
)
开发者ID:lovasoa,项目名称:marshmallow_dataclass,代码行数:14,
示例28: nested_circular_ref_schema
点赞 5
# 需要导入模块: from marshmallow import fields [as 别名]
# 或者: from marshmallow.fields import Nested [as 别名]
def nested_circular_ref_schema():
class NestedStringSchema(Schema):
key = fields.String()
me = fields.Nested('NestedStringSchema')
return NestedStringSchema()
开发者ID:lyft,项目名称:toasted-marshmallow,代码行数:7,
示例29: nested_schema
点赞 5
# 需要导入模块: from marshmallow import fields [as 别名]
# 或者: from marshmallow.fields import Nested [as 别名]
def nested_schema():
class GrandChildSchema(Schema):
bar = fields.String()
raz = fields.String()
class SubSchema(Schema):
name = fields.String()
value = fields.Nested(GrandChildSchema)
class NestedSchema(Schema):
key = fields.String()
value = fields.Nested(SubSchema, only=('name', 'value.bar'))
values = fields.Nested(SubSchema, exclude=('value', ), many=True)
return NestedSchema()
开发者ID:lyft,项目名称:toasted-marshmallow,代码行数:16,
示例30: handle_length
点赞 4
# 需要导入模块: from marshmallow import fields [as 别名]
# 或者: from marshmallow.fields import Nested [as 别名]
def handle_length(schema, field, validator, parent_schema):
"""Adds validation logic for ``marshmallow.validate.Length``, setting the
values appropriately for ``fields.List``, ``fields.Nested``, and
``fields.String``.
Args:
schema (dict): The original JSON schema we generated. This is what we
want to post-process.
field (fields.Field): The field that generated the original schema and
who this post-processor belongs to.
validator (marshmallow.validate.Length): The validator attached to the
passed in field.
parent_schema (marshmallow.Schema): The Schema instance that the field
belongs to.
Returns:
dict: A, possibly, new JSON Schema that has been post processed and
altered.
Raises:
UnsupportedValueError: Raised if the `field` is something other than
`fields.List`, `fields.Nested`, or `fields.String`
"""
if isinstance(field, fields.String):
minKey = "minLength"
maxKey = "maxLength"
elif isinstance(field, (fields.List, fields.Nested)):
minKey = "minItems"
maxKey = "maxItems"
else:
raise UnsupportedValueError(
"In order to set the Length validator for JSON "
"schema, the field must be either a List, Nested or a String"
)
if validator.min:
schema[minKey] = validator.min
if validator.max:
schema[maxKey] = validator.max
if validator.equal:
schema[minKey] = validator.equal
schema[maxKey] = validator.equal
return schema
开发者ID:fuhrysteve,项目名称:marshmallow-jsonschema,代码行数:48,
注:本文中的marshmallow.fields.Nested方法示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。
python fields_Python fields.Nested方法代码示例相关推荐
- python descript_Python descriptor.FieldDescriptor方法代码示例
本文整理汇总了Python中google.protobuf.descriptor.FieldDescriptor方法的典型用法代码示例.如果您正苦于以下问题:Python descriptor.Fie ...
- python alter_Python migrations.AlterField方法代码示例
本文整理汇总了Python中django.db.migrations.AlterField方法的典型用法代码示例.如果您正苦于以下问题:Python migrations.AlterField方法的具 ...
- python dateformatter_Python dates.DateFormatter方法代码示例
本文整理汇总了Python中matplotlib.dates.DateFormatter方法的典型用法代码示例.如果您正苦于以下问题:Python dates.DateFormatter方法的具体用法 ...
- python paperclip_Python pyplot.sca方法代码示例
本文整理汇总了Python中matplotlib.pyplot.sca方法的典型用法代码示例.如果您正苦于以下问题:Python pyplot.sca方法的具体用法?Python pyplot.sca ...
- python fonttool_Python wx.Font方法代码示例
本文整理汇总了Python中wx.Font方法的典型用法代码示例.如果您正苦于以下问题:Python wx.Font方法的具体用法?Python wx.Font怎么用?Python wx.Font使用 ...
- python res_Python models.resnet152方法代码示例
本文整理汇总了Python中torchvision.models.resnet152方法的典型用法代码示例.如果您正苦于以下问题:Python models.resnet152方法的具体用法?Pyth ...
- python dropout_Python slim.dropout方法代码示例
本文整理汇总了Python中tensorflow.contrib.slim.dropout方法的典型用法代码示例.如果您正苦于以下问题:Python slim.dropout方法的具体用法?Pytho ...
- python batch_size_Python config.batch_size方法代码示例
本文整理汇总了Python中config.batch_size方法的典型用法代码示例.如果您正苦于以下问题:Python config.batch_size方法的具体用法?Python config. ...
- python pool_Python pool.Pool方法代码示例
本文整理汇总了Python中multiprocessing.pool.Pool方法的典型用法代码示例.如果您正苦于以下问题:Python pool.Pool方法的具体用法?Python pool.Po ...
- python nextpow2_Python signal.hann方法代码示例
本文整理汇总了Python中scipy.signal.hann方法的典型用法代码示例.如果您正苦于以下问题:Python signal.hann方法的具体用法?Python signal.hann怎么 ...
最新文章
- Linux下数值计算
- 113. 路径总和 (剑指 Offer 34. 二叉树中和为某一值的路径)(回溯算法)
- c语言 交互式电子白板案例,交互式电子白板教学案例
- hadoop2.4.2集群搭建及hive与mysql集成文档记录
- STM32F103:一.(1)MDK的配置
- java interface 传值_前后端分离传值方案-RestfulAPI
- 单片机仿真软件Proteus8.0的安装及使用
- [Threejs]环境光与HDR贴图
- 电力电子转战数字IC20220610day21——杂七杂八
- java 进销存源码_JAVA 进销存管理系统的源码 - 下载 - 搜珍网
- 通过计算机控制手机,用电脑控制手机的方法
- java中strlen,浅析C++中strlen函数的使用与模拟实现strlen的方法
- Excel中经纬度格式化处理
- [C++]牛客 WY11 星际穿越
- 51单片机温度传感器DS18B20
- 微信域名检测接口文档
- 新机安装指南(软件推荐)
- c语言间接级别不同_一个超复杂的间接递归——C语言初学者代码中的常见错误与瑕疵(6)...
- Mysql语句计算文本字数_使用SQL确定文本字段的字数统计
- java excel 插入新行_excel:插入行更新公式