Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/geekcomputers/Python
/ add_course
Function
add_course
fastapi.py:40–42 ·
view source on GitHub ↗
(course: Course)
Source
from the content-addressed store, hash-verified
38
# add a new course
39
@app.post(
"/courses"
)
40
def
add_course(course: Course):
41
fakedb.append(course.dict())
42
return
fakedb[-1]
43
44
45
# delete a course
Callers
nothing calls this directly
Calls
1
append
Method · 0.45
Tested by
no test coverage detected