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 details)

Uploaded Source

File details

Details for the file fillme-1.0.0.tar.gz.

File metadata

  • Download URL: fillme-1.0.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.0

File hashes

Hashes for fillme-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a8c2abe5c5844fbd6b18a1999b44fda07757e22c8b63945fe955a29713f1ae2d
MD5 e18f0eb7c64847fee602c2955fac10d3
BLAKE2b-256 3c7454a9d7c1a43eeebe68a55e2bcab966b5b7e29aec410c9726ca01cfc24544

See more details on using hashes here.

Supported by

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