mf-market-makers 0.2.35__cp39-abi3-win_amd64.whl → 0.2.37__cp39-abi3-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: mf-market-makers
3
- Version: 0.2.35
3
+ Version: 0.2.37
@@ -1,14 +1,14 @@
1
- mf_market_makers-0.2.35.dist-info/METADATA,sha256=c5kClW3uDqkVy6rkF2zRBUsoKPM-QssmbcP3pOKB9qU,61
2
- mf_market_makers-0.2.35.dist-info/WHEEL,sha256=8_4EnrLvbhzH224YH8WypoB7HFn-vpbwr_zHlr3XUBI,94
1
+ mf_market_makers-0.2.37.dist-info/METADATA,sha256=6x5DdCPNCJ6Hxim38Op3mrTssvxh6vE-h0YaTKjTWwY,61
2
+ mf_market_makers-0.2.37.dist-info/WHEEL,sha256=8_4EnrLvbhzH224YH8WypoB7HFn-vpbwr_zHlr3XUBI,94
3
3
  quant/b3xml.pyi,sha256=nPIpFtWk1j3FDS1qic3ZnbB2OSKv94OKbeJkjBVV8-s,1111
4
4
  quant/calendars.pyi,sha256=swXbvO1Unfw5qUbCCnHHBXE_CletcgYfKp7fM8lvTDE,514
5
5
  quant/market.pyi,sha256=xnm0VkUfMgUg0PCfSEF3OcaKFXVKCzfb6ich53TkG9Q,2939
6
6
  quant/scripts/date_range.py,sha256=zn3mgyt83zHYTY_rJ7rABDIOR31edW7fdc9gLJSTZwo,1597
7
7
  quant/scripts/last_ibovw.py,sha256=7gXFCwoRVYMRZy3OCsc-tKSg7gamZSW6ZDo5JdCJpoI,3640
8
8
  quant/scripts/pdftools.py,sha256=NBjf0VOrD_d50RFZBIZCBk4nETdnO2d66LNErn43Jck,347
9
- quant/scripts/prices.py,sha256=YZiNvCVmN3LJrwUdrheVhNtERQxqiI2yxChp5ZModdY,5957
9
+ quant/scripts/prices.py,sha256=kUsQ8ydzPIwfILC4B0OLq9YWW8o4kKgSrfRXYlNxpUk,6277
10
10
  quant/scripts/__init__.py,sha256=t5cwVV46_iPS6YNqcOkcHrktwTrnT6UsGtIYhG5HFyY,399
11
11
  quant/__init__.py,sha256=TvylQv-AkJAp9WF6Di78fv9K3XX-c5XzEz2bd05geJc,532
12
12
  quant/__init__.pyi,sha256=t5cwVV46_iPS6YNqcOkcHrktwTrnT6UsGtIYhG5HFyY,399
13
- quant/quant.pyd,sha256=BHDsuJIVMEs7ncVmiDtTzFufHTnTNZxVNrZ6ptkrTg0,64791552
14
- mf_market_makers-0.2.35.dist-info/RECORD,,
13
+ quant/quant.pyd,sha256=ExjpkujZ4Ffs7HrDYqpdhE9cMYKJkCI63wuwNzjSmiI,65161216
14
+ mf_market_makers-0.2.37.dist-info/RECORD,,
quant/quant.pyd CHANGED
Binary file
quant/scripts/prices.py CHANGED
@@ -159,23 +159,31 @@ if __name__ == "__main__":
159
159
  url = url_fmt.format(dstr)
160
160
  file_zip = zip_file_fmt.format(dstr)
161
161
  file_zip = f"orig_{file_zip}" if to_unzip else file_zip
162
- try:
163
- logging.info(f"downloading -> {file_zip}")
164
- download(url, file_zip, proxy)
165
- logging.info(f"downloaded -> {file_zip}")
166
-
167
- if to_unzip:
168
- unzip(file_zip)
169
- file_zip = file_zip[5:]
170
-
171
- if dest == "postgres":
172
- for tbl in tables:
173
- postgress_execution(csv_file_fmt, to_csv_fun, dstr, file_zip, tbl)
174
- else:
175
- for tbl in tables:
176
- mssql_execution(file_zip, tbl)
177
-
178
- logging.info(f"removing -> {file_zip}")
179
- os.remove(file_zip)
180
- except Exception as ex:
181
- logging.error(f"Error: {d} {ex}")
162
+ done = False
163
+ max_tries = 10
164
+ while not done and max_tries > 0:
165
+ max_tries = max_tries - 1
166
+ try:
167
+ logging.info(f"downloading -> {file_zip}")
168
+ download(url, file_zip, proxy)
169
+ logging.info(f"downloaded -> {file_zip}")
170
+
171
+ if to_unzip:
172
+ unzip(file_zip)
173
+ file_zip = file_zip[5:]
174
+
175
+ if dest == "postgres":
176
+ for tbl in tables:
177
+ postgress_execution(csv_file_fmt, to_csv_fun, dstr, file_zip, tbl)
178
+ else:
179
+ for tbl in tables:
180
+ mssql_execution(file_zip, tbl)
181
+
182
+ logging.info(f"removing -> {file_zip}")
183
+ os.remove(file_zip)
184
+ done = True
185
+ except zipfile.BadZipFile:
186
+ sleep(5)
187
+ except Exception as ex:
188
+ done = True
189
+ logging.error(f"Error: {d} {ex}")