-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changed python to python3 in readme and added support version 2 of py…
…dantic
- Loading branch information
1 parent
71b7563
commit 3a1f5be
Showing
4 changed files
with
3 additions
and
42 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 |
---|---|---|
|
@@ -36,7 +36,7 @@ $ python3 -m venv venv | |
4. Start the application: | ||
|
||
```console | ||
python main.py | ||
python3 main.py | ||
``` | ||
|
||
|
||
|
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
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 |
---|---|---|
|
@@ -24,42 +24,3 @@ class Config: | |
|
||
class Settings: | ||
name = "student" | ||
|
||
|
||
class UpdateStudentModel(BaseModel): | ||
fullname: Optional[str] | ||
email: Optional[EmailStr] | ||
course_of_study: Optional[str] | ||
year: Optional[int] | ||
gpa: Optional[float] | ||
|
||
class Collection: | ||
name = "student" | ||
|
||
class Config: | ||
schema_extra = { | ||
"example": { | ||
"fullname": "Abdulazeez Abdulazeez", | ||
"email": "[email protected]", | ||
"course_of_study": "Water resources and environmental engineering", | ||
"year": 4, | ||
"gpa": "5.0", | ||
} | ||
} | ||
|
||
|
||
class Response(BaseModel): | ||
status_code: int | ||
response_type: str | ||
description: str | ||
data: Optional[Any] | ||
|
||
class Config: | ||
schema_extra = { | ||
"example": { | ||
"status_code": 200, | ||
"response_type": "success", | ||
"description": "Operation successful", | ||
"data": "Sample data", | ||
} | ||
} |
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