fastapi_sqlalchemy_alembic icon indicating copy to clipboard operation
fastapi_sqlalchemy_alembic copied to clipboard

Environment variable configuration should leverage pydantic.BaseConfig

Open skewty opened this issue 5 years ago • 1 comments

https://github.com/ahmednafies/fastapi_sqlalchemy_alembic/blob/c97cca7438faaf20bddf7451f34561b193fdf57f/main.py#L16

The more appropriate way to refer to configuration in environment in FastAPI is via pydantic.BaseConfig. If I am not mistaken that is how FastAPI does things for itself.

skewty avatar Jun 01 '20 18:06 skewty

ohh that is new, I did not know that. thank very much for sharing :)

nf1s avatar Jun 01 '20 20:06 nf1s