#random #fake-data #data

mockd

Fake data generator library with 130+ functions

35 releases

new 0.4.34 Jan 11, 2025
0.4.33 Dec 27, 2024
0.4.29 Nov 22, 2024
0.4.12 Jul 27, 2024
0.2.0 Mar 6, 2022

#135 in Algorithms

Download history 771/week @ 2024-09-21 665/week @ 2024-09-28 624/week @ 2024-10-05 987/week @ 2024-10-12 1200/week @ 2024-10-19 752/week @ 2024-10-26 1130/week @ 2024-11-02 702/week @ 2024-11-09 1014/week @ 2024-11-16 461/week @ 2024-11-23 216/week @ 2024-11-30 714/week @ 2024-12-07 333/week @ 2024-12-14 307/week @ 2024-12-21 232/week @ 2024-12-28 140/week @ 2025-01-04

1,245 downloads per month
Used in 2 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.34"

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–640KB