We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e15b75a commit 290c225Copy full SHA for 290c225
packages/settings-library/src/settings_library/redis.py
@@ -2,6 +2,7 @@
2
3
from pydantic.networks import RedisDsn
4
from pydantic.types import SecretStr
5
+from pydantic_settings import SettingsConfigDict
6
7
from .base import BaseCustomSettings
8
from .basic_types import PortInt
@@ -45,3 +46,18 @@ def build_redis_dsn(self, db_index: RedisDatabase) -> str:
45
46
path=f"{db_index}",
47
)
48
49
+
50
+ model_config = SettingsConfigDict(
51
+ json_schema_extra={
52
+ "examples": [
53
+ # minimal required
54
+ {
55
+ "REDIS_SECURE": "0",
56
+ "REDIS_HOST": "localhost",
57
+ "REDIS_PORT": "6379",
58
+ "REDIS_USER": "user",
59
+ "REDIS_PASSWORD": "foobar", # NOSONAR
60
+ }
61
+ ],
62
63
+ )
0 commit comments