Skip to main content

A lightweight library to generate dummy data for database using OpenAI

Project description

FillMe with dummy data!!!

This python package helps you to populate your database with fake data generated by ChatGPT. This will ensure the tables relationships will be provisioned and also you have better data to work with rather than random chars and integers!

How to install

you can use PIP to install it by simply using

pip install FillMe

or, you can clone this repository, create you virtual environment and then run

python setup.py install

How to use it

as this repository is relying on ChatGPT to generate data, you first need to create an account on OpenAI and get an API token. Then all you need is to add it to your OS enevironment variable or by passing it to FillMe and it will do the rest of job!(check next steps)

then, you can use FillMe in two ways:

1- using in CLI and by passing one mandatory argument and two optional arguments:

python -m FillMe --db-url your_db_url_here --schema your_schema_name_here --openai-token your_openai_token_here

2- or by importing package in your python code or jupyter notebook

from fillme import FillMe
from sqlalchemy import create_engine

engine = create_engine(
    url='postgresql+psycopg2://user:pass@db_host:db_port/db_name', # postgres url
    connect_args={'options': f"-csearch_path=schema_name"}, # schema if applicable
)

# creating instance
fillme_obj = FillMe(
    engine
)
# getting tables and relationships
fillme_obj.get_tables()
# generating dummy data and storing in the tables
fillme_obj.generate_dummies()

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

fillme-1.0.0.tar.gz (4.1 kB view hashes)

Uploaded Source

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