class documentation
class EmbeddedDocumentField(mongoengine.fields.EmbeddedDocumentField, Field): (source)
Constructor: EmbeddedDocumentField(document_type, description, info, read_only, ...)
A field that stores instances of a given type of
fiftyone.core.odm.BaseEmbeddedDocument
object.
Parameters | |
document | the fiftyone.core.odm.BaseEmbeddedDocument type
stored in this field |
description | an optional description |
info | an optional info dict |
read | whether the field is read-only |
created | the datetime the field was created |
Method | __init__ |
Undocumented |
Method | __str__ |
Undocumented |
Method | get |
Returns the field for the provided path, or None. |
Method | get |
Returns a schema dictionary describing the fields of the embedded document field. |
Method | has |
Determines whether this field has the given embedded field. |
Method | validate |
Undocumented |
Instance Variable | fields |
Undocumented |
Method | _declare |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _merge |
Undocumented |
Method | _set |
Undocumented |
Method | _set |
Undocumented |
Method | _to |
Undocumented |
Method | _undeclare |
Undocumented |
Method | _update |
Undocumented |
Method | _use |
Undocumented |
Instance Variable | __fields |
Undocumented |
Instance Variable | _created |
Undocumented |
Instance Variable | _description |
Undocumented |
Instance Variable | _excluded |
Undocumented |
Instance Variable | _info |
Undocumented |
Instance Variable | _read |
Undocumented |
Instance Variable | _selected |
Undocumented |
Property | _fields |
Undocumented |
Inherited from Field
:
Method | copy |
Returns a copy of the field. |
Method | description |
Undocumented |
Method | info |
Undocumented |
Method | read |
Undocumented |
Method | save |
Saves any edits to this field's description and info attributes. |
Property | path |
The fully-qualified path of this field in the dataset's schema, or None if the field is not associated with a dataset. |
Instance Variable | __dataset |
Undocumented |
Instance Variable | __path |
Undocumented |
Property | _dataset |
The fiftyone.core.dataset.Dataset that this field belongs to, or None if the field is not associated with a dataset. |
def __init__(self, document_type, description=None, info=None, read_only=False, created_at=None, **kwargs):
(source)
¶
overrides
fiftyone.core.fields.Field.__init__
Undocumented
Returns the field for the provided path, or None.
Parameters | |
path | a field name or embedded.field.name |
Returns | |
a Field instance or None |
def get_field_schema(self, ftype=None, embedded_doc_type=None, read_only=None, include_private=False, flat=False, mode=None):
(source)
¶
Returns a schema dictionary describing the fields of the embedded document field.
Parameters | |
ftype:None | an optional field type or iterable of types to which
to restrict the returned schema. Must be subclass(es) of
Field |
embeddedNone | an optional embedded document type or
iterable of types to which to restrict the returned schema.
Must be subclass(es) of
fiftyone.core.odm.BaseEmbeddedDocument |
readNone | whether to restrict to (True) or exclude (False) read-only fields. By default, all fields are included |
includeFalse | whether to include fields that start with _ in the returned schema |
flat:False | whether to return a flattened schema where all embedded document fields are included as top-level keys |
mode:None | whether to apply the above constraints before and/or after flattening the schema. Only applicable when flat is True. Supported values are ("before", "after", "both"). The default is "after" |
Returns | |
a dict mapping field names to Field instances |
Determines whether this field has the given embedded field.
Parameters | |
path | the field name or embedded.field.name |
Returns | |
True/False |