File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 11# Port to serve app on.
2- PORT = 5000
2+ PORT = 5000
3+ LOCAL_REDIS_URL = redis://username:password@localhost:6379
Original file line number Diff line number Diff line change 22import functools
33import logging
44
5- import pydantic
5+ from pydantic import AnyUrl , BaseSettings , HttpUrl
66
77CFG_LOGGER = logging .getLogger ("app.config" )
88
99
10- class _Settings (pydantic . BaseSettings ):
10+ class _Settings (BaseSettings ):
1111 port : int = 5000
12+ rediscloud_url : HttpUrl = None
13+ local_redis_url : AnyUrl = "redis://localhost:6379"
1214
1315
1416@functools .lru_cache ()
15- def get_settings (** kwargs ):
17+ def get_settings (** kwargs ) -> BaseSettings :
1618 """
1719 Read settings from the environment or `.env` file.
1820 https://pydantic-docs.helpmanual.io/usage/settings/#dotenv-env-support
You can’t perform that action at this time.
0 commit comments