Skip to content

Commit

Permalink
style(Format): formting code
Browse files Browse the repository at this point in the history
  • Loading branch information
gabszs committed Sep 14, 2024
1 parent b9cce37 commit 06e0f39
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
3 changes: 1 addition & 2 deletions app/core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ class Settings(BaseSettings):

DATETIME_FORMAT: str = "%Y-%m-%dT%H:%M:%S"
TEST_DATABASE_URL: str
# TEST_DATABASE_URL: str = "postgresql+asyncpg://app_user:app_password@localhost:5433/app_db"
OPENAI_API_KEY: str


PAGE: int = 1
PAGE_SIZE: int = 20
Expand Down
9 changes: 7 additions & 2 deletions app/main.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
from contextlib import asynccontextmanager

from fastapi import FastAPI
from sqlalchemy.ext.asyncio import AsyncSession
from sqlalchemy import select

from app.core.database import sessionmanager
from app.core.settings import settings
from app.routes.v1 import routers
from app.models import User
from app.models.models_enums import UserRoles
from app.core.security import get_password_hash


def init_app(init_db=True):
Expand All @@ -21,13 +26,13 @@ async def lifespan(app: FastAPI):

app = FastAPI(
title="CV-Api",
description="CV Managment Web api with basic auth crud built by @GabrielCarvalho to my girlfriend",
description="CV Management Web API with basic auth CRUD built by @GabrielCarvalho for my girlfriend",
contact={
"name": "Gabriel Carvalho",
"url": "https://www.linkedin.com/in/gabzsz/",
"email": "[email protected]",
},
summary="WebApi build on best market practices such as TDD, Clean Arch, Data Validation with Pydantic V2",
summary="WebAPI built on best market practices such as TDD, Clean Architecture, Data Validation with Pydantic V2",
lifespan=lifespan,
)
app.include_router(routers)
Expand Down
7 changes: 7 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

# applicate the migrations
alembic upgrade head

# run server
uvicorn --host 0.0.0.0 --port 8000 app.main:app
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.poetry]
name = "corpsystem-test"
name = "authservice"
version = "0.1.0"
description = ""
authors = ["GabrielCarvalho <[email protected]>"]
Expand Down

0 comments on commit 06e0f39

Please sign in to comment.