state¶
- fakernaija.commands.state(*args: t.Any, **kwargs: t.Any) t.Any¶
Return random state objects.
- Parameters:
repeat (int) – The number of random state objects to return. Must be a positive integer. Defaults to 1.
region (str) – The region to filter state objects by.
output (str) – The format of the output file if provided.
Note
Region options: NW, NE, NC, SE, SW, SS
Output options: csv, json, text
Examples
To return a single random state object:
$ naija state {'code': 'BY', 'name': 'Bayelsa', 'capital': 'Yenagoa', 'slogan': 'Glory of All Lands', 'region': 'South South', 'postal_code': '561001', 'lgas': ['Brass', 'Ekeremor', 'Kolokuma Opokuma', 'Nembe', 'Ogbia', 'Sagbama', 'Southern-Ijaw', 'Yenagoa']}
To return 3 random state objects:
$ naija state --repeat 3 {'code': 'EB', 'name': 'Ebonyi', 'capital': 'Abakaliki', 'slogan': 'Salt of the Nation', 'region': 'South East', 'postal_code': '840001', 'lgas': ['Abakaliki', 'Afikpo-North', 'Afikpo South (Edda)', 'Ebonyi', 'Ezza-North', 'Ezza-South', 'Ikwo', 'Ishielu', 'Ivo', 'Izzi', 'Ohaukwu', 'Onicha']} {'code': 'AD', 'name': 'Adamawa', 'capital': 'Yola', 'slogan': 'Land of Beauty', 'region': 'North East', 'postal_code': '640001', 'lgas': ['Demsa', 'Fufore', 'Ganye', 'Girei', 'Gombi', 'Guyuk', 'Hong', 'Jada', 'Lamurde', 'Madagali', 'Maiha', 'Mayo-Belwa', 'Michika', 'Mubi-North', 'Mubi-South', 'Numan', 'Shelleng', 'Song', 'Toungo', 'Yola North', 'Yola South']} {'code': 'KW', 'name': 'Kwara', 'capital': 'Ilorin', 'slogan': 'State of Harmony', 'region': 'North Central', 'postal_code': '240001', 'lgas': ['Asa', 'Baruten', 'Edu', 'Ekiti (Araromi/Opin)', 'Ilorin-East', 'Ilorin-South', 'Ilorin-West', 'Isin', 'Kaiama', 'Moro', 'Offa', 'Oke-Ero', 'Oyun', 'Pategi']}
To return a random state object filtered by region:
$ naija state --region NW {'code': 'ZA', 'name': 'Zamfara', 'capital': 'Gusau', 'slogan': 'Farming is Our Pride', 'region': 'North West', 'postal_code': '860001', 'lgas': ['Anka', 'Bakura', 'Birnin Magaji/Kiyaw', 'Bukkuyum', 'Bungudu', 'Gummi', 'Gusau', 'Isa', 'Kaura-Namoda', 'Kiyawa', 'Maradun', 'Maru', 'Shinkafi', 'Talata-Mafara', 'Tsafe', 'Zurmi'], 'region_abbr': 'NW'}
To return 30 random state objects and save them to a specified format:
$ naija state --repeat 30 --output csv Generated data saved to /path/to/directory/filename.ext
- fakernaija.commands.state_capital(*args: t.Any, **kwargs: t.Any) t.Any¶
Return random state capitals.
- Parameters:
repeat (int) – The number of random state capitals to return. Must be a positive integer. Defaults to 1.
region (str) – The region to filter state objects by.
output (str) – The format of the output file if provided.
Note
Region options: NW, NE, NC, SE, SW, SS
Output options: csv, json, text
Examples
To return a random state capital:
$ naija state_capital Port Harcourt
To return 3 random state capitals:
$ naija state_capital --repeat 3 Kano Gusau Ado-Ekiti
To return a random state capital from a specific region:
$ naija state_capital --region NC Makurdi
To return 30 random state capitals and save them to a specified format:
$ naija state_capital --repeat 30 --output json Generated data saved to /path/to/directory/filename.ext
- fakernaija.commands.state_lga(*args: t.Any, **kwargs: t.Any) t.Any¶
Return a random LGA or LGA in a specified state.
- Parameters:
repeat (int) – The number of random LGAs to return. Must be a positive integer. Defaults to 1.
state (str) – The state’s name to return a random LGA from.
output (str) – The format of the output file if provided.
Note
State options: 36 states in Nigeria + FCT
Output options: csv, json, text
Examples
To return a single random LGA:
$ naija state_lga Saki-West
To return 3 random LGAs:
$ naija state_lga --repeat 3 Riyom Argungu Jaba
To return a random LGA from a specific state:
$ naija state_lga --state "cross river" Obudu
To return 30 random LGAs and save them to a specified format:
$ naija state_lga --repeat 30 --output json Generated data saved to /path/to/directory/filename.ext
- fakernaija.commands.state_name(*args: t.Any, **kwargs: t.Any) t.Any¶
Return random state names.
- Parameters:
repeat (int) – The number of random state names to return. Must be a positive integer. Defaults to 1.
region (str) – The region to filter state objects by.
output (str) – The format of the output file if provided.
Note
Region options: NW, NE, NC, SE, SW, SS
Output options: csv, json, text
Examples
To return a single random state name:
$ naija state_name Lagos
To return 3 random state names:
$ naija state_name --repeat 3 Gombe Edo Anambra
To return a random state name by region:
$ naija state_name --region SE Imo
To return 30 random state names and save them to a specified format:
$ naija state_name --repeat 30 --output json Generated data saved to /path/to/directory/filename.ext
- fakernaija.commands.state_postal_code(*args: t.Any, **kwargs: t.Any) t.Any¶
Return random postal codes.
- Parameters:
repeat (int) – The number of random postal codes to return. Must be a positive integer. Defaults to 1.
state (str) – The state’s name to return its postal code.
output (str) – The format of the output file if provided.
Note
State options: 36 states in Nigeria + FCT
Output options: csv, json, text
Examples
To return a single random state postal code:
$ naija state_postal_code 700001
To return 3 random state postal codes:
$ naija state_postal_code --repeat 3 740001 720001 440001
To return the postal code of a specific state:
$ naija state_postal_code --state "akwa ibom" 520001
To return 30 random postal codes and save them to a specified format:
$ naija state_postal_code --repeat 30 --output text Generated data saved to /path/to/directory/filename.ext