UPDATE: The function now also supports creating dynamic data sets!

Have you ever been in a situation where you wish you had some random data lying around while testing some code or whatnot? I do all the time. What I usually do is hunt around my disk after some random csv that I can use. Then someone on Twitter posted about an online random generator called Mockaroo. And guess what, it has an API.

I quickly cobbled together a wrapper function that you can use to generate data in csv format. Head on over to http://www.mockaroo.com/ and register an account to get your free API key, create some schemas (data sets) and you are good to go.

The API supports creating data sets on the go, but the current version of the wrapper only supports pre-made ones, so if you want to contribute, head on over to my gist at github, fork my code and help make it better!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s