-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Updated pydantic version to 2.4
- Loading branch information
1 parent
f034f9a
commit 91a5a30
Showing
25 changed files
with
435 additions
and
428 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
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
fastapi==0.98.0 | ||
uvicorn[standard]==0.22.0 | ||
fastapi-users[beanie]==11.0.0 | ||
beanie==1.19.0 | ||
colorama==0.4.6 | ||
beanie==1.22.6 | ||
colorama==0.4.6 | ||
fastapi-users[beanie]==12.1.2 | ||
fastapi==0.103.2 | ||
pydantic-settings==2.0.3 | ||
uvicorn[standard]==0.23.2 |
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
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
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
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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
from pydantic import BaseSettings, EmailStr, Field | ||
from pydantic import EmailStr, Field | ||
from functools import lru_cache | ||
import importlib.metadata | ||
import unipoll_api.__version__ as version_file | ||
from pydantic_settings import BaseSettings, SettingsConfigDict | ||
|
||
|
||
try: | ||
|
@@ -17,18 +18,16 @@ class Settings(BaseSettings): # type: ignore | |
app_description: str = Field(default=("An Open Source API for creating surveys and polls " | ||
"to assist in university research."), | ||
title="App Description", description="A description of the API.") | ||
admin_email: EmailStr = Field(default=EmailStr("[email protected]"), | ||
admin_email: EmailStr = Field(default="", | ||
title="Admin Email", description="The email address of the admin of the API.") | ||
mongodb_url: str = Field(default="mongodb://localhost:27017", | ||
title="MongoDB URL", description="The URL of the MongoDB database.") | ||
secrete_key: str = Field(default="secret", title="Secrete Key", description="The secrete key of the API.") | ||
origins = "*".split(",") | ||
host = "0.0.0.0" | ||
port = 9000 | ||
reload = True | ||
|
||
class Config: | ||
env_file = ".env" | ||
origins: str = "*" | ||
host: str = "0.0.0.0" | ||
port: int = 9000 | ||
reload: bool = True | ||
model_config = SettingsConfigDict(env_file=".env") | ||
|
||
|
||
@lru_cache() | ||
|
Oops, something went wrong.