#random #fake-data #data

mockd

Fake data generator library with 130+ functions

29 releases

new 0.4.28 Nov 15, 2024
0.4.26 Oct 26, 2024
0.4.12 Jul 27, 2024
0.4.3 Dec 16, 2023
0.2.0 Mar 6, 2022

#141 in Algorithms

Download history 459/week @ 2024-07-25 353/week @ 2024-08-01 263/week @ 2024-08-08 300/week @ 2024-08-15 263/week @ 2024-08-22 363/week @ 2024-08-29 450/week @ 2024-09-05 731/week @ 2024-09-12 977/week @ 2024-09-19 731/week @ 2024-09-26 612/week @ 2024-10-03 876/week @ 2024-10-10 1059/week @ 2024-10-17 979/week @ 2024-10-24 970/week @ 2024-10-31 762/week @ 2024-11-07

3,934 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.28"

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