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.3.0

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.3.0
File Size Uploaded Provenance Actions
faker_rs-0.3.0.tar.gz 32.1 kB With provenance Details for faker_rs-0.3.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for faker-rs 0.3.0
File Actions
faker_rs-0.3.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for faker_rs-0.3.0-cp39-abi3-win_amd64.whl
faker_rs-0.3.0-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.3.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
faker_rs-0.3.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details for faker_rs-0.3.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
faker_rs-0.3.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for faker_rs-0.3.0-cp39-abi3-macosx_11_0_arm64.whl
faker_rs-0.3.0-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details for faker_rs-0.3.0-cp39-abi3-macosx_10_12_x86_64.whl

Total release size: 1.6 MB

Release files / faker_rs-0.3.0.tar.gz

Download URL faker_rs-0.3.0.tar.gz
Size 32.1 kB
Tags Source
SHA-256 checksum
How to use checksums
730123a38960ae8ec5bf25cafa57f039cf3f6af7e9c66304b501f53889325295
BLAKE2b-256 checksum
How to use checksums
55dba2a6086b4202155a4041286a51de053932c075f479a6518fd3315cfd3331
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.3.0-cp39-abi3-win_amd64.whl

Download URL faker_rs-0.3.0-cp39-abi3-win_amd64.whl
Size 238.1 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
e0eb7d815116c888677c9f9b69c28de20eeb5904c118ba2e03155f1e6aa5e3e3
BLAKE2b-256 checksum
How to use checksums
3e3d198713887e1aff2eb4bd4d50cf1dee0776c8edbc056a09e0beba3ce820c5
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.3.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL faker_rs-0.3.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 345.0 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
b75a9d0e04e9d783dfe8d7e0f30b5252ef1ecf2d6d1875302fc2111c2c685efc
BLAKE2b-256 checksum
How to use checksums
cd32d834a1c79f97b35bd105be5c27ddcb406653cf77350092410414ea9172ea
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.3.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL faker_rs-0.3.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 349.3 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
0a0174c22a1225c8ae4d21fadd242f1b0baa863f3450d526c05582505e833b66
BLAKE2b-256 checksum
How to use checksums
8536c779422333a64954220cebb79a1d16c6648d66f23fe1418a8a6742a3fbfd
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.3.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL faker_rs-0.3.0-cp39-abi3-macosx_11_0_arm64.whl
Size 315.1 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d8171bae217f5ef3600cf95dd9324cdee525477479e732575a2c5bcf5d0771e2
BLAKE2b-256 checksum
How to use checksums
b004215f6e6c5615eddc97c44ab758a5ce967a95c0eb8ad0c814cb7e978db3e5
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.3.0-cp39-abi3-macosx_10_12_x86_64.whl

Download URL faker_rs-0.3.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 318.2 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
7b23d861c906c726fa539f1073087a88f75c8a50565b49c820a35fb7194d0f43
BLAKE2b-256 checksum
How to use checksums
e20a88c62d848cbcc78ef1924152326c7635cc3b6d363669313f1b554db20a46
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.3.0

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.3.0.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