--FastAPI Table added
	--CHECK register_node
This commit is contained in:
george committed 2026-09-08 17:11:20 +05:30
1 parent 85f2b1884b
commit 7a0e8c7cd6
3 files changed
+104 -3

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker, declarative_base
DATABASE_URL = "postgresql://postgres:postgres@172.16.10.178:5444/postgres"
engine = create_engine(
DATABASE_URL,
pool_pre_ping=True
)
SessionLocal = sessionmaker(
autocommit=False,
autoflush=False,
bind=engine
)
Base = declarative_base()
def get_db():
db = SessionLocal()
try:
yield db
finally:
db.close()