From d4272b28da76c2d1fe110d611ef08a445f11ceb2 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Fri, 27 Sep 2019 15:12:57 +0100 Subject: initial commit --- datamaps/api/api.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 datamaps/api/api.py (limited to 'datamaps/api/api.py') 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 -- cgit v1.2.3