Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

mongodb-developer/pymongo-fastapi-crud

Repository files navigation

main workflow

PyMongo with FastAPI CRUD application

This is a simple CRUD application built using PyMongo and FastAPI. You can also follow the step-by-step tutorial for building this application.

Running the server

Set your Atlas URI connection string as a parameter in .env. Make sure you replace the username and password placeholders with your own credentials.

ATLAS_URI=mongodb+srv://<username>:<password>@sandbox.jadwj.mongodb.net
DB_NAME=pymongo_tutorial

Install the required dependencies:

python -m pip install -r requirements.txt

Start the server:

python -m uvicorn main:app --reload

When the application starts, navigate to http://localhost:8000/docs and try out the book endpoints.

Running the tests

Install pytest:

python -m pip install pytest

Execute the tests:

python -m pytest

Disclaimer

Use at your own risk; not a supported MongoDB product

About

PyMongo with FastAPI CRUD application

Topics

Resources

License

Stars

Watchers

Forks

Languages

AltStyle によって変換されたページ (->オリジナル) /