Skip to content

Commit

Permalink
After module 3: First Steps
Browse files Browse the repository at this point in the history
  • Loading branch information
codesensei-courses committed Apr 18, 2022
0 parents commit 21cc7c9
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/.idea/
**/__pycache__/
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# FastAPI Fundamentals
Demo code for the course "FastAPI Fundamentals" on [Pluralsight](https://www.pluralsight.com).

There's a commit for each module in the course, as well as a tag:


- [After module 3: First Steps](https://github.com/codesensei-courses/fastapi_fundamentals/releases/tag/first-steps)
- [After module 4: Serving Data With FastAPI](https://github.com/codesensei-courses/fastapi_fundamentals/releases/tag/serving-data)
- [After module 5: Serving Structured Data Using Pydantic Models](https://github.com/codesensei-courses/fastapi_fundamentals/releases/tag/structured-data-with-pydantic)
- [After module 6: Using a Database](https://github.com/codesensei-courses/fastapi_fundamentals/releases/tag/using-a-database)
- [After module 7: HTTP and FastAPI](https://github.com/codesensei-courses/fastapi_fundamentals/releases/tag/http)
- [After module 8: Authentication](https://github.com/codesensei-courses/fastapi_fundamentals/releases/tag/authentication)
- [After module 9: Testing and Deployment](https://github.com/codesensei-courses/fastapi_fundamentals/releases/tag/test-and-deploy)
17 changes: 17 additions & 0 deletions carsharing.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from datetime import datetime

from fastapi import FastAPI

app = FastAPI()


@app.get("/")
def welcome():
"""Return a friendly welcome message."""
return {'message': "Welcome to the Car Sharing service!"}


@app.get("/date")
def date():
"""Return the current date/time."""
return {'date': datetime.now()}

0 comments on commit 21cc7c9

Please sign in to comment.