Initial commit

This commit is contained in:
Carlos Rivas 2024-08-21 12:53:19 -07:00
commit 7d443e57a6
8 changed files with 26 additions and 0 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
.venv
*.pyc

0
app.py Normal file
View file

21
database.py Normal file
View file

@ -0,0 +1,21 @@
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
SQLITE_DATABASE_URL = "sqlite:///./flosms.db"
engine = create_engine(
SQLITE_DATABASE_URL, echo=True, connect_args={"check_same_thread": False}
)
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
Base = declarative_base()
def get_db():
db = SessionLocal()
try:
yield db
finally:
db.close()

0
models.py Normal file
View file

3
requirements.txt Normal file
View file

@ -0,0 +1,3 @@
fastapi
python-dotenv
sqlalchemy

0
schemas.py Normal file
View file

0
service.py Normal file
View file

0
tests.py Normal file
View file