# mongodb-with-fastapi **Repository Path**: qscgu23/mongodb-with-fastapi ## Basic Information - **Project Name**: mongodb-with-fastapi - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-08-05 - **Last Updated**: 2021-08-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # MongoDB with FastAPI This is a small sample project demonstrating how to build an API with [MongoDB](https://developer.mongodb.com/) and [FastAPI](https://fastapi.tiangolo.com/). It was written to accompany a [blog post](https://developer.mongodb.com/quickstart/python-quickstart-fastapi/) - you should go read it! ## TL;DR If you really don't want to read the [blog post](https://developer.mongodb.com/quickstart/python-quickstart-fastapi/) and want to get up and running, activate your Python virtualenv, and then run the following from your terminal (edit the `DB_URL` first!): ```bash # Install the requirements: pip install -r requirements.txt # Configure the location of your MongoDB database: export MONGODB_URL="mongodb+srv://:@/?retryWrites=true&w=majority" # Start the service: uvicorn app:app --reload ``` (Check out [MongoDB Atlas](https://www.mongodb.com/cloud/atlas) if you need a MongoDB database.) Now you can load http://localhost:8000 in your browser ... but there won't be much to see until you've inserted some data. If you have any questions or suggestions, check out the [MongoDB Community Forums](https://developer.mongodb.com/community/forums/)!