Simple application to perform basic Create, read, update, and delete (CRUD) operations using Python's framework Flask and MongoDB as database.
Create a folder.
$ mkdir mongodb_pymongo
Create a virtual enviroment.
$pip install virtualenv
$ cd mongodb_pythongo
$ virtualenv env
$ source env/bin/activate
Install requirements.txt
$pip install -r requirements.txt
NoSQL database is been used for this project. mLab: Database-as-a-Service for MongoDB.
- Create an account at mLab.
- Create a database "mongo_portfolio_projects" or whatever you like.
- Create a Collection: "users".
Add your own credentials to the following.
app.config["MONGO_DBNAME"]
app.config["MONGO_URI"]
Run project.
$ python mongodb_pymongo.py
{ "_id": { "$oid": "5b644abeb2ea1e07d856a829" }, "name": "Simon", "language": "English" }