PyQuantimClient 2.0.12__tar.gz → 2.0.13__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.
- {pyquantimclient-2.0.12 → pyquantimclient-2.0.13}/PKG-INFO +1 -1
- {pyquantimclient-2.0.12 → pyquantimclient-2.0.13}/PyQuantimClient.egg-info/PKG-INFO +1 -1
- {pyquantimclient-2.0.12 → pyquantimclient-2.0.13}/setup.py +1 -1
- {pyquantimclient-2.0.12 → pyquantimclient-2.0.13}/src/api.py +13 -2
- {pyquantimclient-2.0.12 → pyquantimclient-2.0.13}/PyQuantimClient.egg-info/SOURCES.txt +0 -0
- {pyquantimclient-2.0.12 → pyquantimclient-2.0.13}/PyQuantimClient.egg-info/dependency_links.txt +0 -0
- {pyquantimclient-2.0.12 → pyquantimclient-2.0.13}/PyQuantimClient.egg-info/top_level.txt +0 -0
- {pyquantimclient-2.0.12 → pyquantimclient-2.0.13}/README.md +0 -0
- {pyquantimclient-2.0.12 → pyquantimclient-2.0.13}/setup.cfg +0 -0
- {pyquantimclient-2.0.12 → pyquantimclient-2.0.13}/src/__init__.py +0 -0
- {pyquantimclient-2.0.12 → pyquantimclient-2.0.13}/src/alm.py +0 -0
- {pyquantimclient-2.0.12 → pyquantimclient-2.0.13}/src/benchmarks.py +0 -0
- {pyquantimclient-2.0.12 → pyquantimclient-2.0.13}/src/bi.py +0 -0
- {pyquantimclient-2.0.12 → pyquantimclient-2.0.13}/src/credit.py +0 -0
- {pyquantimclient-2.0.12 → pyquantimclient-2.0.13}/src/data.py +0 -0
- {pyquantimclient-2.0.12 → pyquantimclient-2.0.13}/src/energy.py +0 -0
- {pyquantimclient-2.0.12 → pyquantimclient-2.0.13}/src/performance.py +0 -0
- {pyquantimclient-2.0.12 → pyquantimclient-2.0.13}/src/portfolios.py +0 -0
- {pyquantimclient-2.0.12 → pyquantimclient-2.0.13}/src/preprocess_co.py +0 -0
- {pyquantimclient-2.0.12 → pyquantimclient-2.0.13}/src/returns.py +0 -0
- {pyquantimclient-2.0.12 → pyquantimclient-2.0.13}/src/risk.py +0 -0
- {pyquantimclient-2.0.12 → pyquantimclient-2.0.13}/src/utils.py +0 -0
|
@@ -4,7 +4,7 @@ setup(
|
|
|
4
4
|
name='PyQuantimClient',
|
|
5
5
|
packages=['PyQuantimClient'],
|
|
6
6
|
package_dir={'PyQuantimClient': 'src'},
|
|
7
|
-
version='2.0.
|
|
7
|
+
version='2.0.13',
|
|
8
8
|
description='Python client to access quantIM services',
|
|
9
9
|
author='Daniel Velasquez',
|
|
10
10
|
author_email='daniel.velasquez@sura-im.com',
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
import pandas as pd
|
|
3
3
|
import numpy as np
|
|
4
|
-
import requests, json
|
|
4
|
+
import requests, json, mimetypes
|
|
5
|
+
|
|
6
|
+
mimetypes.add_type('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet','.xlsx')
|
|
7
|
+
mimetypes.add_type('application/vnd.ms-excel', '.xls')
|
|
8
|
+
mimetypes.add_type('application/vnd.ms-excel.sheet.macroEnabled.12', '.xlsm')
|
|
9
|
+
mimetypes.add_type('text/csv','.csv')
|
|
10
|
+
mimetypes.add_type('application/vnd.openxmlformats-officedocument.wordprocessingml.document','.docx')
|
|
11
|
+
mimetypes.add_type('application/msword', '.doc')
|
|
12
|
+
mimetypes.add_type('application/pdf', '.pdf')
|
|
5
13
|
|
|
6
14
|
class quantim:
|
|
7
15
|
def __init__(self, username, password, secretpool, env="pdn", api_url=None):
|
|
@@ -105,9 +113,12 @@ class quantim:
|
|
|
105
113
|
print(f"Error with presigned url: {e}")
|
|
106
114
|
return False
|
|
107
115
|
|
|
116
|
+
content_type, _ = mimetypes.guess_type(local_file_path)
|
|
117
|
+
put_headers = {'Content-Type':content_type}
|
|
118
|
+
|
|
108
119
|
with open(local_file_path, 'rb') as file:
|
|
109
120
|
try:
|
|
110
|
-
response = requests.put(presigned_url, data=file, verify=False)
|
|
121
|
+
response = requests.put(presigned_url, data=file, headers=put_headers, verify=False)
|
|
111
122
|
if response.status_code == 200:
|
|
112
123
|
print("File uploaded successfully")
|
|
113
124
|
return True
|
|
File without changes
|
{pyquantimclient-2.0.12 → pyquantimclient-2.0.13}/PyQuantimClient.egg-info/dependency_links.txt
RENAMED
|
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
|