Skip to main content

Mockup data generator library.

Project description

mockalot

codecov example workflow

:warning: Work In Progress: Library still in very early stages!

Sample data generator library.
The motivation to create this project was the high number of limitations for similar web apps in the free tier. This is easy to run locally, at Jupyter or even have it as a library for other projects.

Features

This is a library to help with sample data generation in a number of different ways:

  • Modular generators to help you get single random values
  • Full-scope class to generate batches of data
  • Modular writers to have your sample data writen directly into the most popular formats.

Usage

from mockalot import Mockalot
from mockalot.generators import EmailGenerator, UUIDGenerator, NameGenerator
from mockalot.writers import CSVWriter

mocker = Mockalot()

mocker.set_config("sample_size", 20000) \
      .set_column("id", UUIDGenerator, {}) \
      .set_column("name", NameGenerator, {}) \
      .set_column("email", EmailGenerator, {}) \
      .set_writer(CSVWriter, {"output_filename": "users"})

mocker.run()

The snipped above will create a CSV file of 20k lines, consisted of 3 columns(id, name and email), written into ./output/users.csv.

There are more usage examples here.

Roadmap

You can see the project's roadmap here.

Author

License

mockalot is available under the MIT license. See the LICENSE file for more info.

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

mockalot-0.3.1.tar.gz (7.1 kB view hashes)

Uploaded Source

Built Distribution

mockalot-0.3.1-py3-none-any.whl (11.1 kB view hashes)

Uploaded Python 3

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