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.4.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.4.0
File Size Uploaded Provenance Actions
faker_rs-0.4.0.tar.gz 36.2 kB With provenance Details for faker_rs-0.4.0.tar.gz

Built distributions (wheels)

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

Total release size: 1.8 MB

Release files / faker_rs-0.4.0.tar.gz

Download URL faker_rs-0.4.0.tar.gz
Size 36.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d3c7e02fc0c6bdccc2d914751c80722892f99f4803f19689abd6befdd193cefb
BLAKE2b-256 checksum
How to use checksums
5a43ed7473caebf84d71c314e86ba8e7e152d929d16fbb95ee6de6611125af56
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.4.0-cp39-abi3-win_amd64.whl

Download URL faker_rs-0.4.0-cp39-abi3-win_amd64.whl
Size 277.1 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
f47411f0e75536bbeca051ad7bd1d0555f1dcc34ecabf99debeab55b226e8d56
BLAKE2b-256 checksum
How to use checksums
256f13675c8d570f6e150ef2d7efe17d7371981bd39b307d85716d7003817452
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.4.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL faker_rs-0.4.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 375.1 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
82c05b3254e47f1efe949c7ad84dbe393c42e72634aed24b49c4fbd827b2c783
BLAKE2b-256 checksum
How to use checksums
07506ddcd811dbda58cd305000a478b918d03a6f505662e1b7ab8fa1a5718cf2
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.4.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL faker_rs-0.4.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 381.1 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
4560f49e60ea48e54c8e750bc7db01891a10fc43346f4216a0b231708bca4429
BLAKE2b-256 checksum
How to use checksums
00c592924021a4a863fab676211293b59520e3a659086cfa9594ad4d6d4650f8
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.4.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL faker_rs-0.4.0-cp39-abi3-macosx_11_0_arm64.whl
Size 342.8 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
427a52c17f30a112bac4718b4fdf2274b82c959710ef93909d129fd9591a087f
BLAKE2b-256 checksum
How to use checksums
bad0d80c07dc8226b94f2472b5f964bbfe0815b89eaca5e314ca927ea7ae9611
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.4.0-cp39-abi3-macosx_10_12_x86_64.whl

Download URL faker_rs-0.4.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 348.5 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
53f7f2d55acaab3ec33f7aec132a7abe13128c256ac852e1a8721aaf05186c6a
BLAKE2b-256 checksum
How to use checksums
46b12eeda29c6028e5bc0d7f13935a99003660ad605d5e8512f57fd2179d40da
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.4.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.4.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