mongodb-developer/mongodb-with-fastapi
关于
使用 MongoDB 和 FastAPI 的示例。
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文MongoDB with FastAPI
This is a small sample project demonstrating how to build an API with MongoDB and FastAPI. It was written to accompany a blog post - you should go read it!
If you want to fastrack your project even further, check out the MongoDB FastAPI app generator and eliminate much of the boilerplate of getting started.
TL;DR
If you really don't want to read the blog post and want to get up and running,
activate your Python virtualenv, and then run the following from your terminal (edit the MONGODB_URL first!):
# Install the requirements:
pip install -r requirements.txt
# Configure the location of your MongoDB database:
export MONGODB_URL="mongodb+srv://<username>:<password>@<url>/<db>?retryWrites=true&w=majority"
# Start the service:
uvicorn app:app --reload
(Check out MongoDB Atlas if you need a MongoDB database.)
Now you can load http://localhost:8000/docs 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!
探索相关项目
加载中…