Skip to main content

faker-rs

CI PyPI version Python versions License

A high-performance, drop-in replacement for Python's Faker library, backed by Rust and PyO3.

Why faker-rs?

  • 12x–1,000x faster than Python Faker for test fixtures, synthetic datasets, and database seeding.
  • Zero-loop batch APIs (names(n), emails(n), companies(n), etc.) generate an entire Python list in a single Rust loop.
  • Drop-in compatible: Faker(), Faker.seed(n), fake.unique.*, UniquenessException, and PEP 561 type stubs (py.typed).
  • Pre-built abi3 wheels for Linux (manylinux), macOS, and Windows (Python 3.9+) — no Rust compiler needed to pip install.

10-Second Quickstart

pip install faker-rs
from faker_rs import Faker

fake = Faker()
print(fake.name())          # "Emily Johnson"
print(fake.email())         # "david.smith412@example.com"
print(fake.address())       # "4821 Oak Ave\nSpringfield, IL 62704"
print(fake.phone_number())  # "(415) 832-0914"
print(fake.company())       # "Apex Horizon Technologies"
print(fake.ipv4())          # "192.168.42.17"
print(fake.date())          # "2014-07-19"
print(fake.uuid4())         # "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"

Drop-In Migration

Replace your import and keep your existing code:

# Before
# from faker import Faker
# from faker.exceptions import UniquenessException

# After
from faker_rs import Faker
from faker_rs.exceptions import UniquenessException

Faker.seed(42)
fake = Faker("en_US")
users = [
    {
        "name": fake.name(),
        "email": fake.unique.email(),
        "company": fake.company(),
        "ip": fake.ipv4(),
    }
    for _ in range(1000)
]

Batch Mode (Zero-Loop FFI)

For bulk generation, use the batch methods to generate an entire Python list in a single Rust loop:

fake = Faker(seed=42)
names = fake.names(100_000)
emails = fake.emails(100_000)

Provider Compatibility

Category Single Methods Batch Methods fake.unique
Person name(), first_name(), last_name(), user_name() names(n), first_names(n), last_names(n), user_names(n) Yes
Address address(), city(), state(), postcode(), country() addresses(n), cities(n), states(n), postcodes(n), countries(n) Yes
Company & Contact company(), job(), phone_number() companies(n), jobs(n), phone_numbers(n) Yes
Internet email(), url(), ipv4() emails(n), urls(n), ipv4s(n) Yes
Date & Time date(), iso8601() dates(n), iso8601s(n) Yes
Identifiers uuid4() uuid4s(n) Yes
Text & Primitives sentence(), text(max_nb_chars=200), boolean(chance_of_getting_true=50), random_int(min=0, max=9999) sentences(n), texts(n, ...), booleans(n, ...), random_ints(n, ...) random_int()

Benchmarks (100,000 Records)

Measured on Windows (CPython 3.12.11, faker==40.63.0, faker-rs==0.2.0 built with maturin develop --release) via python benchmarks/bench.py:

Provider Python Faker faker-rs (single loop) Single Speedup faker-rs (batch) Batch Speedup
name 8.3670 s 0.0153 s 546.4x 0.0084 s 1,000.6x
company 11.6019 s 0.0199 s 583.6x 0.0130 s 893.7x
email 8.8890 s 0.0198 s 449.0x 0.0132 s 674.4x
address 12.1838 s 0.0340 s 358.7x 0.0237 s 514.3x
ipv4 3.1658 s 0.0289 s 109.6x 0.0194 s 163.3x
phone_number 1.0797 s 0.0205 s 52.7x 0.0135 s 80.0x
text 4.7088 s 0.0773 s 60.9x 0.0671 s 70.2x
date 0.6662 s 0.0207 s 32.2x 0.0148 s 45.1x
uuid4 0.2524 s 0.0199 s 12.7x 0.0116 s 21.7x

Contributing

Contributions are welcome! See CONTRIBUTING.md for local maturin develop setup instructions and PR guidelines.

License

Dual-licensed under either of:

at your option.

Metadata

Release files for faker-rs 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for faker-rs 0.2.1
File Size Uploaded Provenance Actions
faker_rs-0.2.1.tar.gz 28.4 kB With provenance Details for faker_rs-0.2.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for faker-rs 0.2.1
File Actions
faker_rs-0.2.1-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for faker_rs-0.2.1-cp39-abi3-win_amd64.whl
faker_rs-0.2.1-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details for faker_rs-0.2.1-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
faker_rs-0.2.1-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details for faker_rs-0.2.1-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
faker_rs-0.2.1-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for faker_rs-0.2.1-cp39-abi3-macosx_11_0_arm64.whl
faker_rs-0.2.1-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details for faker_rs-0.2.1-cp39-abi3-macosx_10_12_x86_64.whl

Total release size: 1.4 MB

Release files / faker_rs-0.2.1.tar.gz

Download URL faker_rs-0.2.1.tar.gz
Size 28.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8fc20031f24891a6315780882e1d9e9cbc18a16d4d0c0631365f88371fd58444
BLAKE2b-256 checksum
How to use checksums
b7036aa8f485523043ee43c85c833710bb3ef28eb4808cce2116af616560501a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Release files / faker_rs-0.2.1-cp39-abi3-win_amd64.whl

Download URL faker_rs-0.2.1-cp39-abi3-win_amd64.whl
Size 197.1 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
3c546613d58831665bac3462830967382c89085e0cfd05ba4ba5fc45794aca7a
BLAKE2b-256 checksum
How to use checksums
68a1e15ed0c311cc95574e03cac6d51cd1433985ee09a8c5cd9ae008e8256224
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Release files / faker_rs-0.2.1-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL faker_rs-0.2.1-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 307.7 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
d55880c56bf296b57666e33c05bf303a03ecf4d6acd1fd2499e9a5673aee6b60
BLAKE2b-256 checksum
How to use checksums
9a207613c2cc87387dc7c7ba0f8d0990fa8d2fdd0a558e7ac1fbfe843ab03b5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Release files / faker_rs-0.2.1-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL faker_rs-0.2.1-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 313.3 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
b53c182739fe2611d45985aadc10af4dc13bf6cd07b95b83ba9ef924c5cec47e
BLAKE2b-256 checksum
How to use checksums
0c50a8492e3c2203a85528a0412c461d019f864c1cc5c2485ca83293bae15d90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Release files / faker_rs-0.2.1-cp39-abi3-macosx_11_0_arm64.whl

Download URL faker_rs-0.2.1-cp39-abi3-macosx_11_0_arm64.whl
Size 281.5 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
dfd73a5bc9f092a03722c066619eb24935018029c4d704e12d3a5c7f0dc07ea3
BLAKE2b-256 checksum
How to use checksums
9d65acdd7947c6a2a94843646c7525595054bab337f399de198b9072fb24f20c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Release files / faker_rs-0.2.1-cp39-abi3-macosx_10_12_x86_64.whl

Download URL faker_rs-0.2.1-cp39-abi3-macosx_10_12_x86_64.whl
Size 283.4 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
d5ace205e6689eb39ec919463ee549f6ec5727f844ea4cf74b8ab4233444d35c
BLAKE2b-256 checksum
How to use checksums
4823072eb4f5c5df7e3be5c09eb9bfa0b632f14518e3e9a48051f14c425086ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Security for faker-rs 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for faker_rs-0.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page