#random #fake-data #data

mockd

Fake data generator library with 130+ functions

43 releases

new 0.4.42 Mar 7, 2025
0.4.37 Jan 31, 2025
0.4.33 Dec 27, 2024
0.4.29 Nov 22, 2024
0.2.0 Mar 6, 2022

#170 in Algorithms

Download history 679/week @ 2024-11-13 970/week @ 2024-11-20 85/week @ 2024-11-27 546/week @ 2024-12-04 430/week @ 2024-12-11 304/week @ 2024-12-18 329/week @ 2024-12-25 160/week @ 2025-01-01 309/week @ 2025-01-08 250/week @ 2025-01-15 530/week @ 2025-01-22 332/week @ 2025-01-29 400/week @ 2025-02-05 382/week @ 2025-02-12 321/week @ 2025-02-19 435/week @ 2025-02-26

1,549 downloads per month
Used in 3 crates

MIT license

270KB
11K SLoC

mockd

Crates.io MIT licensed Build Status Rust Docs BuyMeaCoffee GitHubSponsors

Update to fakeit, a Rust port of the famous Go fakeit library with more than 130 functions.

Usage

Add mockd to the dependencies (typically dev-dependencies) in Cargo.toml


[dev-dependencies]
mockd = "0.4.42"

The contact info struct contains a phone number and email string.

    let credit_card = mockd::payment::credit_card();

    println!("Credit card: {:#?}", credit_card);

Mockd provides mock data in the following categories:

  • address
  • animal
  • beer
  • bool_rand
  • colour
  • company
  • contact
  • currency
  • datetime
  • file
  • generator
  • hacker
  • hipster
  • image
  • internet
  • job
  • language
  • log_level
  • name
  • password
  • payment
  • person
  • status_code
  • unique
  • user_agent
  • vehicle
  • words

Each category is enabled by a feature of the same name. All features can be enabled using the feature "all".

Full documentation is available at docs.rs

Dependencies

~0–660KB