nrel.hive.model.entity

Module Contents

Classes

EntityMixin

EntityABC

Interface for creating a generic entity

Entity

Interface for creating a generic entity

class nrel.hive.model.entity.EntityMixin[source]
id: str
position: nrel.hive.model.entity_position.EntityPosition
membership: nrel.hive.model.membership.Membership
class nrel.hive.model.entity.EntityABC[source]

Bases: abc.ABC

Interface for creating a generic entity

abstract property geoid: str

returns the geoid of the entity

Returns:

the geoid of the entity

abstract set_membership(member_ids: Tuple[str, Ellipsis]) EntityABC[source]

sets the membership(s) of the entity

Parameters:

member_ids – a Tuple containing updated membership(s) of the entity

Returns:

the updated entity

abstract add_membership(membership_id: nrel.hive.util.typealiases.MembershipId) EntityABC[source]

adds a membership to the entity

Parameters:

membership_id – a membership id for the entity

Returns:

the updated entity

class nrel.hive.model.entity.Entity[source]

Bases: EntityMixin, EntityABC

Interface for creating a generic entity