PyQuantimClient 2.0.72__py3-none-any.whl → 2.0.73__py3-none-any.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.
PyQuantimClient/risk.py CHANGED
@@ -95,6 +95,43 @@ class risk_data(quantim):
95
95
  raise ValueError("Error: No se ha podido iniciar el proceso de var formato 386 o ya existe una ejecución en curso. Intente de nuevo en algunos minutos.")
96
96
  return None
97
97
 
98
+ def run_pat(self, start_date, end_date, country="CO"):
99
+ '''
100
+ Run performance colombia.
101
+ '''
102
+ # Validación de formato
103
+ try:
104
+ dt.datetime.strptime(start_date, "%Y-%m-%d")
105
+ except:
106
+ raise ValueError(f"start_date '{start_date}' no tiene el formato string yyyy-mm-dd")
107
+
108
+ try:
109
+ dt.datetime.strptime(end_date, "%Y-%m-%d")
110
+ except:
111
+ raise ValueError(f"end_date '{end_date}' no tiene el formato string yyyy-mm-dd")
112
+
113
+ data = {
114
+ 'jobname': 'job_proc_pat',
115
+ "add_args": {
116
+ "--countries": f'["{country}"]',
117
+ "--start_date": start_date,
118
+ "--end_date": end_date
119
+ }
120
+ }
121
+
122
+ try:
123
+ resp = self.api_call('run_glue_job', method="post", data=data, verify=False)
124
+ msg = (
125
+ f"La ejecucion performance para {country} entre las fechas {start_date} - {end_date} se ha activado exitosamente"
126
+ if resp['status'] == 'RUNNING'
127
+ else "Error: No se ha podido iniciar el proceso performance o ya existe una ejecución en curso. Intente de nuevo en algunos minutos."
128
+ )
129
+ print(msg)
130
+ except:
131
+ raise ValueError("Error: No se ha podido iniciar el proceso performance o ya existe una ejecución en curso. Intente de nuevo en algunos minutos.")
132
+
133
+ return None
134
+
98
135
  def get_portfolio(self, client_id=None, port_type=None, ref_date=None):
99
136
  '''
100
137
  Get portfolio
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyQuantimClient
3
- Version: 2.0.72
3
+ Version: 2.0.73
4
4
  Summary: Python client to access quantIM services
5
5
  Author: Daniel Velasquez
6
6
  Author-email: daniel.velasquez@sura-im.com
@@ -13,9 +13,9 @@ PyQuantimClient/preprocess_co.py,sha256=sdQuuxK1bfjY-Wp87xt7f9yFN_9WiJf4QiBNGy-4
13
13
  PyQuantimClient/private_debt.py,sha256=Eeg7CgXa_mE0DTvvOfsVH_I0s_3cmkrVAOczBxznCzU,683
14
14
  PyQuantimClient/product.py,sha256=fTachNfN35m4peLtXm7WAWgERxfBITYNsb4agW4bZuM,929
15
15
  PyQuantimClient/returns.py,sha256=r2PruoqvPdfZ4uGgWb0rA9nz4wUXf5R5rDLPYjlpXOM,3143
16
- PyQuantimClient/risk.py,sha256=GKR5IYFSHN77g6ErFNjpum8bjfVOxS58B5eIVih-pzw,17815
16
+ PyQuantimClient/risk.py,sha256=9fOqe5QEXfxYRRG6F8x6S-dVqLVSeT6yNCyOXS7AQvo,19251
17
17
  PyQuantimClient/utils.py,sha256=d_hyKTeHzQuPVusrbZJEhtbp6srninQCErKDfe6HH2w,941
18
- pyquantimclient-2.0.72.dist-info/METADATA,sha256=CrrZoh7Qb_hbnKky1mThDiI5tQuQ8SAeeY7RGEJNKf4,447
19
- pyquantimclient-2.0.72.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
20
- pyquantimclient-2.0.72.dist-info/top_level.txt,sha256=WbmxYSegJ1EfH-TJOqtF0mzYevWDeaMoJ4ZAzQaOTDE,16
21
- pyquantimclient-2.0.72.dist-info/RECORD,,
18
+ pyquantimclient-2.0.73.dist-info/METADATA,sha256=VFHDdMWewxeGOR4Y2vBJWCIj93EmEXhb3SMlhaZxIjI,447
19
+ pyquantimclient-2.0.73.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
20
+ pyquantimclient-2.0.73.dist-info/top_level.txt,sha256=WbmxYSegJ1EfH-TJOqtF0mzYevWDeaMoJ4ZAzQaOTDE,16
21
+ pyquantimclient-2.0.73.dist-info/RECORD,,