Overview
- This tool outputs RANDOM People names, US state, counties and addresses, Countries and Company names.
- Useful for testing Name/Address fields with random data.
- No dependencies required. Just pure Python v3+
- Please add your ideas/suggestions or more test data here.
Download
- Simply download the release from Github to your project or
- Run the command:
git clone https://github.com/navchandar/Python-Random-Name-Generator.git
Installation
Using requirements.txt
Add one of the following lines to your requirements.txt file:
- Latest on main branch:
random-names @ git+https://github.com/navchandar/Python-Random-Name-Generator@main
- Specific tag (e.g., V4.0):
random-names @ git+https://github.com/navchandar/Python-Random-Name-Generator@V4.0
-
Then run:
pip install -r requirements.txt
Using Poetry (pyproject.toml)
Add one of the following entries under [tool.poetry.dependencies] section:
- Latest on main branch:
random-names = { git = "https://github.com/navchandar/Python-Random-Name-Generator.git", branch = "main" }
- Specific tag:
random-names = { git = "https://github.com/navchandar/Python-Random-Name-Generator.git", tag = "V4.0" }
-
Then run:
poetry install
Usage
# outputs random first and last name
import random_names
random_names.Full()
# outputs random first name
random_names.First()
# outputs random middle name
random_names.Middle()
# outputs random last name
random_names.Last()
# outputs random company name
random_names.Company()
# outputs random Address
random_names.Address()
# outputs random US State Code
random_names.StateCode()
# outputs random US State name
random_names.States()
# outputs random Country name
random_names.Country()
# outputs random Place name
random_names.Places()