This project utilizes the Python faker
library to generate realistic-looking but fake data for customers, products, and orders. This data can be useful for testing, development, or demonstration purposes.
-
Python 3.x installed (https://www.python.org/downloads/)
-
Python
faker
library, you can using faker_commerce, faker_food inside this librarypip install faker
- Copy the sample file:
cp common_sample.py common.py
- Database Configuration:
- Open
common.py
in a text editor. - Locate the database connection settings.
- Update the following with your database credentials:
- Hostname/IP Address
- Database Name
- Username
- Password
- Open
-
Update
run.sh
:- Open the
run.sh
file in a text editor. - Adjust the following parameters to control the amount of data generated:
TOTAL_CUSTOMERS=2000 TOTAL_PRODUCTS=100000 TOTAL_SO=10000000 BATCH_SIZE=1000
- Open the
-
Run the script:
python3 -m run.sh
-
Run multiple SO script process with parallel: if you want to run multiple process to quick create SO
- Install parallel
sudo apt install parallel
- Start your script
nohup parallel python run_so.py ::: {1..8} > output.log 2>&1 &