Giter VIP home page Giter VIP logo

faker's Introduction

faker

gh-actions

faker is a Nim package that generates fake data for you. faker is heavily inspired by Python Faker.

WIP

Table of contents

Installation

nimble install faker

Usage

Library

import faker

block:
  let fake = newFaker("ja_JP")
  echo fake.address()
  # -> 茨城県港区東三島31丁目3番16号

  echo fake.name()
  # -> 若松 香織

block:
  # default locale is `LANG` environment variables

  let fake = newFaker()
  echo fake.address()
  # -> 94622 Cesar Camp Apt. 13 South Caitlyn, HI 35128

  echo fake.name()
  # -> Bruce Wagner DDS

CLI

$ faker address
大阪府調布市湯宮27丁目24番12号

# Set locale and run
$ LANG=en_US.UTF-8 faker name
Mr. Leonard Johns

Supported locale

I understand only English and Japanese.

Locale Description
en_US English
ja_JP Japanese
fa_IR Persian

Providers

TODO list.

  • [ ] base
  • [o] faker.provider.address
  • [o] faker.provider.automotive
  • [o] faker.provider.bank
  • [ ] faker.provider.barcode
  • [ ] faker.provider.color
  • [o] faker.provider.company
  • [ ] faker.provider.credit_card
  • [o] faker.provider.currency
  • [ ] faker.provider.date_time
  • [o] faker.provider.file
  • [ ] faker.provider.geo
  • [ ] faker.provider.internet
  • [o] faker.provider.isbn
  • [o] faker.provider.job
  • [ ] faker.provider.lorem
  • [o] faker.provider.misc
  • [o] faker.provider.person
  • [o] faker.provider.phone_number
  • [ ] faker.provider.profile
  • [ ] faker.provider.python
  • [o] faker.provider.ssn
  • [o] faker.provider.user_agent

API document

Development

Adding new module

You can generate a new module with nimble genMod task. Run below.

$ nimble genMod new_module

Please see other module implements, and edit a generated module.

Update provider code

You can update src/faker/provider/*.nim codes with generator tool. Run below if you had edited a new module.

$ nimble tool
$ ./tools/generator

See src/faker/provider/*.nim. A new provider will be generated.

Pull request

Welcome ❤️

LICENSE

MIT

faker's People

Contributors

dependabot[bot] avatar fishnibble avatar github-actions[bot] avatar hamidb80 avatar jiro4989 avatar mergify[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

faker's Issues

check version num

Tag number and nimble version must be same.
I sometimes forget to update nimble version.

Expanding localization

For what it's worth I have an old archived repo that has localization information (names, cities) that you might find useful in expanding the localizations for this repo. Just FYI.

fake password

A fake password would be nice! Could maybe generate from the top 1000? Passwords, paired with an integer, or part of a name...

SLASH COMMANDS

Slask commands

  • /release
    • Creates tag draft
    • Updates github-pages

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.