Fake
A Rust library for generating fake data.
Installation
Default (rand is required):
[]
= { = "2.6", =['derive']}
= "0.8"
features:
- derive: if you want to use `#[derive(Dummy)]
- crate implementations:
- chrono
- chrono-tz
- http
- uuid
- rust_decimal
- bigdecimal
- random_color
- geo-types
- semver
- serde_json
- time
- num-traits
- zerocopy
Usage
use ;
use StdRng;
use SeedableRng;
Fakers with locale
Lorem
Word;
Words;
Sentence;
Sentences;
Paragraph;
Paragraphs;
Name
FirstName;
LastName;
Title;
Suffix;
Name;
NameWithTitle;
Number
Digit;
;
Boolean
Boolean;
Internet
FreeEmailProvider;
DomainSuffix;
FreeEmail;
SafeEmail;
Username;
Password;
IPv4;
IPv6;
IP;
MACAddress;
UserAgent;
HTTP
RfcStatusCode;
ValidStatusCode;
Color
HexColor;
RgbColor;
RgbaColor;
HslColor;
HslaColor;
Color;
Company
CompanySuffix;
CompanyName;
Buzzword;
BuzzwordMiddle;
BuzzwordTail;
CatchPhase;
BsVerb;
BsAdj;
BsNoun;
Bs;
Profession;
Industry;
Address
CityPrefix;
CitySuffix;
CityName;
CountryName;
CountryCode;
StreetSuffix;
StreetName;
TimeZone;
StateName;
StateAbbr;
SecondaryAddressType;
SecondaryAddress;
ZipCode;
PostCode;
BuildingNumber;
Latitude;
Longitude;
Geohash;
Automotive
LicencePlate;
Barcode
Isbn;
Isbn13;
Isbn10;
Phone Number
PhoneNumber;
CellNumber;
Date/Time
Time;
Date;
DateTime;
Duration;
DateTimeBefore;
DateTimeAfter;
DateTimeBetween;
Filesystem
FilePath;
FileName;
FileExtension;
DirPath;
Finance
Bic;
UUID
UUIDv1;
UUIDv3;
UUIDv4;
UUIDv5;
LICENSE
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.