coalition.stakeholders.constants

Classes

DistrictType

Enumeration of district types for stakeholder assignment and spatial queries

Module Contents

class coalition.stakeholders.constants.DistrictType[source]

Bases: enum.StrEnum

Enumeration of district types for stakeholder assignment and spatial queries

Initialize self. See help(type(self)) for accurate signature.

CONGRESSIONAL = 'congressional_district'[source]
STATE_SENATE = 'state_senate_district'[source]
STATE_HOUSE = 'state_house_district'[source]
classmethod get_field_name(district_type: str) str[source]

Get the corresponding field name for a district type. Since field names match district type values, this is a simple validation.

Parameters:

district_type – The district type string

Returns:

The field name for the district type

Raises:

ValueError – If district_type is not a valid DistrictType

classmethod get_display_name(district_type: str) str[source]

Get a human-readable display name for a district type.

Parameters:

district_type – The district type string

Returns:

Human-readable display name