-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 21cc7c9
Showing
3 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/.idea/ | ||
**/__pycache__/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()} |