/Python-MongoDB-Example

A Live working Example Application of Python, Qt, PySide2, MongoDB, PyMongo, QTreeView, QAbstractTableModel

Primary LanguagePython

Python-MongoDB-Example

A Live working Example Application of Python, Qt, PySide2, MongoDB, PyMongo, QTableView, QAbstractTableModel

A Complete Video Tutorial of this application is Available

https://www.youtube.com/vfxpipeline

Please Subscribe to my youtube channel to appriciate me.

What is this application ?

This is a python application to load mongodb database data in pyside2 interface

Requirements

  • Python3.6
  • pip install pymongo==3.7.2 - MongoDB Python Driver
  • MongoDB 4.0.4 - Database Server
  • (Optional)MongoDB Compass 1.16.3 - To view database

What MongoDB Operation covered in this application

  1. Connect to MongoDB database
  2. Create new database
  3. Create new collection
  4. Insert new data
  5. Update existing data
  6. Query Data
  7. Remove Data
  8. Store image on MongoDb Database

What is the core logics related to PySide2

  1. Create a TableView
  2. Create a QAbstractTableModel
  3. Load MongoDB Database data in QAbstractTableModel
  4. Make QAbstractTableModel rows inline editable to edit database
  5. Create (Add Row, Remove Row) context Menu on Tableview
  6. Create Dynamic Headers in QAbstractTableModel
  7. Add New Empty Row in QAbstractTableModel
  8. Remove row from QAbstractTableModel
  9. Edit Cell value in QAbstractTableModel
  10. Display image in column of QAbstractTableModel
  11. On double click on image a QFileDialog will open to change image