#random #fake-data #data

mockd

Fake data generator library with 130+ functions

7 unstable releases

0.4.3 Dec 16, 2023
0.4.2 Dec 9, 2023
0.4.1 Dec 5, 2022
0.4.0 Oct 1, 2022
0.1.1 Feb 27, 2022

#172 in HTTP client

Download history 196/week @ 2023-11-27 486/week @ 2023-12-04 167/week @ 2023-12-11 647/week @ 2023-12-18 152/week @ 2023-12-25 412/week @ 2024-01-01 596/week @ 2024-01-08 700/week @ 2024-01-15 167/week @ 2024-01-22 86/week @ 2024-01-29 658/week @ 2024-02-05 724/week @ 2024-02-12 720/week @ 2024-02-19 228/week @ 2024-02-26 640/week @ 2024-03-04 170/week @ 2024-03-11

1,763 downloads per month
Used in hcaptcha

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.3"

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