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.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.2.0
File Size Uploaded Provenance Actions
faker_rs-0.2.0.tar.gz 28.7 kB With provenance Details for faker_rs-0.2.0.tar.gz

Built distributions (wheels)

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

Total release size: 1.4 MB

Release files / faker_rs-0.2.0.tar.gz

Download URL faker_rs-0.2.0.tar.gz
Size 28.7 kB
Tags Source
SHA-256 checksum
How to use checksums
afb793173934ca6f79c74dd9b07dc5e5cb0ca694963ab683c2cfda3db202cd1b
BLAKE2b-256 checksum
How to use checksums
2c54f3f9f5fec797a7b9ccf29b89cb3170dcdffd6f39f7033ff1bd69d48c11a3
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.0-cp39-abi3-win_amd64.whl

Download URL faker_rs-0.2.0-cp39-abi3-win_amd64.whl
Size 193.3 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
7c7d52837ca592de84bcd31ffc0d9c442d2ba28b4de4e552fdcde76d12b7f673
BLAKE2b-256 checksum
How to use checksums
cf1c4041544daa99081a7a60bbfb867d901ba28716f4b75116c706477d573f51
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.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL faker_rs-0.2.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 306.2 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
cc8f637d43b700a4d7cc2878a9ea1a4e06ac019a277c5c3e5e811b70c50a933d
BLAKE2b-256 checksum
How to use checksums
79b2b85e2a1a07685a597a67c2c6593f6d6870593fc6141de86a2584e27c49e7
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.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL faker_rs-0.2.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 311.6 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
065e3297012ff9291286963df467f1d5040b8d50c729ec2f9be4265187eb2365
BLAKE2b-256 checksum
How to use checksums
360d9ed4e7b8d408147917d54ebb0760046d5679fa06639f37dfadde0740d796
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.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL faker_rs-0.2.0-cp39-abi3-macosx_11_0_arm64.whl
Size 278.6 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
2d7d65916d0f9f9a0ac585133a412c632783ec6138bc521a6e3a54c38660a51f
BLAKE2b-256 checksum
How to use checksums
3be5e66086b9c58c03241e263cd39b5c733090ce65ec957d66a4bc9435c0fa24
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.0-cp39-abi3-macosx_10_12_x86_64.whl

Download URL faker_rs-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 286.1 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
7145e3b398bc6594742186d5a8697bde17c6c55001e1da416b490d720c87eb79
BLAKE2b-256 checksum
How to use checksums
c488762813724bea3beb197a2ac2ff1c3dd54d7af4e67bfdba38a2d9d95da8e9
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.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.2.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