@@ -52,7 +52,7 @@ Install dependencies, connect to MongoDB and start your FastAPI server.
52
52
.. procedure::
53
53
:style: connected
54
54
55
- .. step:: Clone the example code example.
55
+ .. step:: Clone the example code example
56
56
57
57
Run the following command in your terminal to clone the code from the
58
58
:github:`mongodb-with-fastapi </mongodb-developer/mongodb-with-fastapi>`
@@ -62,7 +62,7 @@ Install dependencies, connect to MongoDB and start your FastAPI server.
62
62
63
63
git clone
[email protected] :mongodb-developer/mongodb-with-fastapi.git
64
64
65
- .. step:: Install the required dependencies.
65
+ .. step:: Install the required dependencies
66
66
67
67
.. tip:: Use a Virtual environment
68
68
@@ -80,7 +80,7 @@ Install dependencies, connect to MongoDB and start your FastAPI server.
80
80
81
81
It might take a few moments to download and install your dependencies.
82
82
83
- .. step:: Retrieve your connection string.
83
+ .. step:: Retrieve your connection string
84
84
85
85
Follow the :manual:`Find Your MongoDB Atlas Connection String guide
86
86
</reference/connection-string/#find-your-mongodb-atlas-connection-string>`
@@ -99,7 +99,7 @@ Install dependencies, connect to MongoDB and start your FastAPI server.
99
99
environment variable. You can use `direnv <https://direnv.net/>`__ to
100
100
make this process easier.
101
101
102
- .. step:: Start your FastAPI server.
102
+ .. step:: Start your FastAPI server
103
103
104
104
Run the following code in your terminal to start your FastAPI server:
105
105
@@ -145,7 +145,7 @@ defined in the ``app.py`` file.
145
145
.. procedure::
146
146
:style: connected
147
147
148
- .. step:: Create the StudentModel Class.
148
+ .. step:: Create the StudentModel Class
149
149
150
150
This is the primary model you can use as the `response model
151
151
<https://fastapi.tiangolo.com/tutorial/response-model/>`__ for the
@@ -208,7 +208,7 @@ defined in the ``app.py`` file.
208
208
},
209
209
)
210
210
211
- .. step:: Create the UpdateStudentModel Class.
211
+ .. step:: Create the UpdateStudentModel Class
212
212
213
213
The ``UpdateStudentModel`` has two key differences from the ``StudentModel``:
214
214
@@ -241,7 +241,7 @@ defined in the ``app.py`` file.
241
241
)
242
242
243
243
244
- .. step:: Create the StudentCollection Class.
244
+ .. step:: Create the StudentCollection Class
245
245
246
246
The ``StudentCollection`` class is defined to encapsulate a list of
247
247
``StudentModel`` instances. In theory, the endpoint could return a
@@ -294,7 +294,7 @@ All of these routes are defined in the ``app.py`` file.
294
294
.. procedure::
295
295
:style: connected
296
296
297
- .. step:: Create the Student routes.
297
+ .. step:: Create the Student routes
298
298
299
299
The ``create_student`` route receives the new student data as a JSON
300
300
string in a ``POST`` request. You must decode this JSON request body into a
@@ -334,7 +334,7 @@ All of these routes are defined in the ``app.py`` file.
334
334
)
335
335
return created_student
336
336
337
- .. step:: Create the Read routes.
337
+ .. step:: Create the Read routes
338
338
339
339
This application one route for viewing all students, and one
340
340
for viewing an individual student, specified by their ``id``.
@@ -393,7 +393,7 @@ All of these routes are defined in the ``app.py`` file.
393
393
394
394
raise HTTPException(status_code=404, detail="Student {id} not found")
395
395
396
- .. step:: Create the Update route.
396
+ .. step:: Create the Update route
397
397
398
398
The ``update_student`` route functions similar to a combination of the
399
399
``create_student`` and the ``show_student`` routes. It receives the ``id``
@@ -447,7 +447,7 @@ All of these routes are defined in the ``app.py`` file.
447
447
448
448
raise HTTPException(status_code=404, detail=f"Student {id} not found")
449
449
450
- .. step:: Create the Delete route.
450
+ .. step:: Create the Delete route
451
451
452
452
The ``delete_student`` is acting on a single document, so you must supply
453
453
an ``id`` in the URL. If you find a matching document and successfully
0 commit comments