aboutsummaryrefslogtreecommitdiffstats
path: root/datamaps/api/api.py
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2019-09-27 15:12:57 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2019-09-27 15:12:57 +0100
commitd4272b28da76c2d1fe110d611ef08a445f11ceb2 (patch)
treeaf01f431bd39504bb2d9234c7c6a41879b95051f /datamaps/api/api.py
initial commit
Diffstat (limited to 'datamaps/api/api.py')
-rw-r--r--datamaps/api/api.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/datamaps/api/api.py b/datamaps/api/api.py
new file mode 100644
index 0000000..59458e7
--- /dev/null
+++ b/datamaps/api/api.py
@@ -0,0 +1,14 @@
+from ..core import Master, Quarter
+
+
+def project_data_from_master_api(master_file: str, quarter: int, year: int):
+ """Create a Master object directly without the need to explicitly pass
+ a Quarter object.
+
+ Args:
+ master_file (str): the path to a master file
+ quarter (int): an integer representing the financial quarter
+ year (int): an integer representing the year
+ """
+ m = Master(Quarter(quarter, year), master_file)
+ return m