Metadata-Version: 2.1
Name: fillme
Version: 1.0.0
Summary: A lightweight library to generate dummy data for database using OpenAI
Author: Soheil Dolatabadi
Author-email: Soheil Dolatabadi <soheildolat@gmail.com>
License: MIT License
        
        Copyright (c) 2024 SoheilStar
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/soheil-star01/fillme
Keywords: dummy data,openai,chatgpt,database,postgresql
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: openai==1.12.0
Requires-Dist: sqlalchemy==2.0.27
Provides-Extra: dev
Requires-Dist: black; extra == "dev"
Requires-Dist: bumpver; extra == "dev"
Requires-Dist: isort; extra == "dev"
Requires-Dist: pip-tools; extra == "dev"
Requires-Dist: pytest; extra == "dev"

## 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
```text
pip install FillMe
```
or, you can clone this repository, create you virtual environment 
and then run
```text
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:
```shell
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
```python
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()
```
