Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

command line parameters help #3

Closed
emanueol opened this issue Jul 10, 2023 · 3 comments
Closed

command line parameters help #3

emanueol opened this issue Jul 10, 2023 · 3 comments

Comments

@emanueol
Copy link

Hi any plans documenting all possible command line parameters?

@dacort
Copy link
Owner

dacort commented Jul 10, 2023

I presume you mean all the different fake properties? The CLI uses the Faker Python library under the hood and all the different providers are listed in their docs here: https://faker.readthedocs.io/en/stable/providers.html

I'll leave this open so I can make this more clear in the README or CLI help output.

@emanueol
Copy link
Author

emanueol commented Jul 10, 2023

thanks.

I presume you mean all the different fake properties? The CLI uses the Faker Python library under the hood and all the different providers are listed in their docs here: https://faker.readthedocs.io/en/stable/providers.html

Don't understand.. seems you suggesting there's
a relationship between your cli fake properties vs faker is it ? meaning i could try imagine -n or -t or any other params i could use ?

example - what -t does ?
fake -t s3access -n 10

im aware of how to use faker coding python scripting, but i was wonder if i could simply generate data using faker command line (without any python script) when i found your fake cli project, so i wonder:

  • if possible to use faker command line to generate data ?
  • you created fake cli to generate data but then i wonder how to use it ? like what params are there.

@dacort
Copy link
Owner

dacort commented Jul 10, 2023

Ah, I understand better now.

I created this library but I also wanted to be able to use the Faker Python library without having to do any scripting and just use a CLI. You can "kind of" do that using the Faker library, but it's hard to use and get the right type of data.

If you install this CLI (with pip install faker-cli), you can run fake --help and get an overview of usage options. In the example you gave, -t is a template and -n 10 says to generate 10 rows of data.

Note A quick word on templates - this is functionality I added to my own CLI to make generating certain types of fake data easier. Today, the only templates that exist are for S3 Access and CloudFront logs.

Here's the output of the --help command, but I should definitely update the readme.

Usage: fake [OPTIONS] [COLUMN_TYPES]

  Generate fake data, easily.

  COLUMN_TYPES is a comma-seperated list of Faker property names, like
  pyint,username,date_this_year

  You can also use --template for real-world synthetic data.

Options:
  -n, --num-rows INTEGER          Number of rows
  -f, --format [csv|json|parquet|deltalake]
                                  Format of the output
  -o, --output PATH
  -c, --columns TEXT              Column names
  -t, --template [s3access|cloudfront]
                                  Template to use
  --help                          Show this message and exit.

@dacort dacort closed this as completed in d6cafb7 Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants