Repository: joke2k/faker
Pull request #1822 (2023-03-14 15:09:15)

Implement generate pyobject by type #1779
### What does this change

It solves issue #1779

Note: I had hard time dealing with `mypy` and `kwargs`


Patch:
diff --git a/.bumpversion.cfg b/.bumpversion.cfg
index e4965c6b..d01609c4 100644
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 17.6.0
+current_version = 18.1.0
 files = VERSION faker/__init__.py docs/conf.py
 commit = True
 tag = True
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b5919813..9a4abc1b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,15 @@
 ## Changelog
 
+### [v18.1.0 - 2023-03-20](https://github.com/joke2k/faker/compare/v18.0.0...v18.1.0)
+
+* Add lorem provider for `nl_BE`. Thanks @takis.
+* Add `nl_BE` automotive provider. Thanks @takis.
+* Add `nl_BE` company provider. Thanks @takis.
+
+### [v18.0.0 - 2023-03-20](https://github.com/joke2k/faker/compare/v17.6.0...v18.0.0)
+
+* Add territory zip codes for `en_US`. Thanks @johnekent.
+
 ### [v17.6.0 - 2023-03-03](https://github.com/joke2k/faker/compare/v17.5.0...v17.6.0)
 
 * Add `nl_BE` bank provider. Thanks @takis.
diff --git a/VERSION b/VERSION
index ea3bf215..d4df1049 100644
--- a/VERSION
+++ b/VERSION
@@ -1,1 +1,1 @@
-17.6.0
+18.1.0
diff --git a/docs/conf.py b/docs/conf.py
index 8500e9a0..2546e280 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -51,9 +51,9 @@ copyright = "2014, Daniele Faraglia"
 # built documents.
 #
 # The short X.Y version.
-version = "17.6.0"
+version = "18.1.0"
 # The full version, including alpha/beta/rc tags.
-release = "17.6.0"
+release = "18.1.0"
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
diff --git a/faker/__init__.py b/faker/__init__.py
index 0ac5d8bd..04775812 100644
--- a/faker/__init__.py
+++ b/faker/__init__.py
@@ -2,6 +2,6 @@ from faker.factory import Factory
 from faker.generator import Generator
 from faker.proxy import Faker
 
-VERSION = "17.6.0"
+VERSION = "18.1.0"
 
 __all__ = ("Factory", "Generator", "Faker")
diff --git a/faker/providers/address/en_US/__init__.py b/faker/providers/address/en_US/__init__.py
index 4242e781..4bf14695 100644
--- a/faker/providers/address/en_US/__init__.py
+++ b/faker/providers/address/en_US/__init__.py
@@ -419,6 +419,15 @@ class Provider(AddressProvider):
         "WV": (24701, 26886),
         "WI": (53001, 54990),
         "WY": (82001, 83128),
