From fa38960fd7f6d2b626d7a53e88a3d12fecaed455 Mon Sep 17 00:00:00 2001 From: Atticuszz <1831768457@qq.com> Date: Wed, 6 Nov 2024 21:19:48 +0800 Subject: [PATCH] chore: vscode python import --- .vscode/PythonImportHelper-v2-Completion.json | 312 +++++++++--------- 1 file changed, 156 insertions(+), 156 deletions(-) diff --git a/.vscode/PythonImportHelper-v2-Completion.json b/.vscode/PythonImportHelper-v2-Completion.json index 1f4fa7e..ec2c26f 100644 --- a/.vscode/PythonImportHelper-v2-Completion.json +++ b/.vscode/PythonImportHelper-v2-Completion.json @@ -308,6 +308,46 @@ "detail": "gotrue.errors", "documentation": {} }, + { + "label": "settings", + "importPath": "app.core.config", + "description": "app.core.config", + "isExtraImport": true, + "detail": "app.core.config", + "documentation": {} + }, + { + "label": "settings", + "importPath": "app.core.config", + "description": "app.core.config", + "isExtraImport": true, + "detail": "app.core.config", + "documentation": {} + }, + { + "label": "UserIn", + "importPath": "app.schemas.auth", + "description": "app.schemas.auth", + "isExtraImport": true, + "detail": "app.schemas.auth", + "documentation": {} + }, + { + "label": "UserIn", + "importPath": "app.schemas.auth", + "description": "app.schemas.auth", + "isExtraImport": true, + "detail": "app.schemas.auth", + "documentation": {} + }, + { + "label": "UserIn", + "importPath": "app.schemas.auth", + "description": "app.schemas.auth", + "isExtraImport": true, + "detail": "app.schemas.auth", + "documentation": {} + }, { "label": "AsyncClient", "importPath": "supabase._async.client", @@ -380,46 +420,6 @@ "detail": "supabase.lib.client_options", "documentation": {} }, - { - "label": "settings", - "importPath": "app.core.config", - "description": "app.core.config", - "isExtraImport": true, - "detail": "app.core.config", - "documentation": {} - }, - { - "label": "settings", - "importPath": "app.core.config", - "description": "app.core.config", - "isExtraImport": true, - "detail": "app.core.config", - "documentation": {} - }, - { - "label": "UserIn", - "importPath": "app.schemas.auth", - "description": "app.schemas.auth", - "isExtraImport": true, - "detail": "app.schemas.auth", - "documentation": {} - }, - { - "label": "UserIn", - "importPath": "app.schemas.auth", - "description": "app.schemas.auth", - "isExtraImport": true, - "detail": "app.schemas.auth", - "documentation": {} - }, - { - "label": "UserIn", - "importPath": "app.schemas.auth", - "description": "app.schemas.auth", - "isExtraImport": true, - "detail": "app.schemas.auth", - "documentation": {} - }, { "label": "load_dotenv", "importPath": "dotenv", @@ -734,14 +734,6 @@ "detail": "pathlib", "documentation": {} }, - { - "label": "TestClient", - "importPath": "fastapi.testclient", - "description": "fastapi.testclient", - "isExtraImport": true, - "detail": "fastapi.testclient", - "documentation": {} - }, { "label": "app", "importPath": "app.main", @@ -750,6 +742,14 @@ "detail": "app.main", "documentation": {} }, + { + "label": "TestClient", + "importPath": "fastapi.testclient", + "description": "fastapi.testclient", + "isExtraImport": true, + "detail": "fastapi.testclient", + "documentation": {} + }, { "label": "bin_dir", "kind": 5, @@ -834,325 +834,325 @@ { "label": "router", "kind": 5, - "importPath": "app.api.api_v1.endpoints.items", - "description": "app.api.api_v1.endpoints.items", + "importPath": "src.app.api.api_v1.endpoints.items", + "description": "src.app.api.api_v1.endpoints.items", "peekOfCode": "router = APIRouter()\n@router.post(\"/create-item\")\nasync def create_item(item_in: ItemCreate, session: SessionDep) -> Item:\n return await item.create(session, obj_in=item_in)\n@router.get(\"/read-all-item\")\nasync def read_items(session: SessionDep) -> list[Item]:\n return await item.get_all(session)\n@router.get(\"/get-by-id/{id}\")\nasync def read_item_by_id(id: str, session: SessionDep) -> Item | None:\n return await item.get(session, id=id)", - "detail": "app.api.api_v1.endpoints.items", + "detail": "src.app.api.api_v1.endpoints.items", "documentation": {} }, { "label": "api_router", "kind": 5, - "importPath": "app.api.api_v1.api", - "description": "app.api.api_v1.api", + "importPath": "src.app.api.api_v1.api", + "description": "src.app.api.api_v1.api", "peekOfCode": "api_router = APIRouter()\napi_router.include_router(items.router, prefix=\"/items\", tags=[\"items\"])", - "detail": "app.api.api_v1.api", + "detail": "src.app.api.api_v1.api", "documentation": {} }, { "label": "reusable_oauth2", "kind": 5, - "importPath": "app.api.deps", - "description": "app.api.deps", + "importPath": "src.app.api.deps", + "description": "src.app.api.deps", "peekOfCode": "reusable_oauth2 = OAuth2PasswordBearer(\n tokenUrl=\"please login by supabase-js to get token\"\n)\nAccessTokenDep = Annotated[str, Depends(reusable_oauth2)]\nasync def get_current_user(access_token: AccessTokenDep) -> UserIn:\n \"\"\"get current user from access_token and validate same time\"\"\"\n if not super_client:\n raise HTTPException(status_code=500, detail=\"Super client not initialized\")\n user_rsp = await super_client.auth.get_user(jwt=access_token)\n if not user_rsp:", - "detail": "app.api.deps", + "detail": "src.app.api.deps", "documentation": {} }, { "label": "AccessTokenDep", "kind": 5, - "importPath": "app.api.deps", - "description": "app.api.deps", + "importPath": "src.app.api.deps", + "description": "src.app.api.deps", "peekOfCode": "AccessTokenDep = Annotated[str, Depends(reusable_oauth2)]\nasync def get_current_user(access_token: AccessTokenDep) -> UserIn:\n \"\"\"get current user from access_token and validate same time\"\"\"\n if not super_client:\n raise HTTPException(status_code=500, detail=\"Super client not initialized\")\n user_rsp = await super_client.auth.get_user(jwt=access_token)\n if not user_rsp:\n logging.error(\"User not found\")\n raise HTTPException(status_code=404, detail=\"User not found\")\n return UserIn(**user_rsp.user.model_dump(), access_token=access_token)", - "detail": "app.api.deps", + "detail": "src.app.api.deps", "documentation": {} }, { "label": "CurrentUser", "kind": 5, - "importPath": "app.api.deps", - "description": "app.api.deps", + "importPath": "src.app.api.deps", + "description": "src.app.api.deps", "peekOfCode": "CurrentUser = Annotated[UserIn, Depends(get_current_user)]\nasync def get_db(user: CurrentUser) -> AsyncGenerator[AsyncClient, None]:\n client: AsyncClient | None = None\n try:\n client = await create_client(\n settings.SUPABASE_URL,\n settings.SUPABASE_KEY,\n options=ClientOptions(\n postgrest_client_timeout=30,\n storage_client_timeout=30,", - "detail": "app.api.deps", + "detail": "src.app.api.deps", "documentation": {} }, { "label": "SessionDep", "kind": 5, - "importPath": "app.api.deps", - "description": "app.api.deps", + "importPath": "src.app.api.deps", + "description": "src.app.api.deps", "peekOfCode": "SessionDep = Annotated[AsyncClient, Depends(get_db)]", - "detail": "app.api.deps", + "detail": "src.app.api.deps", "documentation": {} }, { "label": "Settings", "kind": 6, - "importPath": "app.core.config", - "description": "app.core.config", + "importPath": "src.app.core.config", + "description": "src.app.core.config", "peekOfCode": "class Settings(BaseSettings):\n API_V1_STR: str = \"/api/v1\"\n SUPABASE_URL: str = Field(default_factory=lambda: os.getenv(\"SUPABASE_URL\"))\n SUPABASE_KEY: str = Field(default_factory=lambda: os.getenv(\"SUPABASE_KEY\"))\n SUPERUSER_EMAIL: str = Field(default_factory=lambda: os.getenv(\"SUPERUSER_EMAIL\"))\n SUPERUSER_PASSWORD: str = Field(default=lambda: os.getenv(\"SUPERUSER_PASSWORD\"))\n # SERVER_NAME: str\n SERVER_HOST: AnyHttpUrl = AnyHttpUrl(\"https://localhost\")\n SERVER_PORT: int = 8000\n # # TODO: the following need to follow the newest version of fastapi", - "detail": "app.core.config", + "detail": "src.app.core.config", "documentation": {} }, { "label": "log_format", "kind": 5, - "importPath": "app.core.config", - "description": "app.core.config", + "importPath": "src.app.core.config", + "description": "src.app.core.config", "peekOfCode": "log_format = logging.Formatter(\"%(asctime)s : %(levelname)s - %(message)s\")\n# root logger\nroot_logger = logging.getLogger()\nroot_logger.setLevel(logging.INFO)\n# standard stream handler\nstream_handler = logging.StreamHandler()\nstream_handler.setFormatter(log_format)\nroot_logger.addHandler(stream_handler)\nlogger = logging.getLogger(__name__)\nload_dotenv()", - "detail": "app.core.config", + "detail": "src.app.core.config", "documentation": {} }, { "label": "root_logger", "kind": 5, - "importPath": "app.core.config", - "description": "app.core.config", + "importPath": "src.app.core.config", + "description": "src.app.core.config", "peekOfCode": "root_logger = logging.getLogger()\nroot_logger.setLevel(logging.INFO)\n# standard stream handler\nstream_handler = logging.StreamHandler()\nstream_handler.setFormatter(log_format)\nroot_logger.addHandler(stream_handler)\nlogger = logging.getLogger(__name__)\nload_dotenv()\nclass Settings(BaseSettings):\n API_V1_STR: str = \"/api/v1\"", - "detail": "app.core.config", + "detail": "src.app.core.config", "documentation": {} }, { "label": "stream_handler", "kind": 5, - "importPath": "app.core.config", - "description": "app.core.config", + "importPath": "src.app.core.config", + "description": "src.app.core.config", "peekOfCode": "stream_handler = logging.StreamHandler()\nstream_handler.setFormatter(log_format)\nroot_logger.addHandler(stream_handler)\nlogger = logging.getLogger(__name__)\nload_dotenv()\nclass Settings(BaseSettings):\n API_V1_STR: str = \"/api/v1\"\n SUPABASE_URL: str = Field(default_factory=lambda: os.getenv(\"SUPABASE_URL\"))\n SUPABASE_KEY: str = Field(default_factory=lambda: os.getenv(\"SUPABASE_KEY\"))\n SUPERUSER_EMAIL: str = Field(default_factory=lambda: os.getenv(\"SUPERUSER_EMAIL\"))", - "detail": "app.core.config", + "detail": "src.app.core.config", "documentation": {} }, { "label": "logger", "kind": 5, - "importPath": "app.core.config", - "description": "app.core.config", + "importPath": "src.app.core.config", + "description": "src.app.core.config", "peekOfCode": "logger = logging.getLogger(__name__)\nload_dotenv()\nclass Settings(BaseSettings):\n API_V1_STR: str = \"/api/v1\"\n SUPABASE_URL: str = Field(default_factory=lambda: os.getenv(\"SUPABASE_URL\"))\n SUPABASE_KEY: str = Field(default_factory=lambda: os.getenv(\"SUPABASE_KEY\"))\n SUPERUSER_EMAIL: str = Field(default_factory=lambda: os.getenv(\"SUPERUSER_EMAIL\"))\n SUPERUSER_PASSWORD: str = Field(default=lambda: os.getenv(\"SUPERUSER_PASSWORD\"))\n # SERVER_NAME: str\n SERVER_HOST: AnyHttpUrl = AnyHttpUrl(\"https://localhost\")", - "detail": "app.core.config", + "detail": "src.app.core.config", "documentation": {} }, { "label": "settings", "kind": 5, - "importPath": "app.core.config", - "description": "app.core.config", + "importPath": "src.app.core.config", + "description": "src.app.core.config", "peekOfCode": "settings = Settings()", - "detail": "app.core.config", + "detail": "src.app.core.config", "documentation": {} }, { "label": "CRUDBase", "kind": 6, - "importPath": "app.crud.base", - "description": "app.crud.base", + "importPath": "src.app.crud.base", + "description": "src.app.crud.base", "peekOfCode": "class CRUDBase(Generic[ModelType, CreateSchemaType, UpdateSchemaType]):\n def __init__(self, model: type[ModelType]):\n self.model = model\n async def get(self, db: AsyncClient, *, id: str) -> ModelType | None:\n \"\"\"get by table_name by id\"\"\"\n data, count = (\n await db.table(self.model.table_name).select(\"*\").eq(\"id\", id).execute()\n )\n _, got = data\n return self.model(**got[0]) if got else None", - "detail": "app.crud.base", + "detail": "src.app.crud.base", "documentation": {} }, { "label": "ModelType", "kind": 5, - "importPath": "app.crud.base", - "description": "app.crud.base", + "importPath": "src.app.crud.base", + "description": "src.app.crud.base", "peekOfCode": "ModelType = TypeVar(\"ModelType\", bound=ResponseBase)\nCreateSchemaType = TypeVar(\"CreateSchemaType\", bound=CreateBase)\nUpdateSchemaType = TypeVar(\"UpdateSchemaType\", bound=UpdateBase)\nclass CRUDBase(Generic[ModelType, CreateSchemaType, UpdateSchemaType]):\n def __init__(self, model: type[ModelType]):\n self.model = model\n async def get(self, db: AsyncClient, *, id: str) -> ModelType | None:\n \"\"\"get by table_name by id\"\"\"\n data, count = (\n await db.table(self.model.table_name).select(\"*\").eq(\"id\", id).execute()", - "detail": "app.crud.base", + "detail": "src.app.crud.base", "documentation": {} }, { "label": "CreateSchemaType", "kind": 5, - "importPath": "app.crud.base", - "description": "app.crud.base", + "importPath": "src.app.crud.base", + "description": "src.app.crud.base", "peekOfCode": "CreateSchemaType = TypeVar(\"CreateSchemaType\", bound=CreateBase)\nUpdateSchemaType = TypeVar(\"UpdateSchemaType\", bound=UpdateBase)\nclass CRUDBase(Generic[ModelType, CreateSchemaType, UpdateSchemaType]):\n def __init__(self, model: type[ModelType]):\n self.model = model\n async def get(self, db: AsyncClient, *, id: str) -> ModelType | None:\n \"\"\"get by table_name by id\"\"\"\n data, count = (\n await db.table(self.model.table_name).select(\"*\").eq(\"id\", id).execute()\n )", - "detail": "app.crud.base", + "detail": "src.app.crud.base", "documentation": {} }, { "label": "UpdateSchemaType", "kind": 5, - "importPath": "app.crud.base", - "description": "app.crud.base", + "importPath": "src.app.crud.base", + "description": "src.app.crud.base", "peekOfCode": "UpdateSchemaType = TypeVar(\"UpdateSchemaType\", bound=UpdateBase)\nclass CRUDBase(Generic[ModelType, CreateSchemaType, UpdateSchemaType]):\n def __init__(self, model: type[ModelType]):\n self.model = model\n async def get(self, db: AsyncClient, *, id: str) -> ModelType | None:\n \"\"\"get by table_name by id\"\"\"\n data, count = (\n await db.table(self.model.table_name).select(\"*\").eq(\"id\", id).execute()\n )\n _, got = data", - "detail": "app.crud.base", + "detail": "src.app.crud.base", "documentation": {} }, { "label": "CRUDItem", "kind": 6, - "importPath": "app.crud.crud_item", - "description": "app.crud.crud_item", + "importPath": "src.app.crud.crud_item", + "description": "src.app.crud.crud_item", "peekOfCode": "class CRUDItem(CRUDBase[Item, ItemCreate, ItemUpdate]):\n async def create(self, db: AsyncClient, *, obj_in: ItemCreate) -> Item:\n return await super().create(db, obj_in=obj_in)\n async def get(self, db: AsyncClient, *, id: str) -> Item | None:\n return await super().get(db, id=id)\n async def get_all(self, db: AsyncClient) -> list[Item]:\n return await super().get_all(db)\n async def get_multi_by_owner(self, db: AsyncClient, *, user: UserIn) -> list[Item]:\n return await super().get_multi_by_owner(db, user=user)\n async def update(self, db: AsyncClient, *, obj_in: ItemUpdate) -> Item:", - "detail": "app.crud.crud_item", + "detail": "src.app.crud.crud_item", "documentation": {} }, { "label": "item", "kind": 5, - "importPath": "app.crud.crud_item", - "description": "app.crud.crud_item", + "importPath": "src.app.crud.crud_item", + "description": "src.app.crud.crud_item", "peekOfCode": "item = CRUDItem(Item)", - "detail": "app.crud.crud_item", + "detail": "src.app.crud.crud_item", "documentation": {} }, { "label": "Token", "kind": 6, - "importPath": "app.schemas.auth", - "description": "app.schemas.auth", + "importPath": "src.app.schemas.auth", + "description": "src.app.schemas.auth", "peekOfCode": "class Token(BaseModel):\n access_token: str | None = None\n refresh_token: str | None = None\n# request\nclass UserIn(Token, User): # type: ignore\n pass\n# Properties to receive via API on creation\n# in\nclass UserCreate(BaseModel):\n pass", - "detail": "app.schemas.auth", + "detail": "src.app.schemas.auth", "documentation": {} }, { "label": "UserIn", "kind": 6, - "importPath": "app.schemas.auth", - "description": "app.schemas.auth", + "importPath": "src.app.schemas.auth", + "description": "src.app.schemas.auth", "peekOfCode": "class UserIn(Token, User): # type: ignore\n pass\n# Properties to receive via API on creation\n# in\nclass UserCreate(BaseModel):\n pass\n# Properties to receive via API on update\n# in\nclass UserUpdate(UserAttributes): # type: ignore\n pass", - "detail": "app.schemas.auth", + "detail": "src.app.schemas.auth", "documentation": {} }, { "label": "UserCreate", "kind": 6, - "importPath": "app.schemas.auth", - "description": "app.schemas.auth", + "importPath": "src.app.schemas.auth", + "description": "src.app.schemas.auth", "peekOfCode": "class UserCreate(BaseModel):\n pass\n# Properties to receive via API on update\n# in\nclass UserUpdate(UserAttributes): # type: ignore\n pass\n# response\nclass UserInDBBase(BaseModel):\n pass\n# Properties to return to client via api", - "detail": "app.schemas.auth", + "detail": "src.app.schemas.auth", "documentation": {} }, { "label": "UserUpdate", "kind": 6, - "importPath": "app.schemas.auth", - "description": "app.schemas.auth", + "importPath": "src.app.schemas.auth", + "description": "src.app.schemas.auth", "peekOfCode": "class UserUpdate(UserAttributes): # type: ignore\n pass\n# response\nclass UserInDBBase(BaseModel):\n pass\n# Properties to return to client via api\n# out\nclass UserOut(Token):\n pass\n# Properties properties stored in DB", - "detail": "app.schemas.auth", + "detail": "src.app.schemas.auth", "documentation": {} }, { "label": "UserInDBBase", "kind": 6, - "importPath": "app.schemas.auth", - "description": "app.schemas.auth", + "importPath": "src.app.schemas.auth", + "description": "src.app.schemas.auth", "peekOfCode": "class UserInDBBase(BaseModel):\n pass\n# Properties to return to client via api\n# out\nclass UserOut(Token):\n pass\n# Properties properties stored in DB\nclass UserInDB(User): # type: ignore\n pass", - "detail": "app.schemas.auth", + "detail": "src.app.schemas.auth", "documentation": {} }, { "label": "UserOut", "kind": 6, - "importPath": "app.schemas.auth", - "description": "app.schemas.auth", + "importPath": "src.app.schemas.auth", + "description": "src.app.schemas.auth", "peekOfCode": "class UserOut(Token):\n pass\n# Properties properties stored in DB\nclass UserInDB(User): # type: ignore\n pass", - "detail": "app.schemas.auth", + "detail": "src.app.schemas.auth", "documentation": {} }, { "label": "UserInDB", "kind": 6, - "importPath": "app.schemas.auth", - "description": "app.schemas.auth", + "importPath": "src.app.schemas.auth", + "description": "src.app.schemas.auth", "peekOfCode": "class UserInDB(User): # type: ignore\n pass", - "detail": "app.schemas.auth", + "detail": "src.app.schemas.auth", "documentation": {} }, { "label": "CreateBase", "kind": 6, - "importPath": "app.schemas.base", - "description": "app.schemas.base", + "importPath": "src.app.schemas.base", + "description": "src.app.schemas.base", "peekOfCode": "class CreateBase(BaseModel):\n # inherent to add more properties for creating\n pass\n# Properties to receive on item update\n# in\nclass UpdateBase(BaseModel):\n # inherent to add more properties for updating\n id: str\n# response\n# Properties shared by models stored in DB", - "detail": "app.schemas.base", + "detail": "src.app.schemas.base", "documentation": {} }, { "label": "UpdateBase", "kind": 6, - "importPath": "app.schemas.base", - "description": "app.schemas.base", + "importPath": "src.app.schemas.base", + "description": "src.app.schemas.base", "peekOfCode": "class UpdateBase(BaseModel):\n # inherent to add more properties for updating\n id: str\n# response\n# Properties shared by models stored in DB\nclass InDBBase(BaseModel):\n id: str\n user_id: str\n created_at: str\n# Properties to return to client", - "detail": "app.schemas.base", + "detail": "src.app.schemas.base", "documentation": {} }, { "label": "InDBBase", "kind": 6, - "importPath": "app.schemas.base", - "description": "app.schemas.base", + "importPath": "src.app.schemas.base", + "description": "src.app.schemas.base", "peekOfCode": "class InDBBase(BaseModel):\n id: str\n user_id: str\n created_at: str\n# Properties to return to client\n# curd model\n# out\nclass ResponseBase(InDBBase):\n # inherent to add more properties for responding\n table_name: ClassVar[str] = \"ResponseBase\".lower()", - "detail": "app.schemas.base", + "detail": "src.app.schemas.base", "documentation": {} }, { "label": "ResponseBase", "kind": 6, - "importPath": "app.schemas.base", - "description": "app.schemas.base", + "importPath": "src.app.schemas.base", + "description": "src.app.schemas.base", "peekOfCode": "class ResponseBase(InDBBase):\n # inherent to add more properties for responding\n table_name: ClassVar[str] = \"ResponseBase\".lower()\n Config: ClassVar[ConfigDict] = ConfigDict(\n extra=\"ignore\", arbitrary_types_allowed=True\n )", - "detail": "app.schemas.base", + "detail": "src.app.schemas.base", "documentation": {} }, { "label": "ItemCreate", "kind": 6, - "importPath": "app.schemas.item", - "description": "app.schemas.item", + "importPath": "src.app.schemas.item", + "description": "src.app.schemas.item", "peekOfCode": "class ItemCreate(CreateBase):\n test_data: str\n# Properties to receive on item update\n# in\nclass ItemUpdate(UpdateBase):\n test_data: str\n# Properties to return to client\n# curd model\n# out\nclass Item(ResponseBase):", - "detail": "app.schemas.item", + "detail": "src.app.schemas.item", "documentation": {} }, { "label": "ItemUpdate", "kind": 6, - "importPath": "app.schemas.item", - "description": "app.schemas.item", + "importPath": "src.app.schemas.item", + "description": "src.app.schemas.item", "peekOfCode": "class ItemUpdate(UpdateBase):\n test_data: str\n# Properties to return to client\n# curd model\n# out\nclass Item(ResponseBase):\n test_data: str\n table_name: ClassVar[str] = \"test_table\"\n# Properties properties stored in DB\nclass ItemInDB(InDBBase):", - "detail": "app.schemas.item", + "detail": "src.app.schemas.item", "documentation": {} }, { "label": "Item", "kind": 6, - "importPath": "app.schemas.item", - "description": "app.schemas.item", + "importPath": "src.app.schemas.item", + "description": "src.app.schemas.item", "peekOfCode": "class Item(ResponseBase):\n test_data: str\n table_name: ClassVar[str] = \"test_table\"\n# Properties properties stored in DB\nclass ItemInDB(InDBBase):\n test_data: str", - "detail": "app.schemas.item", + "detail": "src.app.schemas.item", "documentation": {} }, { "label": "ItemInDB", "kind": 6, - "importPath": "app.schemas.item", - "description": "app.schemas.item", + "importPath": "src.app.schemas.item", + "description": "src.app.schemas.item", "peekOfCode": "class ItemInDB(InDBBase):\n test_data: str", - "detail": "app.schemas.item", + "detail": "src.app.schemas.item", "documentation": {} }, { "label": "Massage", "kind": 6, - "importPath": "app.schemas.msg", - "description": "app.schemas.msg", + "importPath": "src.app.schemas.msg", + "description": "src.app.schemas.msg", "peekOfCode": "class Massage(BaseModel):\n msg: str", - "detail": "app.schemas.msg", + "detail": "src.app.schemas.msg", "documentation": {} }, { "label": "create_app", "kind": 2, - "importPath": "app.main", - "description": "app.main", + "importPath": "src.app.main", + "description": "src.app.main", "peekOfCode": "def create_app() -> FastAPI:\n # init FastAPI with lifespan\n app = FastAPI(\n lifespan=lifespan,\n title=settings.PROJECT_NAME,\n openapi_url=f\"{settings.API_V1_STR}/openapi.json\",\n generate_unique_id_function=lambda router: f\"{router.tags[0]}-{router.name}\",\n )\n # set CORS\n # Set all CORS enabled origins", - "detail": "app.main", + "detail": "src.app.main", "documentation": {} }, { "label": "app", "kind": 5, - "importPath": "app.main", - "description": "app.main", + "importPath": "src.app.main", + "description": "src.app.main", "peekOfCode": "app = create_app()\nif __name__ == \"__main__\":\n host = \"localhost\"\n port = 5000\n uvicorn.run(app, host=host, port=port)", - "detail": "app.main", + "detail": "src.app.main", "documentation": {} }, {