clinicaio.entities.Entities

clinicaio.entities.Entities#

class clinicaio.entities.Entities(entities: dict[EntityKey, EntityValue])#
Parameters:

entities (dict[EntityKey, EntityValue])

Methods#

from_dict(→ Entities)

Creates entities from its dict form.

from_str_list(→ Entities)

Creates entities from its list form.

from_str(→ Entities)

Creates entities from its string form.

from_any(→ Entities)

Convenience constructor.

__str__(→ str)

Returns the string form of the entity, i.e. "<key1>-<value1>_..._<keyN>-<valueN>"

contains_entity(→ bool)

Returns whether the entities contain the given entity given by key/value pair

contains_all(→ bool)

Returns whether the queried entities are all contained in the entities.

get_value(→ Optional[EntityValue])

Retrieves the value corresponding to the given key for the given entities, if present.

__iter__(→ collections.abc.Iterator[tuple[EntityKey, ...)

Retrieves all the entities as key/value pairs.

__len__(→ int)

Retrieves the number of key/value entity pairs.

__repr__(→ str)