From e6ad6c7a2618dae2e6e16e9eb15c736917526a40 Mon Sep 17 00:00:00 2001 From: Yerassyl Zhanymkanov Date: Fri, 19 Aug 2022 01:34:56 +0600 Subject: [PATCH] Update wordings --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a74305a..38dff63 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ ## WIP: FastAPI Best Practices -Opinionated list of best practices and conventions we have developed after 1.5 years in production. +Opinionated list of best practices and conventions we have used after 1.5 years in production. ### 1. Project Structure. Group files by module domain, not file types. I didn't like the project structure presented by @tiangolo, where we separate files by their type (e.g. api, crud, models, schemas). @@ -483,7 +483,7 @@ DATABASE_URL = config("DATABASE_URL") IS_GOOD_ENV = config("IS_GOOD_ENV", cast=bool, default=True) ALLOWED_CORS_ORIGINS = config( "CORS_ORIGINS", - cast=lambda x: x.split(","), + cast=lambda x: x.split(","), # if no env, it first sets default value, only then it casts it with this lambda default="https://mysite.com,https://mysite.org", ) ``` @@ -510,7 +510,7 @@ Set the async test client immediately, e.g. [asyn_asgi_testclient](https://githu import pytest from async_asgi_testclient import TestClient -from src.main import app # initted FastAPI app +from src.main import app # inited FastAPI app @pytest.fixture