Skip to content

ayoub-abdessadak/world-names

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Random name generator. Random email generator. Random age generator.

Doel van het programma

Als developer wil je soms je database populeren met gebruikers om testen uit te voeren of een MVP te demonstreren of je hebt simpelweg gewoon een random voornaam, achternaam, gender, email of leeftijd nodig. Met dit programma kan je MySQL of SQLite database populeren met gebruikers of de module gebruiken om een eigen populatie programma te maken.

PyPi package: https://pypi.org/project/worldnames/

Installation manual for the Populating program

  1. Clone the repository (required)
git clone https://github.com/ayoub-abdessadak/world-names.git
  1. Create a python virtual environment (optional)
python -m venv venvworldnames
  1. Activate the python virtual environment (optional)
source venvworldnames/bin/activate

3.1 If you're on windows you can activate the virtual environment as is (optional)

.\venvworldnames\Scripts\activate
  1. Navigate to the repository (world-names) and install the required packages (required)
pip install -r requirments.txt
  1. Run the population simulator
python -m worldnames.populate

Or use the worldnames module to populate you're database:

  1. Install the worldnames module (required)
pip install worldnames
  1. Use the worldnames module in you're python program
import worldnames

worldnames.full_name() # returns 'Ashanti Qjtkbyh' for example. Type is a string.

worldnames.first_name() # returns 'Teodor' for example. Type is a string.

worldnames.last_name() # returns 'Pmgnwzqls' for example. Type is a string.

worldnames.age() # returns 50 for example. Type is an int.

worldnames.gender() # returns male for example. Type is a string.

worldnames.email() # returns '[email protected]' for example. Type is a string.

worldnames.email('Ashanti', 'Qjtkby') # It is possible to pass a first_name and last_name to the email method.

worldnames.user() # Returns all the attributes above in a tuple, for example: ('Cuauhtémoc', 'Sfzn', 'Woman', 88, 'Cuauhté[email protected]'). Type is an tuple.

worldnames.phone_number() # Returns a random phone number 

About

A populater for names

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages