To convert data from sql to MongoDB database using Flask, we can use the PyMongo library.
By using this case you may want to convert data from SQL instance to MongoDB instance using Flask:
-
from Local sql to Local MongoDB
In these use case, Flask and the pymongo library provide a powerful and flexible way to manipulate Sql data and transfer it between instances.
- mysql - pip install mysql-connector-python
- flask - pip install flask
- mogodb - pip install pymongo
This package contain flask.
This code was developed for local host purpose, if you want to make changes you can using Flask and if you want to work with server database, you can replace local host with server host.
To run this, you have follow below steps
- first, clone the repositry
- Ensure your in mysqltomongodb folder, if not change directory to mysqltomongodb folder
- Then run this command in terminal using command
python start.py
- click on the local host