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.5.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.5.0
File Size Uploaded Provenance Actions
faker_rs-0.5.0.tar.gz 38.9 kB With provenance Details for faker_rs-0.5.0.tar.gz

Built distributions (wheels)

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

Total release size: 1.9 MB

Release files / faker_rs-0.5.0.tar.gz

Download URL faker_rs-0.5.0.tar.gz
Size 38.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a31f5b3cadbe63f5f6e4ffe834805b239ac8bb7d40d17e5bd638c1e6ec84fa1d
BLAKE2b-256 checksum
How to use checksums
7abce896adcc1c52d26e7978e86403f06a1f0ef4e77cafe24c179a7338da1160
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.5.0-cp39-abi3-win_amd64.whl

Download URL faker_rs-0.5.0-cp39-abi3-win_amd64.whl
Size 297.2 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
77ec9735766d7977d477c5b2340e55cec8e9c543212ae47b193b202672d4c221
BLAKE2b-256 checksum
How to use checksums
1d8da51abfb03da26b83565f136252b4ad6a11e8e948a9765510250cf55cc426
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.5.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL faker_rs-0.5.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 394.0 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
e9797ea12b7c88001014a8d67ef339ec136ad91a9b7ef758e39032905c4db111
BLAKE2b-256 checksum
How to use checksums
62bd166d32cdc24de2b3e40a8e0bd5060da4d1731217653363ceacc8e361a5fe
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.5.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL faker_rs-0.5.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 399.2 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
394288de2f82c6cc57efb83ef5da245c3d2db74fc09c9164420be5e52dacb49a
BLAKE2b-256 checksum
How to use checksums
7a387431756400284a4575c6ca46f568f71a8c25349cd0b185d247d15544ad4e
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.5.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL faker_rs-0.5.0-cp39-abi3-macosx_11_0_arm64.whl
Size 359.6 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
284bf8c8ffa5a94f3d51757f9f9838b58f706909726dfa0476b522b51b3c5b70
BLAKE2b-256 checksum
How to use checksums
05014360fe7a3ca12a6facd0cdb0e7b5648d33dffbd67a19cd0cbce03b8e04d7
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.5.0-cp39-abi3-macosx_10_12_x86_64.whl

Download URL faker_rs-0.5.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 365.7 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
027f5b4610c8c1bdecfb2fb033d9ba0bd5df51e810e1562ee32a152e67c12bd7
BLAKE2b-256 checksum
How to use checksums
3a17f490df3d3d792d4c06fbda674932c88d6d1d76a930a4b857e1843d07db17
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.5.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.5.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