metawards.WardInfo¶
-
class
metawards.WardInfo(name: str = '', alternate_names: List[str] = <factory>, code: str = '', alternate_codes: List[str] = <factory>, authority: str = '', authority_code: str = '', region: str = '', region_code: str = '')[source]¶ This class holds metadata about a ward, e.g. its name(s), any ID code(s), any information about the region or authority it is in etc.
-
__init__(name: str = '', alternate_names: List[str] = <factory>, code: str = '', alternate_codes: List[str] = <factory>, authority: str = '', authority_code: str = '', region: str = '', region_code: str = '') → None¶
Methods
__init__(name, alternate_names, code, …)from_data(data)Construct from the passed dictionary, which has, e.g. is_null()summary()Return a summary string that identifies this WardInfo to_data()Return a dictionary that contains all of this data, in a format that can be serialised to JSON Attributes
authorityThe name of the local authority it is in authority_codeThe ID of the local authority it is in codeOfficial ID code of the ward nameName of the ward regionThe name of the region it is in region_codeThe ID of the region it is in -
alternate_codes= None¶ Any alternative ID codes of the ward
-
alternate_names= None¶ Any alternative names of the ward
The name of the local authority it is in
The ID of the local authority it is in
-
code= ''¶ Official ID code of the ward
-
static
from_data(data)[source]¶ Construct from the passed dictionary, which has, e.g. been deserialised from JSON
-
name= ''¶ Name of the ward
-
region= ''¶ The name of the region it is in
-
region_code= ''¶ The ID of the region it is in
-