Add constants module and use for db path

This commit is contained in:
thePR0M3TH3AN committed 2025-05-31 10:44:08 -04:00
1 parent 0ac611eed0
commit 1a7449ee5b
6 files changed
+46 -17

No files matched your search

+3 -1
View File
@@ -5,6 +5,8 @@ from datetime import datetime
from pathlib import Path
from typing import Iterable
from scripts.constants import DB_PATH_DEFAULT
import matplotlib.pyplot as plt
import pandas as pd
import sqlite3
@@ -28,7 +30,7 @@ def fetch_series_db(
series: Iterable[str],
start: datetime,
end: datetime,
db_path: str | Path = Path("data/fred.db"),
db_path: str | Path = DB_PATH_DEFAULT,
) -> pd.DataFrame:
"""
Load one or more FRED series from a local SQLite DB.