phenome_core.core.database.model.object module

class Object(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base

add_relation(relation, relation_type_id, relation_details)

Add a relation FROM this object TO another object

admin_disabled
enable_typechecks = False
extend_existing = True

Returns all related OBJECTs of a specific model classtype from this OBJECT

get_relations_by_classtype(model_classtype)

Returns all RELATIONS of a specific model classtype from this OBJECT to other OBJECTS

get_relations_by_ids(ids)

Returns all RELATIONS from this OBJECT to OBJECTs with specific IDs

get_relations_with_type(relation_type_id)
get_relations_with_type_in_set(relation_type_set)
has_relation(relation)
has_relation_with_type(relation, relation_type_id)
id
ip
mac
model
model_id
properties
relations_from
relations_to
remove_relation(relation, relation_type_id)

Removes a particular relation FROM this object

remove_relations()

Removes all relations from an object

property serialize

Return object property data in serializeable format

property serialize_brief

Return object property data in serializeable format (brief)

property serialize_details

Return object property data in serializeable format (detailed)

property serialize_properties

Return object’s properties in easily serializeable format.

property serialize_relations_from

Return relations FROM object TO other objects in easily serializeable format.

property serialize_relations_to

Return relations TO object FROM other objects in easily serializeable format.

setattr_raw(name, value)
unique_id
dump_datetime(value)

Deserialize datetime object into string form for JSON processing.