diff options
Diffstat (limited to 'venv/lib/python3.11/site-packages/faker/providers/address/en_IE')
2 files changed, 61 insertions, 0 deletions
diff --git a/venv/lib/python3.11/site-packages/faker/providers/address/en_IE/__init__.py b/venv/lib/python3.11/site-packages/faker/providers/address/en_IE/__init__.py new file mode 100644 index 0000000..cc2f68b --- /dev/null +++ b/venv/lib/python3.11/site-packages/faker/providers/address/en_IE/__init__.py @@ -0,0 +1,61 @@ +from collections import OrderedDict + +from ..en import Provider as AddressProvider + + +class Provider(AddressProvider): + counties = ( + "Cork", + "Galway", + "Mayo", + "Donegal", + "Kerry", + "Tipperary", + "Clare", + "Tyrone", + "Antrim", + "Limerick", + "Roscommon", + "Down", + "Meath", + "Londonderry", + "Wexford", + "Kilkenny", + "Offaly", + "Cavan", + "Wicklow", + "Waterford", + "Sligo", + "Laois", + "Westmeath", + "Kildare", + "Leitrim", + "Armagh", + "Fermanagh", + "Monaghan", + "Dublin", + "Louth", + "Longford", + "Carlow", + ) + + _postcode_sets = OrderedDict( + ( + (" ", [" ", ""]), + ("N", [str(i) for i in range(0, 10)]), + ("L", "ACDEFHKNPRTVWXY"), + ("A", "ACDEFHKNPRTVWXY0123456789"), + ) + ) + postcode_pattern: str = "LNN AAAA" + + def postcode(self) -> str: + postcode = "" + for placeholder in self.postcode_pattern: + postcode += self.random_element(self._postcode_sets[placeholder]) + return postcode + + def administrative_unit(self) -> str: + return self.random_element(self.counties) + + county = administrative_unit diff --git a/venv/lib/python3.11/site-packages/faker/providers/address/en_IE/__pycache__/__init__.cpython-311.pyc b/venv/lib/python3.11/site-packages/faker/providers/address/en_IE/__pycache__/__init__.cpython-311.pyc Binary files differnew file mode 100644 index 0000000..3067267 --- /dev/null +++ b/venv/lib/python3.11/site-packages/faker/providers/address/en_IE/__pycache__/__init__.cpython-311.pyc |