Giter VIP home page Giter VIP logo

datafaker's Introduction

Data Faker

Maven Status License codecov

This library is a modern port of java-faker, built on Java 8, with up to date libraries and several newly added Fake Generators.

This library generates fake data, similar to other fake data generators, such as:

It's useful when you're developing a new project and need some pretty data for showcase.

Usage

In the pom.xml, add the following fragment to the dependencies section:

<dependency>
    <groupId>net.datafaker</groupId>
    <artifactId>datafaker</artifactId>
    <version>1.2.0</version>
</dependency>

For Gradle users, add the following to your build.gradle file.

dependencies {
    implementation 'net.datafaker:datafaker:1.2.0'
}

You can also use the snapshot version (1.3.0-SNAPSHOT), which automatically gets published after every push to the master branch of this repository. Binary repository URL for snapshots download is https://s01.oss.sonatype.org/content/repositories/snapshots/.

In your Java code:

Faker faker = new Faker();

String name = faker.name().fullName(); // Miss Samanta Schmidt
String firstName = faker.name().firstName(); // Emory
String lastName = faker.name().lastName(); // Barton

String streetAddress = faker.address().streetAddress(); // 60018 Sawayn Brooks Suite 449

Or in your Kotlin code:

val faker = Faker()

val name = faker.name().fullName() // Miss Samanta Schmidt
val firstName = faker.name().firstName() // Emory
val lastName = faker.name().lastName() // Barton

val streetAddress = faker.address().streetAddress() // 60018 Sawayn Brooks Suite 449

Documentation

https://www.datafaker.net/documentation/providers/

Contributions

See CONTRIBUTING.md

Providers

  • Address
  • Ancient
  • Animal
  • App
  • Appliance
  • Aqua Teen Hunger Force
  • Artist
  • Avatar
  • Aviation
  • Babylon5
  • Back To The Future
  • Barcode
  • Basketball
  • Beer
  • Bojack Horseman
  • Book
  • Bool
  • Bossa Nova
  • Breaking Bad
  • Business
  • CNPJ Brazilian National Registry of Legal Entities
  • CPF Brazilian individual taxpayer registry identification
  • Cat
  • ChuckNorris
  • Code
  • Coin
  • Color
  • Commerce
  • Company
  • Crypto
  • DateAndTime
  • Demographic
  • Dessert
  • Disease
  • Dog
  • Domain
  • DragonBall
  • Dune
  • Durations
  • Educator
  • EnglandFootBall
  • Esports
  • File
  • Finance
  • Food
  • Formula 1 (:racing_car:)
  • Friends
  • FunnyName
  • GameOfThrones
  • Gender
  • Hacker
  • HarryPotter
  • Heartstone
  • Hipster
  • HitchhikersGuideToTheGalaxy
  • Hobbit
  • HowIMetYourMother
  • IdNumber
  • Internet
  • Job
  • Kaamelott
  • LeagueOfLegends
  • Lebowski
  • LordOfTheRings
  • Lorem
  • Matz
  • Minecraft
  • Mood
  • Mountains
  • Music
  • Name
  • Nation
  • Nigeria
  • Number
  • Options
  • Overwatch
  • Passport
  • PhoneNumber
  • Photography
  • Pokemon
  • Princess Bride
  • Relationship Terms
  • Resident Evil
  • RickAndMorty
  • Robin
  • RockBand
  • RuPaul's Drag Race
  • Shakespeare
  • Sip
  • SlackEmoji
  • Space
  • StarCraft
  • StarTrek
  • Stock
  • Superhero
  • Team
  • Touhou
  • TwinPeaks
  • Twitter
  • University
  • Vehicle
  • Weather
  • Witcher
  • Yoda
  • Zelda

Usage with Locales

Faker faker = new Faker(new Locale("YOUR_LOCALE"));

For example:

new Faker(new Locale("en-us")).address().zipCodeByState("CA"));

Supported Locales

  • ar
  • bg
  • ca
  • ca-CAT
  • cs
  • da-DK
  • de
  • de-AT
  • de-CH
  • en
  • en-AU
  • en-au-ocker
  • en-BORK
  • en-CA
  • en-GB
  • en-IND
  • en-MS
  • en-NEP
  • en-NG
  • en-NZ
  • en-PAK
  • en-SG
  • en-UG
  • en-US
  • en-ZA
  • es
  • es-MX
  • fa
  • fi-FI
  • fr
  • he
  • hu
  • in-ID
  • it
  • ja
  • ko
  • nb-NO
  • nl
  • pl
  • pt
  • pt-BR
  • ru
  • sk
  • sv
  • sv-SE
  • tr
  • uk
  • vi
  • zh-CN
  • zh-TW

LICENSE

Copyright (c) 2022 DataFaker.net See the LICENSE file for license rights and limitations.

datafaker's People

Contributors

2235161562 avatar bodiam avatar bravochaos avatar charlottee67 avatar chenwusi2012 avatar codingricky avatar coldexpression avatar dependabot[bot] avatar egoetschalckx avatar haruntuncay avatar irakatz avatar l-evg avatar leoncho avatar maxtar avatar mpaauw avatar pascalschumacher avatar pmiklos avatar radrik avatar renshao avatar robosoul avatar seriybg avatar snuyanzin avatar ssssam141 avatar sturman avatar styloooo avatar tcsizmadia avatar the-true-hooha avatar trevershick avatar valfirst avatar zolv avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.