Skip to main content

No project description provided

Project description

Faker CLI

Faker is an awesome Python library, but I often just want a simple command I can run to generate data in a variety of formats.

With Faker CLI, you can easily generate CSV or JSON data with fields of your choosing.

You can also utilize pre-built templates for common data formats!

Usage

By default, fake will generate a CSV output for you. You just specify the number of rows you want and the column types.

fake -n 10 pyint,user_name,date_this_year

BAM! You've got a CSV file with your data.

pyint,user_name,date_this_year
8649,fward,2023-03-08
3933,zharris,2023-03-20
1469,jasonellis,2023-05-16
3660,heather91,2023-02-10
9160,cameronlopez,2023-05-05
2735,candacemoore,2023-05-12
7240,zachary06,2023-01-23
9778,thomasstacey,2023-05-23
5820,kenneth36,2023-04-26
2856,michael23,2023-01-16

JSON

Wnat a JSON file? Sweet, use -f json.

fake -n 10 pyint,user_name,date_this_year -f json
{"pyint": 3854, "user_name": "cchavez", "date_this_year": "2023-01-20"}
{"pyint": 2008, "user_name": "vnguyen", "date_this_year": "2023-04-03"}
{"pyint": 1434, "user_name": "karen38", "date_this_year": "2023-03-02"}
{"pyint": 4922, "user_name": "duncanellen", "date_this_year": "2023-04-22"}
{"pyint": 230, "user_name": "tiffany72", "date_this_year": "2023-02-25"}
{"pyint": 7252, "user_name": "maydouglas", "date_this_year": "2023-04-01"}
{"pyint": 2716, "user_name": "sheilaflores", "date_this_year": "2023-03-20"}
{"pyint": 2827, "user_name": "parksandra", "date_this_year": "2023-04-01"}
{"pyint": 3353, "user_name": "melissaatkinson", "date_this_year": "2023-02-10"}
{"pyint": 5306, "user_name": "mark12", "date_this_year": "2023-04-16"}

Default column names aren't good enough for you? Fine, use your own.

fake -n 10 pyint,user_name,date_this_year -f json -c id,awesome_name,last_attention_at
{"id": 6048, "awesome_name": "jtran", "last_attention_at": "2023-04-24"}
{"id": 4310, "awesome_name": "stacey99", "last_attention_at": "2023-04-27"}
{"id": 1839, "awesome_name": "jho", "last_attention_at": "2023-03-07"}
{"id": 236, "awesome_name": "melissamassey", "last_attention_at": "2023-04-17"}
{"id": 6599, "awesome_name": "mwells", "last_attention_at": "2023-04-25"}
{"id": 6071, "awesome_name": "wilcoxrick", "last_attention_at": "2023-01-17"}
{"id": 9646, "awesome_name": "michael92", "last_attention_at": "2023-04-22"}
{"id": 6986, "awesome_name": "ballen", "last_attention_at": "2023-01-08"}
{"id": 6892, "awesome_name": "jennifer61", "last_attention_at": "2023-01-03"}
{"id": 1967, "awesome_name": "jmendoza", "last_attention_at": "2023-01-23"}

Templates

Want to generate 1 MILLION S3 Access logs in ~2 minutes? Now you can.

fake -t s3access -n 10

How about CloudFront? Go ahead.

fake -t cloudfront -n 10

Warning: Both of these templates are still being validated - please be cautious!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

faker_cli-0.1.1.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

faker_cli-0.1.1-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file faker_cli-0.1.1.tar.gz.

File metadata

  • Download URL: faker_cli-0.1.1.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for faker_cli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 bb3af86312920f3b0d72cd81d15657954047f2030d12a640651af1762abd8444
MD5 fe9636716370e42a0ce3cee6039f17b2
BLAKE2b-256 c67f90f15abd69ded9fbb5182c16770d8188de70feb266fadeeab57088e318a8

See more details on using hashes here.

File details

Details for the file faker_cli-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: faker_cli-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for faker_cli-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 53afbe076889d00b716a82aca07884a63fbfd0d7294e2c1a062067c80e69646b
MD5 eda9baa9d3d2a2b277a0b5420e36f008
BLAKE2b-256 da720dc867f11de8281c520b113c64e8d0da9cd9903b7089c16c12ce6b32df8d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page