Skip to content

MySQL database to JSON, this module converts MySQL database for visualization and manipulation in JSON format.

License

Notifications You must be signed in to change notification settings

imosudi/mysqldbtojson

Repository files navigation

mysqldbtojson

Clone this repo:

git clone https://github.com/imosudi/mysqldbtojson.git

cd mysqldbtojson

create .env file with the target database details:

touch .env
#DB_HOST="localhost"
DB_HOST="xxxxxxx.xxxxxxxorIP"
DB_USER="dbuser"
DB_PASS="dbpassword"
DB_NAME="dbname"

Create Python virtual environment :

python3 -m venv venv
source venv/bin/activate

python app

Edit app.py to further custmomize for use

Create object instance

mysqltojson = MysqltoJSON(engine)

return database schema:

ddbschemajson = mysqltojson.dbSchema()

return all data

dbdata2json= mysqltojson.dbData()

return database schema and data json files in db_json/ :

jsonfiles = mysqltojson.jsonFiles()

run

python app.py

About

MySQL database to JSON, this module converts MySQL database for visualization and manipulation in JSON format.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages