Ibraaheem's picture
Create database.py
494c3ed
raw
history blame contribute delete
602 Bytes
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from sqlalchemy.ext.declarative import declarative_base
import os
# db_file_path = 'chatbot_users.db'
# if os.path.exists(db_file_path):
# print(f"Database file {db_file_path} exists.")
# else:
# print(f"Database file {db_file_path} does not exist.")
# SQLALCHEMY_DATABASE_URL = 'sqlite:///./chatbot_users.db'
# engine = create_engine(SQLALCHEMY_DATABASE_URL, connect_args={'check_same_thread': False})
# SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
# Base = declarative_base()