mirror of
https://github.com/PR0M3TH3AN/python_charts.git
synced 2026-10-27 08:50:39 +00:00
Add constants module and use for db path
This commit is contained in:
1 parent
0ac611eed0
commit
1a7449ee5b
6 files changed
+46
-17
No files matched your search
+3
-1
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user