Skip to content

Binwin6724/Python-Flask-MongoDB-by-Binwin-Viju

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python-Flask-MongoDB-by-Binwin-Viju

Python-Flask-MongoDB

  • 👋 Hi, I’m @Binwin6724
  • 👀 I’m interested in Developing Application
  • 🌱 I’m currently learning React JS
  • 💞️ I’m looking to collaborate on API Handling
  • 📫 Reach me by going to this website https://binwinviju.co.in/

To Download

  • install python from here.
  • install MongoDB Community server from here.
  • install visual studio code from here.
  • install postman from here.

Setup machine

  • Need to create flask and mongo folder in C:\flask\mongo
  • Open VS Code in mongo folder

Setup Code

  • Go to terminal and
    • type python -m venv . for windows users.
    • type virtualenv -p python . for mac users.
  • Go to terminal and
    • run Scripts/activate for windows users.
    • type source bin/activate for mac users.
  • install packages like :-
    • pip install flask
    • pip install pymongo

Run Code

  • py server.py for windows user.
  • sudo python server.py for mac user.

How does it works!!!

So in order to work this we must run the code as mentioned above. We also need to start our MongoDB Community Server.

After running the code we can see some result like :-

  • Serving Flask app 'server' (lazy loading)
  • Environment: production WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
  • Debug mode: on
  • Running on http://127.0.0.1:80 (Press CTRL+C to quit)
  • Restarting with stat
  • Debugger is active!
  • Debugger PIN: 124-615-963

Create Data Example [POST]

image

when we click send it will be stored in our MongoDB.

Read Data Example [GET]

image

Update Data Example [PATCH]

image

Delete Data Example [DELETE]

image

Happy Hacking!!!

Releases

No releases published

Packages

No packages published

Languages