Skip to main content
Glama
database.py521 B
import os from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker, declarative_base DATABASE_URL = os.getenv( "DATABASE_URL", "postgresql+psycopg2://postgres:password@localhost:5432/aegisflood_mvp", ) engine = create_engine(DATABASE_URL, pool_pre_ping=True, future=True) SessionLocal = sessionmaker(bind=engine, autoflush=False, autocommit=False, future=True) Base = declarative_base() def get_db(): db = SessionLocal() try: yield db finally: db.close()

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sudhans18/AegisFlood-Flood-Prediction-Community-Alert-System'

If you have feedback or need assistance with the MCP directory API, please join our Discord server