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
__delattr__(name, /)Implement delattr(self, name).
__dir__()Default dir() implementation.
__eq__(other)Return self==value.
__format__(format_spec, /)Default object formatter.
__ge__(value, /)Return self>=value.
__getattribute__(name, /)Return getattr(self, name).
__gt__(value, /)Return self>value.
__hash__()Return hash(self).
__init__([name, alternate_names, code, ...])__init_subclass__This method is called when a class is subclassed.
__le__(value, /)Return self<=value.
__lt__(value, /)Return self<value.
__ne__(value, /)Return self!=value.
__new__(**kwargs)__reduce__()Helper for pickle.
__reduce_ex__(protocol, /)Helper for pickle.
__repr__()Return repr(self).
__setattr__(name, value, /)Implement setattr(self, name, value).
__sizeof__()Size of object in memory, in bytes.
__str__()Return str(self).
__subclasshook__Abstract classes can override this to customize issubclass().
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
__annotations____dataclass_fields____dataclass_params____dict____doc____module____weakref__list of weak references to the object (if defined)
The name of the local authority it is in
The ID of the local authority it is in
Official ID code of the ward
Name of the ward
The name of the region it is in
The ID of the region it is in
Any alternative names of the ward
Any alternative ID codes of the ward
- __eq__(other)
Return self==value.
- __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
- __repr__()
Return repr(self).
- alternate_codes: List[str]
Any alternative ID codes of the ward
- alternate_names: List[str]
Any alternative names of the ward
- authority: str = ''
The name of the local authority it is in
- authority_code: str = ''
The ID of the local authority it is in
- code: str = ''
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: str = ''
Name of the ward
- region: str = ''
The name of the region it is in
- region_code: str = ''
The ID of the region it is in