PyQuantimClient 1.0.83__tar.gz → 1.0.85__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyQuantimClient
3
- Version: 1.0.83
3
+ Version: 1.0.85
4
4
  Summary: Python client to access quantIM services
5
5
  Author: Daniel Velasquez
6
6
  Author-email: daniel.velasquez@sura-im.com
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyQuantimClient
3
- Version: 1.0.83
3
+ Version: 1.0.85
4
4
  Summary: Python client to access quantIM services
5
5
  Author: Daniel Velasquez
6
6
  Author-email: daniel.velasquez@sura-im.com
@@ -4,7 +4,7 @@ setup(
4
4
  name='PyQuantimClient',
5
5
  packages=['PyQuantimClient'],
6
6
  package_dir={'PyQuantimClient': 'src'},
7
- version='1.0.83',
7
+ version='1.0.85',
8
8
  description='Python client to access quantIM services',
9
9
  author='Daniel Velasquez',
10
10
  author_email='daniel.velasquez@sura-im.com',
@@ -23,6 +23,7 @@ class quantim:
23
23
  token_url = f"{self.api_url}tokendynamicpool"
24
24
  data = {"username":self.username, "password":self.password, "secretpool":self.secretpool}
25
25
 
26
+ headers = {"Accept": "*/*",'Content-Type': 'application/json', 'Access-Control-Allow-Origin': '*'}
26
27
  access_token_response = requests.post(token_url, data=json.dumps(data), headers=headers, verify=False, allow_redirects=False)
27
28
  tokens = json.loads(access_token_response.text)
28
29
  access_token = tokens['id_token']
@@ -161,6 +161,15 @@ class risk_data(quantim):
161
161
  resp = self.upload_with_presigned_url(file_path, "condor-pat", "inputs/asulado/BD_Isin.csv")
162
162
  return resp
163
163
 
164
+ def load_bs(self, file_path):
165
+ '''
166
+ Load buys and sells.
167
+ '''
168
+ # Load data
169
+ filename = file_path.split("/")[-1]
170
+ resp = self.upload_with_presigned_url(file_path, "condor-sura", f"inputs/portfolios/buy_sell/{filename}")
171
+ return resp
172
+
164
173
  def port_contrib(self, start_date, end_date, names, groupers=["secType"], subgroup=False):
165
174
  '''
166
175
  Portfolio risk an return ex-post contribution.