{"id":18398565,"url":"https://github.com/mongodb-developer/flask-pymongo-example","last_synced_at":"2025-03-23T16:09:38.638Z","repository":{"id":38356154,"uuid":"383062338","full_name":"mongodb-developer/flask-pymongo-example","owner":"mongodb-developer","description":"Implementation of flask and pymongo using mflix sample data set and mflix python UI ","archived":false,"fork":false,"pushed_at":"2024-09-19T10:03:35.000Z","size":1182,"stargazers_count":63,"open_issues_count":6,"forks_count":35,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-03-15T13:02:55.192Z","etag":null,"topics":["flask","mongodb-atlas","pymongo","pymongo-wrapper","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mongodb-developer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-05T08:05:02.000Z","updated_at":"2025-01-15T14:20:29.000Z","dependencies_parsed_at":"2024-12-24T18:10:56.166Z","dependency_job_id":null,"html_url":"https://github.com/mongodb-developer/flask-pymongo-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb-developer%2Fflask-pymongo-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb-developer%2Fflask-pymongo-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb-developer%2Fflask-pymongo-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb-developer%2Fflask-pymongo-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mongodb-developer","download_url":"https://codeload.github.com/mongodb-developer/flask-pymongo-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244959455,"owners_count":20538628,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flask","mongodb-atlas","pymongo","pymongo-wrapper","python3"],"created_at":"2024-11-06T02:22:48.347Z","updated_at":"2025-03-23T16:09:38.602Z","avatar_url":"https://github.com/mongodb-developer.png","language":"Python","readme":"# flask-pymongo-example\n\n```\n$$$$$$$$\\ $$\\                     $$\\               $$$$$$$\\            $$\\      $$\\                                               \n$$  _____|$$ |                    $$ |              $$  __$$\\           $$$\\    $$$ |                                              \n$$ |      $$ | $$$$$$\\   $$$$$$$\\ $$ |  $$\\         $$ |  $$ |$$\\   $$\\ $$$$\\  $$$$ | $$$$$$\\  $$$$$$$\\   $$$$$$\\   $$$$$$\\        \n$$$$$\\    $$ | \\____$$\\ $$  _____|$$ | $$  |$$$$$$\\ $$$$$$$  |$$ |  $$ |$$\\$$\\$$ $$ |$$  __$$\\ $$  __$$\\ $$  __$$\\ $$  __$$\\       \n$$  __|   $$ | $$$$$$$ |\\$$$$$$\\  $$$$$$  / \\______|$$  ____/ $$ |  $$ |$$ \\$$$  $$ |$$ /  $$ |$$ |  $$ |$$ /  $$ |$$ /  $$ |      \n$$ |      $$ |$$  __$$ | \\____$$\\ $$  _$$\u003c          $$ |      $$ |  $$ |$$ |\\$  /$$ |$$ |  $$ |$$ |  $$ |$$ |  $$ |$$ |  $$ |      \n$$ |      $$ |\\$$$$$$$ |$$$$$$$  |$$ | \\$$\\         $$ |      \\$$$$$$$ |$$ | \\_/ $$ |\\$$$$$$  |$$ |  $$ |\\$$$$$$$ |\\$$$$$$  |      \n\\__|      \\__| \\_______|\\_______/ \\__|  \\__|        \\__|       \\____$$ |\\__|     \\__| \\______/ \\__|  \\__| \\____$$ | \\______/       \n                                                              $$\\   $$ |                                 $$\\   $$ |                \n                                                              \\$$$$$$  |                                 \\$$$$$$  |                \n                                                               \\______/                                   \\______/                 \n       $$$\\                                                                                                                        \n      $$ $$\\                                                                                                                       \n      \\$$$\\ |                                                                                                                      \n      $$\\$$\\$$\\                                                                                                                    \n      $$ \\$$ __|                                                                                                                   \n      $$ |\\$$\\                                                                                                                     \n       $$$$ $$\\                                                                                                                    \n       \\____\\__|                                                                                                                   \n                                                                                                                                   \n                                                                                                                                   \n                                                                                                                                   \n$$\\      $$\\                                         $$$$$$$\\  $$$$$$$\\         $$$$$$\\    $$\\     $$\\                             \n$$$\\    $$$ |                                        $$  __$$\\ $$  __$$\\       $$  __$$\\   $$ |    $$ |                            \n$$$$\\  $$$$ | $$$$$$\\  $$$$$$$\\   $$$$$$\\   $$$$$$\\  $$ |  $$ |$$ |  $$ |      $$ /  $$ |$$$$$$\\   $$ | $$$$$$\\   $$$$$$$\\         \n$$\\$$\\$$ $$ |$$  __$$\\ $$  __$$\\ $$  __$$\\ $$  __$$\\ $$ |  $$ |$$$$$$$\\ |      $$$$$$$$ |\\_$$  _|  $$ | \\____$$\\ $$  _____|        \n$$ \\$$$  $$ |$$ /  $$ |$$ |  $$ |$$ /  $$ |$$ /  $$ |$$ |  $$ |$$  __$$\\       $$  __$$ |  $$ |    $$ | $$$$$$$ |\\$$$$$$\\          \n$$ |\\$  /$$ |$$ |  $$ |$$ |  $$ |$$ |  $$ |$$ |  $$ |$$ |  $$ |$$ |  $$ |      $$ |  $$ |  $$ |$$\\ $$ |$$  __$$ | \\____$$\\         \n$$ | \\_/ $$ |\\$$$$$$  |$$ |  $$ |\\$$$$$$$ |\\$$$$$$  |$$$$$$$  |$$$$$$$  |      $$ |  $$ |  \\$$$$  |$$ |\\$$$$$$$ |$$$$$$$  |        \n\\__|     \\__| \\______/ \\__|  \\__| \\____$$ | \\______/ \\_______/ \\_______/       \\__|  \\__|   \\____/ \\__| \\_______|\\_______/         \n                                 $$\\   $$ |                                                                                        \n                                 \\$$$$$$  |                                                                                        \n                                  \\______/                                                                                         \n```\n## Introduction\n\nImplementation of flask and pymongo using mflix sample data set and mflix python UI\n\nThis is a short guide on how to integrated MongoDB Atlas to Flask applications using Flask-PyMongo wrapper and pymongo driver.\n\n## Project Structure\n\nThe `mflix` directory holds the application logic.\n\n- `db.py` Where all database CRUD patterns are exposed as functions.\n- `api/movies.py`  Where the web api is exposed to the UI\n\nThe main directory holds the following files:\n- `run.py` Where the Flask application is initialize and the config is loaded\n- `sample_ini` Where the connection URI to MongoDB Atlas is configured\n- `requirments.txt` Where the dependencies this project needs to run are located.\n\n## How to set-up\n\nClone the repository.\n```\ngit clone git@github.com:mongodb-developer/flask-pymongo-example.git\n```\n\nStart a python virtual env:\n```\n# navigate to the flask-pymongo-example directory\ncd flask-pymongo-example\n\n# create the virtual environment for MFlix\npython3 -m venv mflix-venv\n\n# activate the virtual environment\nsource mflix-venv/bin/activate\n```\n\nInstall dependencies\n```\npython3 -m pip install -r requirements.txt\n```\n\nRename the `sample_ini` to `.ini`.\n```\nmv sample_ini sample.ini\n```\n\n[Get your Atlas cluster](https://docs.atlas.mongodb.com/getting-started/) with [sample data](https://docs.atlas.mongodb.com/sample-data/) set [connection string](https://docs.atlas.mongodb.com/connect-to-cluster/) and place in `DB_URI` parameter under `.ini`\n\nMake sure you have IP in the Atlas [access list](https://docs.atlas.mongodb.com/security/add-ip-address-to-list/) and username/password of your Atlas user correctly specified.\n\n## Start the application\n\n```\npython ./run.py\n```\n\nOpen your browser on http://localhost:5000\n\n## Disclaimer \n\nUse at your own risk; not a supported MongoDB product\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongodb-developer%2Fflask-pymongo-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmongodb-developer%2Fflask-pymongo-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongodb-developer%2Fflask-pymongo-example/lists"}