Skip to content

Commit

Permalink
fix url
Browse files Browse the repository at this point in the history
  • Loading branch information
giancarloromeo committed Nov 14, 2024
1 parent 3746196 commit 6057dd4
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions packages/settings-library/src/settings_library/s3.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
from typing import Annotated

from pydantic import AnyHttpUrl, BeforeValidator, Field, TypeAdapter
from pydantic import AnyHttpUrl, Field
from pydantic_settings import SettingsConfigDict

from .base import BaseCustomSettings
from .basic_types import IDStr

ANY_HTTP_URL_ADAPTER: TypeAdapter = TypeAdapter(AnyHttpUrl)


class S3Settings(BaseCustomSettings):
S3_ACCESS_KEY: IDStr
S3_BUCKET_NAME: IDStr
S3_ENDPOINT: Annotated[
str, BeforeValidator(lambda x: str(ANY_HTTP_URL_ADAPTER.validate_python(x)))
] | None = Field(default=None, description="do not define if using standard AWS")
S3_ENDPOINT: AnyHttpUrl | None = Field(
default=None, description="do not define if using standard AWS"
)
S3_REGION: IDStr
S3_SECRET_KEY: IDStr

Expand Down

0 comments on commit 6057dd4

Please sign in to comment.