diff options
author | cyfraeviolae <cyfraeviolae> | 2024-04-03 03:10:44 -0400 |
---|---|---|
committer | cyfraeviolae <cyfraeviolae> | 2024-04-03 03:10:44 -0400 |
commit | 6d7ba58f880be618ade07f8ea080fe8c4bf8a896 (patch) | |
tree | b1c931051ffcebd2bd9d61d98d6233ffa289bbce /venv/lib/python3.11/site-packages/faker/providers/address/no_NO | |
parent | 4f884c9abc32990b4061a1bb6997b4b37e58ea0b (diff) |
venv
Diffstat (limited to 'venv/lib/python3.11/site-packages/faker/providers/address/no_NO')
2 files changed, 114 insertions, 0 deletions
diff --git a/venv/lib/python3.11/site-packages/faker/providers/address/no_NO/__init__.py b/venv/lib/python3.11/site-packages/faker/providers/address/no_NO/__init__.py new file mode 100644 index 0000000..170cba5 --- /dev/null +++ b/venv/lib/python3.11/site-packages/faker/providers/address/no_NO/__init__.py @@ -0,0 +1,114 @@ +from collections import OrderedDict + +from .. import Provider as AddressProvider + + +class Provider(AddressProvider): + city_suffixes = [ + "berg", + "borg", + "by", + "bø", + "dal", + "eid", + "fjell", + "fjord", + "foss", + "grunn", + "hamn", + "havn", + "helle", + "mark", + "nes", + "odden", + "sand", + "sjøen", + "stad", + "strand", + "strøm", + "sund", + "vik", + "vær", + "våg", + "ø", + "øy", + "ås", + ] + street_suffixes = [ + "alléen", + "bakken", + "berget", + "bråten", + "eggen", + "engen", + "ekra", + "faret", + "flata", + "gata", + "gjerdet", + "grenda", + "gropa", + "hagen", + "haugen", + "havna", + "holtet", + "høgda", + "jordet", + "kollen", + "kroken", + "lia", + "lunden", + "lyngen", + "løkka", + "marka", + "moen", + "myra", + "plassen", + "ringen", + "roa", + "røa", + "skogen", + "skrenten", + "spranget", + "stien", + "stranda", + "stubben", + "stykket", + "svingen", + "tjernet", + "toppen", + "tunet", + "vollen", + "vika", + "åsen", + ] + city_formats = ["{{first_name}}{{city_suffix}}", "{{last_name}}"] + street_name_formats = [ + "{{last_name}}{{street_suffix}}", + ] + street_address_formats = ("{{street_name}} {{building_number}}",) + address_formats = ("{{street_address}}, {{postcode}} {{city}}",) + building_number_formats = ("%", "%", "%", "%?", "##", "##", "##?", "###") + building_number_suffixes = OrderedDict( + [ + ("A", 0.2), + ("B", 0.2), + ("C", 0.2), + ("D", 0.1), + ("E", 0.1), + ("F", 0.1), + ("G", 0.05), + ("H", 0.05), + ] + ) + postcode_formats = ("####",) + + def building_number(self) -> str: + suffix: str = self.random_element(self.building_number_suffixes) + return self.numerify(self.random_element(self.building_number_formats)).replace("?", suffix) + + def city_suffix(self) -> str: + return self.random_element(self.city_suffixes) + + def street_suffix(self) -> str: + return self.random_element(self.street_suffixes) diff --git a/venv/lib/python3.11/site-packages/faker/providers/address/no_NO/__pycache__/__init__.cpython-311.pyc b/venv/lib/python3.11/site-packages/faker/providers/address/no_NO/__pycache__/__init__.cpython-311.pyc Binary files differnew file mode 100644 index 0000000..a906ad8 --- /dev/null +++ b/venv/lib/python3.11/site-packages/faker/providers/address/no_NO/__pycache__/__init__.cpython-311.pyc |