Automated Action 6705b7a5e2 Create Weather Data API with OpenWeatherMap integration
- Implemented FastAPI application structure
- Added OpenWeatherMap API integration
- Created SQLite database with SQLAlchemy
- Setup Alembic for database migrations
- Added health check endpoint
- Created comprehensive README

generated with BackendIM... (backend.im)
2025-05-12 13:51:42 +00:00

13 lines
390 B
Python

from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
from app.core.config import SQLALCHEMY_DATABASE_URL
engine = create_engine(
SQLALCHEMY_DATABASE_URL,
connect_args={"check_same_thread": False}
)
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
Base = declarative_base()