If you're looking to get the same result the way to do it is to seed the instance instead of modifying the global seed. Ie

In [2]: fake1 = faker.Faker()

In [3]: fake1.seed_instance(0)

In [4]: fake2 = faker.Faker()

In [5]: fake2.seed_instance(0)

In [6]: fake1.name()
Out[6]: u'Norma Fisher'

In [7]: fake2.name()
Out[7]: u'Norma Fisher'
Answer from Jonathan on Stack Overflow
🌐
Faker
faker.readthedocs.io › en › master › providers › faker.providers.python.html
faker.providers.python — Faker 40.13.0 documentation
>>> Faker.seed(0) >>> for _ in range(5): ... fake.pyfloat() ... -6.36438676418356 -424604.985946604 -61.8878635605209 -829528891695.97 -69804.3874773259 · pyint(min_value: int = 0, max_value: int = 9999, step: int = 1) → int¶ · Examples: >>> Faker.seed(0) >>> for _ in range(5): ...
🌐
Faker
faker.readthedocs.io › en › master › providers › faker.providers.person.html
faker.providers.person — Faker 40.13.0 documentation
>>> Faker.seed(0) >>> for _ in range(5): ... fake.first_name_male() ... 'Ryan' 'Peter' 'Jason' 'David' 'Jorge' first_name_nonbinary() → str¶ · Examples: >>> Faker.seed(0) >>> for _ in range(5): ... fake.first_name_nonbinary() ... 'Megan' 'Katherine' 'Robert' 'Jonathan' 'William' language_name() → str¶ ·
🌐
PyPI
pypi.org › project › Faker
Faker · PyPI
If you are using pytest, you can seed the faker fixture by defining a faker_seed fixture. Please check out the pytest fixture docs to learn more. Run tests: $ tox · Write documentation for the providers of the default locale: $ python -m faker ...
      » pip install Faker
    
Published   Apr 06, 2026
Version   40.13.0
🌐
Medium
medium.com › @sams-scripts › faker-frenzy-how-to-generate-diverse-seed-data-with-pythons-faker-library-72e6230627a7
Faker Frenzy: How to Generate Diverse Seed Data with Python’s Faker Library | by Sam Chappel | Medium
March 23, 2023 - Faker Frenzy: How to Generate Diverse Seed Data with Python’s Faker Library Faker is a Python library that generates realistic and random seed data, such as names, addresses, phone numbers, and …
🌐
Faker
faker.readthedocs.io › en › master › providers › faker.providers.misc.html
faker.providers.misc — Faker 40.11.1 documentation
>>> Faker.seed(0) >>> for _ in range(5): ... fake.json(data_columns={'Spec':'@1.0.1', 'ID':'pyint', 'Details':{'Name':'name', 'Address':'address'}}, num_rows=2) ... '[{"Spec": "1.0.1", "ID": 6311, "Details": {"Name": "Jennifer Green", "Address": "7593 Juan Throughway Apt.
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-faker-library
Python Faker Library - GeeksforGeeks
January 9, 2026 - Seeding gives use the same fake data result that was generated at first instance at that seed number. Python · from faker import Faker Faker.seed(1) fake = Faker() print(fake.name()) print(fake.address()) print(fake.email()) Output · Ryan ...
Find elsewhere
🌐
DataCamp
datacamp.com › tutorial › creating-synthetic-data-with-python-faker-tutorial
Creating Synthetic Data with Python Faker Tutorial | DataCamp
August 10, 2022 - # Using seed for reproducibility Faker.seed(5) secure_db = anonymous(Ecommerce) secure_db
🌐
Medium
medium.com › @mohamedmeqlad9 › faker-the-perfect-python-package-to-generate-fake-data-6f43fa168e86
Faker the perfect python package to generate fake data | by Mohamedmeqlad | Medium
November 11, 2023 - When using Faker for unit testing, you will often want to generate the same data set. For convenience, the generator also provide a seed() method, which seeds the shared random number generator.
🌐
Stringfest Analytics
stringfestanalytics.com › home › blog › python in excel: how to generate fake data with faker
Python in Excel: How to generate fake data with Faker - Stringfest Analytics
August 17, 2024 - In the example below, my 10 names will remain the same after setting the random seed, but the one generated before setting the seed will continue to change. I usually set my random seed to 1234, but you can choose any integer—just be consistent. Awesome work so far! Now, let’s get a bit more sophisticated. Faker can generate much more than just names.
🌐
GitHub
github.com › xfxf › faker-python
GitHub - xfxf/faker-python: Faker is a Python package that generates fake data for you. · GitHub
Calling the same script twice with the same seed produces the same results. from faker import Faker fake = Faker() fake.seed(4321) print fake.name() > Margaret Boehm
Author   xfxf
🌐
GitHub
github.com › firefoxxy8 › faker-1
GitHub - firefoxxy8/faker-1: Faker is a Python package that generates fake data for you.
Each generator can also be switched to its own instance of random.Random, separate to the shared one, by using the seed_instance() method, which acts the same way. For example: from faker import Faker fake = Faker() fake.seed_instance(4321) print(fake.name()) > Margaret Boehm
Author   firefoxxy8
🌐
Faker
faker.readthedocs.io › en › master › providers › baseprovider.html
faker.providers — Faker 40.13.0 documentation
>>> Faker.seed(0) >>> for _ in range(5): ... fake.random_number(digits=3) ... 864 394 776 911 430 · >>> Faker.seed(0) >>> for _ in range(5): ... fake.random_number(digits=3, fix_len=False) ...
🌐
Towards Data Science
towardsdatascience.com › home › latest › you don’t need sample data, you need python faker
You Don't Need Sample Data, You Need Python Faker | Towards Data Science
January 21, 2025 - Now, let’s instantiate a new faker object. We can specify its seed number after that as follows. The seed number can be whatever an integer.
🌐
GitHub
github.com › joke2k › faker › issues › 14
Enhance random generator repeatibility · Issue #14 · joke2k/faker
January 22, 2014 - import random from faker import Faker fake = Faker() # initial run fake.seed(1234) print fake.name() print fake.name() print fake.name() # repeated run with same data fake.seed(1234) print fake.name() print fake.name() print fake.name() # adding new fake calls prevent us from getting the same names we had originally fake.seed(1234) print fake.name(), fake.email() print fake.name(), fake.email() print fake.name(), fake.email() # One way is to implement a preserve/restore mechanism so that the user can get back to the previous trail of data fake.seed(1234) print fake.name() r = random.getstate()
Author   deinspanjer
🌐
Blue Book
lyz-code.github.io › blue-book › coding › python › faker
Faker - The Blue Book
from random import SystemRandom @pytest.fixture(scope="session", autouse=True) def faker_seed() -> int: """Create a random seed for the Faker library.""" return SystemRandom().randint(0, 999999)
🌐
GitHub
gist.github.com › f4ae3d8739b4b30c6d18164c4a70b7c2
An example how to use Faker python library to create fake data and inject them in a mysql database · GitHub
An example how to use Faker python library to create fake data and inject them in a mysql database - db_feeder_with_faker.py