class documentation

class EmbeddedDocumentField(mongoengine.fields.EmbeddedDocumentField, Field): (source)

Constructor: EmbeddedDocumentField(document_type, description, info, read_only, ...)

View In Hierarchy

A field that stores instances of a given type of fiftyone.core.odm.BaseEmbeddedDocument object.

Parameters
document_typethe fiftyone.core.odm.BaseEmbeddedDocument type stored in this field
descriptionan optional description
infoan optional info dict
read_onlywhether the field is read-only
created_atthe datetime the field was created
Method __init__ Undocumented
Method __str__ Undocumented
Method get_field Returns the field for the provided path, or None.
Method get_field_schema Returns a schema dictionary describing the fields of the embedded document field.
Method has_field Determines whether this field has the given embedded field.
Method validate Undocumented
Instance Variable fields Undocumented
Method _declare_field Undocumented
Method _get_default_fields Undocumented
Method _get_field_names Undocumented
Method _merge_fields Undocumented
Method _set_created_at Undocumented
Method _set_dataset Undocumented
Method _to_db_fields Undocumented
Method _undeclare_field Undocumented
Method _update_field Undocumented
Method _use_view Undocumented
Instance Variable __fields Undocumented
Instance Variable _created_at Undocumented
Instance Variable _description Undocumented
Instance Variable _excluded_fields Undocumented
Instance Variable _info Undocumented
Instance Variable _read_only Undocumented
Instance Variable _selected_fields Undocumented
Property _fields Undocumented

Inherited from Field:

Method copy Returns a copy of the field.
Method description.setter Undocumented
Method info.setter Undocumented
Method read_only.setter 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)

Undocumented

def __str__(self): (source)

Undocumented

def get_field(self, path): (source)

Returns the field for the provided path, or None.

Parameters
patha 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:Nonean optional field type or iterable of types to which to restrict the returned schema. Must be subclass(es) of Field
embedded_doc_type:Nonean optional embedded document type or iterable of types to which to restrict the returned schema. Must be subclass(es) of fiftyone.core.odm.BaseEmbeddedDocument
read_only:Nonewhether to restrict to (True) or exclude (False) read-only fields. By default, all fields are included
include_private:Falsewhether to include fields that start with _ in the returned schema
flat:Falsewhether to return a flattened schema where all embedded document fields are included as top-level keys
mode:Nonewhether 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
def has_field(self, path): (source)

Determines whether this field has the given embedded field.

Parameters
paththe field name or embedded.field.name
Returns
True/False
def validate(self, value, **kwargs): (source)

Undocumented

Undocumented

def _declare_field(self, dataset, path, field_or_doc): (source)

Undocumented

def _get_default_fields(self, include_private=False, use_db_fields=False): (source)

Undocumented

def _get_field_names(self, include_private=False, use_db_fields=False): (source)

Undocumented

def _merge_fields(self, path, field, validate=True, recursive=True, overwrite=False): (source)

Undocumented

def _set_created_at(self, created_at): (source)
def _set_dataset(self, dataset, path): (source)
def _to_db_fields(self, field_names): (source)

Undocumented

def _undeclare_field(self, field_name): (source)

Undocumented

def _update_field(self, dataset, field_name, new_path, field): (source)

Undocumented

def _use_view(self, selected_fields=None, excluded_fields=None): (source)

Undocumented

__fields = (source)

Undocumented

_excluded_fields = (source)

Undocumented

_selected_fields = (source)

Undocumented

Undocumented