ursaproxy 0.3.0__py3-none-any.whl → 0.4.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ursaproxy/config.py +7 -5
- {ursaproxy-0.3.0.dist-info → ursaproxy-0.4.0.dist-info}/METADATA +1 -1
- {ursaproxy-0.3.0.dist-info → ursaproxy-0.4.0.dist-info}/RECORD +5 -5
- {ursaproxy-0.3.0.dist-info → ursaproxy-0.4.0.dist-info}/WHEEL +0 -0
- {ursaproxy-0.3.0.dist-info → ursaproxy-0.4.0.dist-info}/entry_points.txt +0 -0
ursaproxy/config.py
CHANGED
|
@@ -11,9 +11,10 @@ class Settings(BaseSettings):
|
|
|
11
11
|
"""Configuration from ursaproxy.toml file and/or environment variables.
|
|
12
12
|
|
|
13
13
|
Settings are loaded in this priority order (highest to lowest):
|
|
14
|
-
1.
|
|
15
|
-
2.
|
|
16
|
-
3.
|
|
14
|
+
1. Constructor arguments (e.g., Settings(bearblog_url="..."))
|
|
15
|
+
2. Environment variables (e.g., BEARBLOG_URL)
|
|
16
|
+
3. ursaproxy.toml file in current directory
|
|
17
|
+
4. Default values
|
|
17
18
|
|
|
18
19
|
Example ursaproxy.toml:
|
|
19
20
|
bearblog_url = "https://example.bearblog.dev"
|
|
@@ -57,9 +58,10 @@ class Settings(BaseSettings):
|
|
|
57
58
|
) -> tuple[PydanticBaseSettingsSource, ...]:
|
|
58
59
|
"""Configure settings sources with TOML file support.
|
|
59
60
|
|
|
60
|
-
Priority (highest to lowest): env vars -> TOML file -> defaults.
|
|
61
|
+
Priority (highest to lowest): init args -> env vars -> TOML file -> defaults.
|
|
61
62
|
"""
|
|
62
63
|
return (
|
|
64
|
+
init_settings,
|
|
63
65
|
env_settings,
|
|
64
66
|
TomlConfigSettingsSource(settings_cls),
|
|
65
67
|
)
|
|
@@ -94,6 +96,6 @@ def load_settings() -> Settings:
|
|
|
94
96
|
dotenv_settings: PydanticBaseSettingsSource,
|
|
95
97
|
file_secret_settings: PydanticBaseSettingsSource,
|
|
96
98
|
) -> tuple[PydanticBaseSettingsSource, ...]:
|
|
97
|
-
return (env_settings
|
|
99
|
+
return (init_settings, env_settings)
|
|
98
100
|
|
|
99
101
|
return _EnvOnlySettings() # type: ignore[call-arg]
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
ursaproxy/__init__.py,sha256=6YbaViq9c7W-s4iQlNkOSEY_0QFIy_3rOh37nE0qWw8,7433
|
|
2
2
|
ursaproxy/cache.py,sha256=Q5cypE91xGte1ph-_NqcEwZ0NoT7_LszYT1DVpfd2bM,1205
|
|
3
|
-
ursaproxy/config.py,sha256=
|
|
3
|
+
ursaproxy/config.py,sha256=heSD1a2jn2QX41NdmeiaeLIR1M5IDJtwp7BonDgvEFM,3440
|
|
4
4
|
ursaproxy/converter.py,sha256=FAW0fA7a3WtlPYMtZbDlsM0Gl7twXK73DAV911R7SPI,1955
|
|
5
5
|
ursaproxy/fetcher.py,sha256=Qj-1bSG0nfqtL30fdVI-yITYcNSj3IEmNP1W9Z964fs,1851
|
|
6
6
|
ursaproxy/templates/about.gmi,sha256=hJxK25i9uXr2geBo1HrdkLztqkebICDy-_bdnQ4jlGI,105
|
|
7
7
|
ursaproxy/templates/feed.xml,sha256=0aiFNOfgHeMH0427LPc58pEf0NdvcDHIRa-x9tc_Ty8,597
|
|
8
8
|
ursaproxy/templates/index.gmi,sha256=2J-1lQRcwoxr46bqasW969RPpo_X5n2sh9sVuXIMdFg,265
|
|
9
9
|
ursaproxy/templates/post.gmi,sha256=DMPbqZl52v-G-6wmwbXh15kg8dYpTDUx3mfqkce-HhQ,133
|
|
10
|
-
ursaproxy-0.
|
|
11
|
-
ursaproxy-0.
|
|
12
|
-
ursaproxy-0.
|
|
13
|
-
ursaproxy-0.
|
|
10
|
+
ursaproxy-0.4.0.dist-info/WHEEL,sha256=iHtWm8nRfs0VRdCYVXocAWFW8ppjHL-uTJkAdZJKOBM,80
|
|
11
|
+
ursaproxy-0.4.0.dist-info/entry_points.txt,sha256=uM3A9bQS-p_6VhWbkFRtob2oN-SuBboJWS3ZwCjlAFk,46
|
|
12
|
+
ursaproxy-0.4.0.dist-info/METADATA,sha256=bZgicovVbZZ4dYESy81HoYlcnW_YU3CsYpHFZwQgbgA,5682
|
|
13
|
+
ursaproxy-0.4.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|