dp3.common.entityspec ¶
ImmortalLifetime ¶
Bases: SpecModel
Immortal lifetime specification.
The entity is never deleted.
TimeToLiveLifetime ¶
Bases: SpecModel
TTL lifetime specification.
The entity is deleted after all of its TTL tokens expire.
TTL tokens can be attached to new data datapoints on per-attribute basis
(see AttrSpecGeneric
),
set to mirror the lifetime of the data (mirror_data
),
or sent explicitly using the API (see /entity/{etype}/{eid}/ttl
).
Attributes:
Name | Type | Description |
---|---|---|
on_create |
ParsedTimedelta
|
The base lifetime of an entity. |
mirror_data |
bool
|
If |
WeakLifetime ¶
Bases: SpecModel
Weak entity lifetime specification
EntitySpec ¶
Bases: SpecModel
Entity specification
This class represents specification of an entity type (e.g. ip, asn, ...)
Attributes:
Name | Type | Description |
---|---|---|
id |
str
|
Entity type identifier |
id_data_type |
EidDataType
|
Entity type identifier data type |
name |
str
|
User-friendly entity type name for display |
snapshot |
bool
|
If |
lifetime |
Union[ImmortalLifetime, TimeToLiveLifetime, WeakLifetime]
|
Entity lifetime specification |
description |
str
|
Entity type description |