Generate Fake Names in Python

Fake is a handy Python package that generates fake names, addresses, and text.

Github – Faker

Install Faker

The simplest way to install Faker is by using pip

pip install Faker 


Here’s a few examples to get you started. The project’s github page has lots of more advanced code snippets if you decide

Print 10 names to the console

import faker
from faker import Faker
fake = Faker()
    for i in range(10):

# Console Output
> 'Rodney Johnston'
> 'Ryan Watson'
> 'Daniel Doyle'
> 'Kevin Hancock'
> 'Amber Arnold'
> 'Sherri Brooks'
> 'Lori Maldonado'
> 'Stacy Callahan'
> 'Valerie Klein'
> 'Kristen Wallace'

Save 10 names to a list

import faker
from faker import Faker

fake_names = [ for i in range(10)]


#Console Output 
> 'Craig Taylor'

Print a fake address to the console


# Console Output 
> 469 William Vista
> East Edward, AR 70966