Spaces:
Sleeping
Sleeping
kandi1clickkits
commited on
Commit
·
7f53023
1
Parent(s):
94674d4
chart code with DB
Browse files
main.py
CHANGED
|
@@ -10,12 +10,8 @@ import logging
|
|
| 10 |
|
| 11 |
app = FastAPI()
|
| 12 |
|
| 13 |
-
# Use
|
| 14 |
-
|
| 15 |
-
SQLALCHEMY_DATABASE_URL = f"sqlite:///{database_path}"
|
| 16 |
-
|
| 17 |
-
# Set up logging for debugging
|
| 18 |
-
logging.basicConfig(level=logging.DEBUG)
|
| 19 |
|
| 20 |
engine = create_engine(SQLALCHEMY_DATABASE_URL)
|
| 21 |
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
|
|
|
|
| 10 |
|
| 11 |
app = FastAPI()
|
| 12 |
|
| 13 |
+
# Use SQLite in-memory database
|
| 14 |
+
SQLALCHEMY_DATABASE_URL = "sqlite:///:memory:"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
engine = create_engine(SQLALCHEMY_DATABASE_URL)
|
| 17 |
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
|