numerapi 2.23.1__tar.gz → 2.23.2__tar.gz
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.
- {numerapi-2.23.1 → numerapi-2.23.2}/PKG-INFO +1 -1
- {numerapi-2.23.1 → numerapi-2.23.2}/numerapi/utils.py +4 -2
- {numerapi-2.23.1 → numerapi-2.23.2}/numerapi.egg-info/PKG-INFO +1 -1
- {numerapi-2.23.1 → numerapi-2.23.2}/setup.py +1 -1
- {numerapi-2.23.1 → numerapi-2.23.2}/LICENSE +0 -0
- {numerapi-2.23.1 → numerapi-2.23.2}/README.md +0 -0
- {numerapi-2.23.1 → numerapi-2.23.2}/numerapi/__init__.py +0 -0
- {numerapi-2.23.1 → numerapi-2.23.2}/numerapi/base_api.py +0 -0
- {numerapi-2.23.1 → numerapi-2.23.2}/numerapi/cli.py +0 -0
- {numerapi-2.23.1 → numerapi-2.23.2}/numerapi/cryptoapi.py +0 -0
- {numerapi-2.23.1 → numerapi-2.23.2}/numerapi/numerapi.py +0 -0
- {numerapi-2.23.1 → numerapi-2.23.2}/numerapi/py.typed +0 -0
- {numerapi-2.23.1 → numerapi-2.23.2}/numerapi/signalsapi.py +0 -0
- {numerapi-2.23.1 → numerapi-2.23.2}/numerapi.egg-info/SOURCES.txt +0 -0
- {numerapi-2.23.1 → numerapi-2.23.2}/numerapi.egg-info/dependency_links.txt +0 -0
- {numerapi-2.23.1 → numerapi-2.23.2}/numerapi.egg-info/entry_points.txt +0 -0
- {numerapi-2.23.1 → numerapi-2.23.2}/numerapi.egg-info/requires.txt +0 -0
- {numerapi-2.23.1 → numerapi-2.23.2}/numerapi.egg-info/top_level.txt +0 -0
- {numerapi-2.23.1 → numerapi-2.23.2}/setup.cfg +0 -0
- {numerapi-2.23.1 → numerapi-2.23.2}/tests/test_base_api.py +0 -0
- {numerapi-2.23.1 → numerapi-2.23.2}/tests/test_cli.py +0 -0
- {numerapi-2.23.1 → numerapi-2.23.2}/tests/test_cryptoapi.py +0 -0
- {numerapi-2.23.1 → numerapi-2.23.2}/tests/test_numerapi.py +0 -0
- {numerapi-2.23.1 → numerapi-2.23.2}/tests/test_signalsapi.py +0 -0
- {numerapi-2.23.1 → numerapi-2.23.2}/tests/test_utils.py +0 -0
|
@@ -14,6 +14,8 @@ import tqdm
|
|
|
14
14
|
|
|
15
15
|
logger = logging.getLogger(__name__)
|
|
16
16
|
|
|
17
|
+
DOWNLOAD_CHUNK_SIZE = 1024 * 1024 # 1 MiB
|
|
18
|
+
|
|
17
19
|
|
|
18
20
|
def load_secrets() -> tuple:
|
|
19
21
|
"""load secrets from environment variables or dotenv file"""
|
|
@@ -96,9 +98,9 @@ def download_file(url: str, dest_path: str, show_progress_bars: bool = True):
|
|
|
96
98
|
# Update progress bar to reflect how much of the file is already downloaded
|
|
97
99
|
pbar.update(file_size)
|
|
98
100
|
with open(temp_path, "ab") as dest_file:
|
|
99
|
-
for chunk in req.iter_content(
|
|
101
|
+
for chunk in req.iter_content(DOWNLOAD_CHUNK_SIZE):
|
|
100
102
|
dest_file.write(chunk)
|
|
101
|
-
pbar.update(
|
|
103
|
+
pbar.update(len(chunk))
|
|
102
104
|
# move temp file to target destination
|
|
103
105
|
os.replace(temp_path, dest_path)
|
|
104
106
|
return dest_path
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|