+        # Territories - incomplete ranges with accurate subsets - https://www.geonames.org/postalcode-search.html
+        "AS": (96799, 96799),
+        "FM": (96941, 96944),
+        "GU": (96910, 96932),
+        "MH": (96960, 96970),
+        "MP": (96950, 96952),
+        "PW": (96940, 96940),
+        "PR": (600, 799),
+        "VI": (801, 805),
     }
 
     territories_abbr = (
@@ -511,7 +520,7 @@ class Provider(AddressProvider):
         if state_abbr is None:
             state_abbr = self.random_element(self.states_abbr)
 
-        if state_abbr in self.states_abbr:
+        if state_abbr in self.states_and_territories_abbr:
             postcode = "%d" % (
                 self.generator.random.randint(
                     self.states_postcode[state_abbr][0],
@@ -519,8 +528,12 @@ class Provider(AddressProvider):
                 )
             )
 
-            if len(postcode) == 4:
-                postcode = "0%s" % postcode
+            # zero left pad up until desired length (some have length 3 or 4)
+            target_postcode_len = 5
+            current_postcode_len = len(postcode)
+            if current_postcode_len < target_postcode_len:
+                pad = target_postcode_len - current_postcode_len
+                postcode = f"{'0'*pad}{postcode}"
 
             return postcode
 
diff --git a/faker/providers/automotive/nl_BE/__init__.py b/faker/providers/automotive/nl_BE/__init__.py
new file mode 100644
index 00000000..19f24cac
--- /dev/null
+++ b/faker/providers/automotive/nl_BE/__init__.py
@@ -0,0 +1,16 @@
+from .. import Provider as AutomotiveProvider
+
+
+class Provider(AutomotiveProvider):
+    """Implement automotive provider for `nl_BE` locale.
+
+    https://nl.wikipedia.org/wiki/Belgisch_kenteken
+    """
+
+    license_formats = (
+        "???-###",  # 1973-2008
+        "###-???",  # 2008-2010
+        # New formats after 2010
+        "1-???-###",
+        "2-???-###",
+    )
diff --git a/faker/providers/company/nl_BE/__init__.py b/faker/providers/company/nl_BE/__init__.py
new file mode 100644
index 00000000..30ac7f52
--- /dev/null
+++ b/faker/providers/company/nl_BE/__init__.py
@@ -0,0 +1,10 @@
+from .. import Provider as CompanyProvider
+
+
+class Provider(CompanyProvider):
+    formats = (
+        "{{last_name}} {{company_suffix}}",
+        "{{last_name}}-{{last_name}} {{company_suffix}}",
+        "{{last_name}}, {{last_name}} en {{last_name}} {{company_suffix}}",
+    )
+    company_suffixes = ("NV", "BV", "CV", "VOF", "CommV")
diff --git a/faker/providers/lorem/nl_BE/__init__.py b/faker/providers/lorem/nl_BE/__init__.py
new file mode 100644
index 00000000..efc33ef9
--- /dev/null
+++ b/faker/providers/lorem/nl_BE/__init__.py
@@ -0,0 +1,1015 @@
+from typing import Dict
+
+from .. import Provider as LoremProvider
+
+
+class Provider(LoremProvider):
+    """Implement lorem provider for ``nl_BE`` locale.
+
+    Source: https://nl.wiktionary.org/wiki/WikiWoordenboek:Lijst_met_1000_basiswoorden
+    """
+
+    word_list = (
+        "aan",
+        "aanbod",
+        "aanraken",
+        "aanval",
+        "aap",
+        "aardappel",
+        "aarde",
+        "aardig",
+        "acht",
+        "achter",
+        "actief",
+        "activiteit",
+        "ademen",
+        "af",
+        "afgelopen",
+        "afhangen",
+        "afmaken",
+        "afname",
+        "afspraak",
+        "afval",
+        "al",
+        "algemeen",
+        "alleen",
+        "alles",
+        "als",
+        "alsjeblieft",
+        "altijd",
+        "ander",
+        "andere",
+        "anders",
+        "angst",
+        "antwoord",
+        "antwoorden",
+        "appel",
+        "arm",
+        "auto",
+        "avond",
+        "avondeten",
+        "baan",
+        "baby",
+        "bad",
+        "bal",
+        "bang",
+        "bank",
+        "basis",
+        "bed",
+        "bedekken",
+        "bedreiging",
+        "bedreven",
+        "been",
+        "beer",
+        "beest",
+        "beetje",
+        "begin",
+        "begrijpen",
+        "begrip",
+        "behalve",
+        "beide",
+        "beker",
+        "bel",
+        "belangrijk",
+        "bellen",
+        "belofte",
+        "beneden",
+        "benzine",
+        "berg",
+        "beroemd",
+        "beroep",
+        "bescherm",
+        "beslissen",
+        "best",
+        "betalen",
+        "beter",
+        "bevatten",
+        "bewegen",
+        "bewolkt",
+        "bezoek",
+        "bibliotheek",
+        "bieden",
+        "bij",
+        "bijna",
+        "bijten",
+        "bijvoorbeeld",
+        "bijzonder",
+        "binnen",
+        "binnenkort",
+        "blad",
+        "blauw",
+        "blazen",
+        "blij",
+        "blijven",
+        "bloed",
+        "bloem",
+        "bodem",
+        "boek",
+        "boerderij",
+        "boete",
+        "boom",
+        "boon",
+        "boord",
+        "boos",
+        "bord",
+        "borstelen",
+        "bos",
+        "bot",
+        "bouwen",
+        "boven",
+        "branden",
+        "brandstof",
+        "breed",
+        "breken",
+        "brengen",
+        "brief",
+        "broer",
+        "broek",
+        "brood",
+        "brug",
+        "bruikbaar",
+        "bruiloft",
+        "bruin",
+        "bui",
+        "buiten",
+        "bureau",
+        "buren",
+        "bus",
+        "buurman",
+        "buurvrouw",
+        "cadeau",
+        "chocolade",
+        "cirkel",
+        "comfortabel",
+        "compleet",
+        "computer",
+        "conditie",
+        "controle",
+        "cool",
+        "correct",
+        "daar",
+        "daarom",
+        "dag",
+        "dak",
+        "dan",
+        "dansen",
+        "dapper",
+        "dat",
+        "de",
+        "deel",
+        "deken",
+        "deksel",
+        "delen",
+        "derde",
+        "deze",
+        "dichtbij",
+        "dienen",
+        "diep",
+        "dier",
+        "dik",
+        "ding",
+        "dit",
+        "dochter",
+        "doen",
+        "dom",
+        "donker",
+        "dood",
+        "door",
+        "doorzichtig",
+        "doos",
+        "dorp",
+        "draad",
+        "draaien",
+        "dragen",
+        "drie",
+        "drijven",
+        "drinken",
+        "drogen",
+        "dromen",
+        "droog",
+        "druk",
+        "dubbel",
+        "dun",
+        "dus",
+        "duur",
+        "duwen",
+        "echt",
+        "een",
+        "één",
+        "eend",
+        "eenheid",
+        "eenzaam",
+        "eerste",
+        "eeuw",
+        "effect",
+        "ei",
+        "eigen",
+        "eiland",
+        "einde",
+        "eis",
+        "elektrisch",
+        "elk",
+        "en",
+        "enkele",
+        "enthousiast",
+        "erg",
+        "eten",
+        "even",
+        "examen",
+        "extreem",
+        "falen",
+        "familie",
+        "feest",
+        "feit",
+        "fel",
+        "fijn",
+        "film",
+        "fit",
+        "fles",
+        "foto",
+        "fout",
+        "fris",
+        "fruit",
+        "gaan",
+        "gat",
+        "gebeuren",
+        "gebeurtenis",
+        "gebied",
+        "geboorte",
+        "geboren",
+        "gebruik",
+        "gebruikelijk",
+        "gebruiken",
+        "gedrag",
+        "gedragen",
+        "geel",
+        "geen",
+        "gehoorzamen",
+        "geit",
+        "geld",
+        "geliefde",
+        "gelijk",
+        "geloof",
+        "geluid",
+        "geluk",
+        "gemak",
+        "gemakkelijk",
+        "gemeen",
+        "genieten",
+        "genoeg",
+        "genot",
+        "gerecht",
+        "gereedschap",
+        "geschikt",
+        "gespannen",
+        "geur",
+        "gevaar",
+        "gevaarlijk",
+        "gevangenis",
+        "geven",
+        "gevolg",
+        "gewicht",
+        "gewoon",
+        "gezicht",
+        "gezond",
+        "gif",
+        "gisteren",
+        "glad",
+        "glas",
+        "glimlach",
+        "god",
+        "goed",
+        "goedkoop",
+        "goud",
+        "graf",
+        "grap",
+        "grappig",
+        "gras",
+        "grens",
+        "grijs",
+        "groeien",
+        "groen",
+        "groente",
+        "groep",
+        "grof",
+        "grond",
+        "groot",
+        "grootmoeder",
+        "grootvader",
+        "haan",
+        "haar",
+        "haast",
+        "hal",
+        "halen",
+        "half",
+        "hallo",
+        "hamer",
+        "hand",
+        "hard",
+        "hart",
+        "haten",
+        "hebben",
+        "heel",
+        "heet",
+        "helder",
+        "helft",
+        "help",
+        "hem",
+        "hemel",
+        "hen",
+        "herfst",
+        "herinneren",
+        "hert",
+        "het",
+        "heuvel",
+        "hier",
+        "hij",
+        "hobby",
+        "hoe",
+        "hoed",
+        "hoek",
+        "hoeveel",
+        "hoeveelheid",
+        "hoewel",
+        "hond",
+        "honderd",
+        "honger",
+        "hoofd",
+        "hoog",
+        "hoogte",
+        "hoop",
+        "horen",
+        "hotel",
+        "houden",
+        "huilen",
+        "huis",
+        "hun",
+        "huren",
+        "hut",
+        "huur",
+        "idee",
+        "ieder",
+        "iedereen",
+        "iemand",
+        "iets",
+        "ijs",
+        "ijzer",
+        "ik",
+        "in",
+        "instrument",
+        "ja",
+        "jaar",
+        "jagen",
+        "jas",
+        "jij",
+        "jong",
+        "jongen",
+        "jouw",
+        "jullie",
+        "kaars",
+        "kaart",
+        "kaas",
+        "kamer",
+        "kans",
+        "kant",
+        "kantoor",
+        "kap",
+        "kast",
+        "kasteel",
+        "kat",
+        "kennen",
+        "kennis",
+        "keuken",
+        "keus",
+        "kiezen",
+        "kijken",
+        "kind",
+        "kip",
+        "kist",
+        "klaar",
+        "klas",
+        "klasse",
+        "kleden",
+        "klein",
+        "kleren",
+        "kleur",
+        "klimmen",
+        "klok",
+        "kloppen",
+        "klopt",
+        "knie",
+        "knippen",
+        "koers",
+        "koffer",
+        "koffie",
+        "kok",
+        "koken",
+        "kom",
+        "komen",
+        "koning",
+        "koningin",
+        "koorts",
+        "kop",
+        "kopen",
+        "kort",
+        "kost",
+        "kosten",
+        "koud",
+        "kraam",
+        "kracht",
+        "krant",
+        "krijgen",
+        "kruis",
+        "kuil",
+        "kunnen",
+        "kunst",
+        "laag",
+        "laat",
+        "laatst",
+        "lach",
+        "lachen",
+        "ladder",
+        "laken",
+        "lamp",
+        "land",
+        "lang",
+        "langs",
+        "langzaam",
+        "laten",
+        "leeftijd",
+        "leeg",
+        "leerling",
+        "leeuw",
+        "leger",
+        "leiden",
+        "lenen",
+        "lengte",
+        "lepel",
+        "leren",
+        "les",
+        "leuk",
+        "leven",
+        "lezen",
+        "lichaam",
+        "licht",
+        "liefde",
+        "liegen",
+        "liggen",
+        "lijk",
+        "lijken",
+        "liniaal",
+        "links",
+        "lip",
+        "list",
+        "lomp",
+        "lood",
+        "lopen",
+        "los",
+        "lot",
+        "lucht",
+        "lui",
+        "luisteren",
+        "lunch",
+        "maag",
+        "maal",
+        "maaltijd",
+        "maan",
+        "maand",
+        "maar",
+        "maat",
+        "machine",
+        "maken",
+        "makkelijk",
+        "mama",
+        "man",
+        "mand",
+        "manier",
+        "map",
+        "markeren",
+        "markt",
+        "me",
+        "medicijn",
+        "meel",
+        "meer",
+        "meerdere",
+        "meest",
+        "meisje",
+        "melk",
+        "meneer",
+        "mengsel",
+        "mensen",
+        "mes",
+        "met",
+        "meubel",
+        "mevrouw",
+        "middel",
+        "midden",
+        "mij",
+        "mijn",
+        "miljoen",
+        "min",
+        "minder",
+        "minuut",
+        "mis",
+        "missen",
+        "mits",
+        "model",
+        "modern",
+        "moeder",
+        "moeilijk",
+        "moeten",
+        "mogelijk",
+        "mogen",
+        "moment",
+        "mond",
+        "mooi",
+        "moord",
+        "moorden",
+        "morgen",
+        "munt",
+        "muziek",
+        "na",
+        "naald",
+        "naam",
+        "naar",
+        "naast",
+        "nacht",
+        "nat",
+        "natuur",
+        "natuurlijk",
+        "nee",
+        "neer",
+        "negen",
+        "nek",
+        "nemen",
+        "net",
+        "netjes",
+        "neus",
+        "niet",
+        "niets",
+        "nieuw",
+        "nieuws",
+        "nobel",
+        "noch",
+        "nodig",
+        "noemen",
+        "nog",
+        "nood",
+        "nooit",
+        "noord",
+        "noot",
+        "normaal",
+        "nu",
+        "nul",
+        "nummer",
+        "object",
+        "oceaan",
+        "ochtend",
+        "oefening",
+        "of",
+        "offer",
+        "olie",
+        "olifant",
+        "om",
+        "oma",
+        "onder",
+        "onderwerp",
+        "onderzoek",
+        "oneven",
+        "ongeluk",
+        "ons",
+        "ontsnappen",
+        "ontbijt",
+        "ontdekken",
+        "ontmoeten",
+        "ontvangen",
+        "ontwikkelen",
+        "onze",
+        "oog",
+        "ooit",
+        "ook",
+        "oom",
+        "oor",
+        "oorlog",
+        "oorzaak",
+        "oost",
+        "op",
+        "opa",
+        "opeens",
+        "open",
+        "openlijk",
+        "opleiding",
+        "opnemen",
+        "oranje",
+        "orde",
+        "oud",
+        "ouder",
+        "over",
+        "overal",
+        "overeenkomen",
+        "overleden",
+        "overvallen",
+        "paar",
+        "paard",
+        "pad",
+        "pagina",
+        "pan",
+        "papa",
+        "papier",
+        "park",
+        "partner",
+        "pas",
+        "passeren",
+        "pen",
+        "peper",
+        "per",
+        "perfect",
+        "periode",
+        "persoon",
+        "piano",
+        "pijn",
+        "pistool",
+        "plaat",
+        "plaatje",
+        "plaats",
+        "plafond",
+        "plank",
+        "plant",
+        "plastic",
+        "plat",
+        "plattegrond",
+        "plein",
+        "plus",
+        "poes",
+        "politie",
+        "poort",
+        "populair",
+        "positie",
+        "postzegel",
+        "potlood",
+        "praten",
+        "presenteren",
+        "prijs",
+        "prins",
+        "prinses",
+        "privé",
+        "proberen",
+        "probleem",
+        "product",
+        "provincie",
+        "publiek",
+        "punt",
+        "raak",
+        "raam",
+        "radio",
+        "raken",
+        "rapport",
+        "recht",
+        "rechtdoor",
+        "rechts",
+        "rechtvaardig",
+        "redden",
+        "reeds",
+        "regen",
+        "reiken",
+        "reizen",
+        "rekenmachine",
+        "rennen",
+        "repareren",
+        "rest",
+        "restaurant",
+        "resultaat",
+        "richting",
+        "rijk",
+        "rijst",
+        "rijzen",
+        "ring",
+        "rok",
+        "rond",
+        "rood",
+        "rook",
+        "rots",
+        "roze",
+        "rubber",
+        "ruiken",
+        "ruimte",
+        "samen",
+        "sap",
+        "schaap",
+        "schaar",
+        "schaduw",
+        "scheiden",
+        "scherp",
+        "schetsen",
+        "schieten",
+        "schijnen",
+        "schip",
+        "school",
+        "schoon",
+        "schouder",
+        "schreeuw",
+        "schreeuwen",
+        "schrijven",
+        "schudden",
+        "seconde",
+        "sex",
+        "signaal",
+        "simpel",
+        "sinds",
+        "slaapkamer",
+        "slapen",
+        "slecht",
+        "sleutel",
+        "slim",
+        "slot",
+        "sluiten",
+        "smaak",
+        "smal",
+        "sneeuw",
+        "snel",
+        "snelheid",
+        "snijden",
+        "soep",
+        "sok",
+        "soms",
+        "soort",
+        "sorry",
+        "speciaal",
+        "spel",
+        "spelen",
+        "sport",
+        "spreken",
+        "springen",
+        "staal",
+        "stad",
+        "stap",
+        "start",
+        "station",
+        "steen",
+        "stelen",
+        "stem",
+        "stempel",
+        "ster",
+        "sterk",
+        "steun",
+        "stil",
+        "stilte",
+        "stoel",
+        "stof",
+        "stoffig",
+        "stom",
+        "stop",
+        "storm",
+        "straat",
+        "straffen",
+        "structuur",
+        "student",
+        "studie",
+        "stuk",
+        "succes",
+        "suiker",
+        "taal",
+        "taart",
+        "tafel",
+        "tak",
+        "tamelijk",
+        "tand",
+        "tante",
+        "tas",
+        "taxi",
+        "te",
+        "team",
+        "teen",
+        "tegen",
+        "teken",
+        "tekenen",
+        "telefoon",
+        "televisie",
+        "tellen",
+        "tennis",
+        "terug",
+        "terugkomst",
+        "terwijl",
+        "test",
+        "tevreden",
+        "thee",
+        "thuis",
+        "tien",
+        "tijd",
+        "titel",
+        "toekomst",
+        "toen",
+        "toename",
+        "totaal",
+        "traan",
+        "tram",
+        "trein",
+        "trekken",
+        "trouwen",
+        "trui",
+        "tuin",
+        "tussen",
+        "tweede",
+        "u",
+        "uit",
+        "uitleggen",
+        "uitnodigen",
+        "uitvinden",
+        "uitzoeken",
+        "uur",
+        "vaak",
+        "vaarwel",
+        "vader",
+        "vak",
+        "vakantie",
+        "vallen",
+        "vals",
+        "van",
+        "vandaag",
+        "vangen",
+        "vanmorgen",
+        "vannacht",
+        "varken",
+        "vast",
+        "vechten",
+        "veel",
+        "veer",
+        "veilig",
+        "ver",
+        "veranderen",
+        "verandering",
+        "verder",
+        "verdienen",
+        "verdrietig",
+        "verenigen",
+        "verf",
+        "vergelijkbaar",
+        "vergelijken",
+        "vergelijking",
+        "vergeten",
+        "vergeven",
+        "vergissen",
+        "verhaal",
+        "verhoging",
+        "verjaardag",
+        "verkeerd",
+        "verkopen",
+        "verlaten",
+        "verleden",
+        "verliezen",
+        "vernietigen",
+        "veroveren",
+        "verrassen",
+        "vers",
+        "verschil",
+        "verschrikkelijk",
+        "verspreiden",
+        "verstand",
+        "verstoppen",
+        "versturen",
+        "vertellen",
+        "vertrekken",
+        "vertrouwen",
+        "verwachten",
+        "verwijderen",
+        "verzamelen",
+        "verzameling",
+        "vet",
+        "vier",
+        "vierkant",
+        "vies",
+        "vijand",
+        "vijf",
+        "vijver",
+        "vinden",
+        "vinger",
+        "vis",
+        "vlag",
+        "vlees",
+        "vlieg",
+        "vliegtuig",
+        "vloer",
+        "voeden",
+        "voedsel",
+        "voelen",
+        "voet",
+        "voetbal",
+        "vogel",
+        "vol",
+        "volgende",
+        "volgorde",
+        "voor",
+        "voorbeeld",
+        "voorkomen",
+        "voorzichtig",
+        "voorzien",
+        "vork",
+        "vorm",
+        "vos",
+        "vouwen",
+        "vraag",
+        "vragen",
+        "vrede",
+        "vreemd",
+        "vreemde",
+        "vriend",
+        "vriendelijk",
+        "vriezen",
+        "vrij",
+        "vrijheid",
+        "vroeg",
+        "vroeger",
+        "vrouw",
+        "vullen",
+        "vuur",
+        "waar",
+        "waarom",
+        "waarschijnlijk",
+        "wachten",
+        "wakker",
+        "wanneer",
+        "want",
+        "wapen",
+        "warm",
+        "wassen",
+        "wat",
+        "water",
+        "we",
+        "week",
+        "weer",
+        "weg",
+        "welke",
+        "welkom",
+        "wens",
+        "wereld",
+        "werelddeel",
+        "werk",
+        "west",
+        "wetenschap",
+        "wie",
+        "wiel",
+        "wij",
+        "wijn",
+        "wijs",
+        "wild",
+        "willen",
+        "wind",
+        "winkel",
+        "winnen",
+        "winter",
+        "wissen",
+        "wit",
+        "wolf",
+        "wolk",
+        "wonder",
+        "woord",
+        "woud",
+        "wreed",
+        "zaak",
+        "zacht",
+        "zak",
+        "zand",
+        "zee",
+        "zeep",
+        "zeer",
+        "zeggen",
+        "zeil",
+        "zeker",
+        "zelfde",
+        "zes",
+        "zetten",
+        "zeven",
+        "ziek",
+        "ziekenhuis",
+        "ziel",
+        "zien",
+        "zij",
+        "zijn",
+        "zilver",
+        "zingen",
+        "zinken",
+        "zitten",
+        "zo",
+        "zoals",
+        "zoeken",
+        "zoet",
+        "zomer",
+        "zon",
+        "zonder",
+        "zonnig",
+        "zoon",
+        "zorg",
+        "zorgen",
+        "zou",
+        "zout",
+        "zuid",
+        "zulke",
+        "zullen",
+        "zus",
+        "zwaar",
+        "zwak",
+        "zwembad",
+        "zwemmen",
+    )
+
+    parts_of_speech: Dict[str, tuple] = {}
diff --git a/faker/providers/lorem/nl_NL/__init__.py b/faker/providers/lorem/nl_NL/__init__.py
new file mode 100644
index 00000000..0c8e88e9
--- /dev/null
+++ b/faker/providers/lorem/nl_NL/__init__.py
@@ -0,0 +1,14 @@
+from typing import Dict
+
+from .. import Provider as LoremProvider
+from ..nl_BE import Provider as LoremProviderNL_BE
+
+
+class Provider(LoremProvider):
+    """Implement lorem provider for ``nl_NL`` locale.
+
+    Source: https://nl.wiktionary.org/wiki/WikiWoordenboek:Lijst_met_1000_basiswoorden
+    """
+
+    word_list = LoremProviderNL_BE.word_list
+    parts_of_speech: Dict[str, tuple] = {}
diff --git a/faker/providers/python/__init__.py b/faker/providers/python/__init__.py
index 8391c604..0d7070d0 100644
--- a/faker/providers/python/__init__.py
+++ b/faker/providers/python/__init__.py
@@ -55,6 +55,40 @@ class Provider(BaseProvider):
             allowed_types = ()
         return tuple(value_types) + tuple(allowed_types)
 
+    def pyobject(
+        self,
+        object_type: Optional[Type[Union[bool, str, float, int, tuple, set, list, Iterable, dict]]] = None,
+    ) -> Optional[Union[bool, str, float, int, tuple, set, list, Iterable, dict]]:
+        """
+        Generates a random object passing the type desired.
+
+        :object_type: the type of the object to generate.
+        :return: the random object generated.
+        :raises ValueError: if the object type passed is not supported
+        """
+        if object_type is None:
+            return None
+        elif object_type == bool:
+            return self.pybool()
+        elif object_type == str:
+            return self.pystr()
+        elif object_type == float:
+            return self.pyfloat()
+        elif object_type == int:
+            return self.pyint()
+        elif object_type == tuple:
+            return self.pytuple()
+        elif object_type == set:
+            return self.pyset()
+        elif object_type == list:
+            return self.pylist()
+        elif object_type == Iterable:
+            return self.pyiterable()
+        elif object_type == dict:
+            return self.pydict()
+        else:
+            raise ValueError("Object type `{object_type}` is not supported by `pyobject` function")
+
     def pybool(self, truth_probability: int = 50) -> bool:
         """
         Generates a random boolean, optionally biased towards `True` or `False`.


Test patch:
diff --git a/tests/providers/test_address.py b/tests/providers/test_address.py
index d9cf2e8b..0576484e 100644
--- a/tests/providers/test_address.py
+++ b/tests/providers/test_address.py
@@ -536,7 +536,7 @@ class TestEnUS:
 
     def test_postcode_in_state(self, faker, num_samples):
         for _ in range(num_samples):
-            for state_abbr in EnUsAddressProvider.states_abbr:
+            for state_abbr in EnUsAddressProvider.states_and_territories_abbr:
                 code = faker.postcode_in_state(state_abbr)
                 assert re.fullmatch(r"\d{5}", code)
                 assert int(code) >= EnUsAddressProvider.states_postcode[state_abbr][0]
@@ -553,7 +553,7 @@ class TestEnUS:
 
     def test_zipcode_in_state(self, faker, num_samples):
         for _ in range(num_samples):
-            for state_abbr in EnUsAddressProvider.states_abbr:
+            for state_abbr in EnUsAddressProvider.states_and_territories_abbr:
                 code = faker.zipcode_in_state(state_abbr)
                 assert re.fullmatch(r"\d{5}", code)
                 assert int(code) >= EnUsAddressProvider.states_postcode[state_abbr][0]
diff --git a/tests/providers/test_automotive.py b/tests/providers/test_automotive.py
index 6d3f27af..7768b531 100644
--- a/tests/providers/test_automotive.py
+++ b/tests/providers/test_automotive.py
@@ -310,3 +310,9 @@ class TestDeCh(_SimpleAutomotiveTestMixin):
     """Test de_CH automotive provider methods"""
 
     license_plate_pattern: Pattern = re.compile(r"[A-Z]{2}-\d{1,3}\s?\d{0,3}")
+
+
+class TestNlBe(_SimpleAutomotiveTestMixin):
+    """Test nl_BE automotive provider methods"""
+
+    license_plate_pattern: Pattern = re.compile(r"(\d{3}-[A-Z]{3})|" r"([A-Z]{3}-\d{3})|" r"([1-2]-[A-Z]{3}-\d{3})")
diff --git a/tests/providers/test_company.py b/tests/providers/test_company.py
index 85dd1ec3..13be6705 100644
--- a/tests/providers/test_company.py
+++ b/tests/providers/test_company.py
@@ -14,6 +14,7 @@ from faker.providers.company.hu_HU import Provider as HuHuCompanyProvider
 from faker.providers.company.hy_AM import Provider as HyAmCompanyProvider
 from faker.providers.company.it_IT import Provider as ItItCompanyProvider
 from faker.providers.company.ja_JP import Provider as JaJpCompanyProvider
+from faker.providers.company.nl_BE import Provider as NlBeCompanyProvider
 from faker.providers.company.nl_NL import Provider as NlNlCompanyProvider
 from faker.providers.company.pl_PL import Provider as PlPlCompanyProvider
 from faker.providers.company.pl_PL import company_vat_checksum, local_regon_checksum, regon_checksum
@@ -465,3 +466,13 @@ class TestElGr:
             suffix = faker.company_suffix()
             assert isinstance(suffix, str)
             assert suffix in ElGrCompanyProvider.company_suffixes
+
+
+class TestNlBe:
+    """Test nl_BE company provider methods"""
+
+    def test_company_suffix(self, faker, num_samples):
+        for _ in range(num_samples):
+            suffix = faker.company_suffix()
+            assert isinstance(suffix, str)
+            assert suffix in NlBeCompanyProvider.company_suffixes
diff --git a/tests/providers/test_lorem.py b/tests/providers/test_lorem.py
index 0ea37933..40761a27 100644
--- a/tests/providers/test_lorem.py
+++ b/tests/providers/test_lorem.py
@@ -9,6 +9,7 @@ from faker.providers.lorem.de_AT import Provider as DeAtLoremProvider
 from faker.providers.lorem.de_DE import Provider as DeDeLoremProvider
 from faker.providers.lorem.en_US import Provider as EnUsLoremProvider
 from faker.providers.lorem.fa_IR import Provider as FaIrLoremProvider
+from faker.providers.lorem.nl_BE import Provider as NlBeLoremProvider
 
 
 class TestLoremProvider:
@@ -572,3 +573,75 @@ class TestDeAt:
         for _ in range(num_samples):
             words = faker.words(num_words)
             assert all(isinstance(word, str) and word in DeAtLoremProvider.word_list for word in words)
+
+
+class TestNlBe:
+    """Test ```nl_BE``` lorem provider
+
+    Copied from the TestDeDe class, but with the word_list from the NlBeLoremProvider.
+    """
+
+    word_list = [word.lower() for word in NlBeLoremProvider.word_list]
+
+    def test_paragraph(self, faker, num_samples):
+        num_sentences = 10
+        for _ in range(num_samples):
+            paragraph = faker.paragraph(nb_sentences=num_sentences)
+            assert isinstance(paragraph, str)
+            words = paragraph.replace(".", "").split()
+            assert all(word.lower() in self.word_list for word in words)
+
+    def test_paragraphs(self, faker, num_samples):
+        num_paragraphs = 5
+        for _ in range(num_samples):
+            paragraphs = faker.paragraphs(nb=num_paragraphs)
+            for paragraph in paragraphs:
+                assert isinstance(paragraph, str)
+                words = paragraph.replace(".", "").split()
+                assert all(word.lower() in self.word_list for word in words)
+
+    def test_sentence(self, faker, num_samples):
+        num_words = 10
+        for _ in range(num_samples):
+            sentence = faker.sentence(nb_words=num_words)
+            assert isinstance(sentence, str)
+            words = sentence.replace(".", "").split()
+            assert all(word.lower() in self.word_list for word in words)
+
+    def test_sentences(self, faker, num_samples):
+        num_sentences = 5
+        for _ in range(num_samples):
+            sentences = faker.sentences(nb=num_sentences)
+            for sentence in sentences:
+                assert isinstance(sentence, str)
+                words = sentence.replace(".", "").split()
+                assert all(word.lower() in self.word_list for word in words)
+
+    def test_text(self, faker, num_samples):
+        num_chars = 25
+        for _ in range(num_samples):
+            text = faker.text(max_nb_chars=num_chars)
+            assert isinstance(text, str)
+            words = re.sub(r"[.\n]+", " ", text).split()
+            assert all(word.lower() in self.word_list for word in words)
+
+    def test_texts(self, faker, num_samples):
+        num_texts = 5
+        num_chars = 25
+        for _ in range(num_samples):
+            texts = faker.texts(max_nb_chars=num_chars, nb_texts=num_texts)
+            for text in texts:
+                assert isinstance(text, str)
+                words = re.sub(r"[.\n]+", " ", text).split()
+                assert all(word.lower() in self.word_list for word in words)
+
+    def test_word(self, faker, num_samples):
+        for _ in range(num_samples):
+            word = faker.word()
+            assert isinstance(word, str) and word in NlBeLoremProvider.word_list
+
+    def test_words(self, faker, num_samples):
+        num_words = 5
+        for _ in range(num_samples):
+            words = faker.words(num_words)
+            assert all(isinstance(word, str) and word in NlBeLoremProvider.word_list for word in words)
diff --git a/tests/providers/test_python.py b/tests/providers/test_python.py
index 99f4866d..6b79715c 100644
--- a/tests/providers/test_python.py
+++ b/tests/providers/test_python.py
@@ -3,6 +3,7 @@ import sys
 import unittest
 import warnings
 
+from typing import Iterable, Optional, Union
 from unittest.mock import patch
 
 import pytest
@@ -10,6 +11,23 @@ import pytest
 from faker import Faker
 
 
+@pytest.mark.parametrize("object_type", (None, bool, str, float, int, tuple, set, list, Iterable, dict))
+def test_pyobject(
+    object_type: Optional[Union[bool, str, float, int, tuple, set, list, Iterable, dict]],
+):
+    random_object = Faker().pyobject(object_type=object_type)
+    if object_type is None:
+        assert random_object is None
+    else:
+        assert isinstance(random_object, object_type)
+
+
+@pytest.mark.parametrize("object_type", (object, type, callable))
+def test_pyobject_with_unknown_object_type(object_type):
+    with pytest.raises(ValueError):
+        assert Faker().pyobject(object_type=object_type)
+
+
 @pytest.mark.parametrize(
     "mock_random_number_source, right_digits, expected_decimal_part",
     (