Skip to content

Commit 3c5dd00

Browse files
committed
add settings
1 parent 07bff81 commit 3c5dd00

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ install-deps: ## install dependencies for production
2323

2424
.PHONY: format-check
2525
format-check: ## format check
26-
poetry run black . --check --verbose
26+
poetry run black . --check --extend-exclude client/ --verbose
2727

2828
.PHONY: format
2929
format: ## format code
3030
poetry run isort .
31-
poetry run black . --verbose
31+
poetry run black . --extend-exclude client/ --verbose
3232

3333
.PHONY: fix
3434
fix: format ## apply auto-fixes

azure_storage.env.sample

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
AZURE_STORAGE_ACCOUNT_NAME = "<account-name>"
2+
AZURE_STORAGE_SAS_TOKEN = "<sas-token>"
3+
AZURE_STORAGE_BLOB_CONTAINER_NAME = "<blob-container-name>"

backend/settings/azure_storage.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from pydantic_settings import BaseSettings, SettingsConfigDict
2+
3+
4+
class Settings(BaseSettings):
5+
azure_storage_account_name: str = "<account-name>"
6+
azure_storage_sas_token: str = "<sas-token>"
7+
azure_storage_container_name: str = "<container-name>"
8+
9+
model_config = SettingsConfigDict(
10+
env_file="azure_storage.env",
11+
env_file_encoding="utf-8",
12+
)

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ ignore = ["D203"]
6565
[tool.black]
6666
line-length = 120
6767
target-version = ["py310"]
68-
extend-exclude = ["client"]
68+
69+
[tool.isort]
70+
skip_glob = ["client/*"]
6971

7072
[tool.pytest.ini_options]
7173
addopts = "-ra --cov"

0 commit comments

Comments
 (0)