fiftyone.operators.store.models¶
Execution store models.
Classes:
|
Model representing a key in the store. |
|
Model representing a Store. |
-
class
fiftyone.operators.store.models.
KeyDocument
(store_name: str, key: str, value: Any, _id: Optional[Any] = None, dataset_id: Optional[bson.objectid.ObjectId] = None, created_at: datetime.datetime = <factory>, updated_at: Optional[datetime.datetime] = None, expires_at: Optional[datetime.datetime] = None)¶ Bases:
object
Model representing a key in the store.
Attributes:
Methods:
get_expiration
(ttl)Gets the expiration date for a key with the given TTL.
to_mongo_dict
([exclude_id])Serializes the document to a MongoDB dictionary.
-
store_name
: str¶
-
key
: str¶
-
value
: Any¶
-
dataset_id
: Optional[bson.objectid.ObjectId] = None¶
-
created_at
: datetime.datetime¶
-
updated_at
: Optional[datetime.datetime] = None¶
-
expires_at
: Optional[datetime.datetime] = None¶
-
static
get_expiration
(ttl: Optional[int]) → Optional[datetime.datetime]¶ Gets the expiration date for a key with the given TTL.
-
to_mongo_dict
(exclude_id: bool = True) → dict¶ Serializes the document to a MongoDB dictionary.
-
-
class
fiftyone.operators.store.models.
StoreDocument
(store_name: str, key: str = '__store__', value: Optional[dict] = None, _id: Optional[Any] = None, dataset_id: Optional[bson.objectid.ObjectId] = None, created_at: datetime.datetime = <factory>, updated_at: Optional[datetime.datetime] = None, expires_at: Optional[datetime.datetime] = None)¶ Bases:
fiftyone.operators.store.models.KeyDocument
Model representing a Store.
Attributes:
The metadata associated with the store.
Methods:
get_expiration
(ttl)Gets the expiration date for a key with the given TTL.
to_mongo_dict
([exclude_id])Serializes the document to a MongoDB dictionary.
-
key
: str = '__store__'¶
-
value
: Optional[dict] = None¶
-
property
metadata
¶ The metadata associated with the store.
-
dataset_id
: Optional[bson.objectid.ObjectId] = None¶
-
expires_at
: Optional[datetime.datetime] = None¶
-
static
get_expiration
(ttl: Optional[int]) → Optional[datetime.datetime]¶ Gets the expiration date for a key with the given TTL.
-
to_mongo_dict
(exclude_id: bool = True) → dict¶ Serializes the document to a MongoDB dictionary.
-
updated_at
: Optional[datetime.datetime] = None¶
-
store_name
: str¶
-
created_at
: datetime.datetime¶
-