libretificacaotjcore 0.1.34__py3-none-any.whl → 0.1.36__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.
Potentially problematic release.
This version of libretificacaotjcore might be problematic. Click here for more details.
- libretificacaotjcore/services/request_servico_api.py +11 -7
- {libretificacaotjcore-0.1.34.dist-info → libretificacaotjcore-0.1.36.dist-info}/METADATA +1 -1
- {libretificacaotjcore-0.1.34.dist-info → libretificacaotjcore-0.1.36.dist-info}/RECORD +5 -5
- {libretificacaotjcore-0.1.34.dist-info → libretificacaotjcore-0.1.36.dist-info}/WHEEL +0 -0
- {libretificacaotjcore-0.1.34.dist-info → libretificacaotjcore-0.1.36.dist-info}/top_level.txt +0 -0
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import httpx
|
|
2
2
|
|
|
3
|
+
|
|
3
4
|
class RequestServicoApi:
|
|
4
5
|
def __init__(self, url, token):
|
|
5
6
|
self.url = url
|
|
6
7
|
self.token = token
|
|
8
|
+
self.client = httpx.AsyncClient(timeout=120, verify=False)
|
|
7
9
|
|
|
8
10
|
async def handler(self, *, mensagem_atualizacao: dict):
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
print(self.token)
|
|
12
|
+
response = await self.client.post(self.url, json=mensagem_atualizacao)
|
|
13
|
+
|
|
14
|
+
if response.status_code != 200:
|
|
15
|
+
raise Exception(f"Erro ao fazer request ao servico de API: {response.status_code}")
|
|
16
|
+
|
|
17
|
+
await self.close()
|
|
12
18
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return response.json()
|
|
19
|
+
async def close(self):
|
|
20
|
+
await self.client.aclose()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: libretificacaotjcore
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.36
|
|
4
4
|
Summary: Biblioteca para centralizar conexao com filas no rabbit e banco de dados no mongodb para os servicos de retificacao da TJ
|
|
5
5
|
Author-email: Jhonatan Azevedo <dev.azevedo@outlook.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/seu-usuario/libretificacaotjcore
|
|
@@ -15,9 +15,9 @@ libretificacaotjcore/services/crypto_pass_service.py,sha256=9D0vyjan6f_8AfNxGkLp
|
|
|
15
15
|
libretificacaotjcore/services/file_service.py,sha256=14CJokBbrsryQGmL0_unH2QKZpnteEAfxf5CPFdv6cE,2075
|
|
16
16
|
libretificacaotjcore/services/rabbitmq_consumer.py,sha256=XPbOvFR3HySfA1IROLPrsb4AmeHeq1Unthxt44vaqik,1760
|
|
17
17
|
libretificacaotjcore/services/rabbitmq_publisher.py,sha256=xsb9LmIuZizzq5lxnEEZKMK3U952KSQ2oqlTBZi2Lt8,1787
|
|
18
|
-
libretificacaotjcore/services/request_servico_api.py,sha256=
|
|
18
|
+
libretificacaotjcore/services/request_servico_api.py,sha256=G7vnmvOfwrCGL-Jy_5tCKG-l5E00OCkJfkuoa5Y6sHo,613
|
|
19
19
|
libretificacaotjcore/services/s3_service.py,sha256=HKR_jt2H3XdV1PCzo5R5bnhmoQ3I46Yn5IqAvVPhsjs,2946
|
|
20
|
-
libretificacaotjcore-0.1.
|
|
21
|
-
libretificacaotjcore-0.1.
|
|
22
|
-
libretificacaotjcore-0.1.
|
|
23
|
-
libretificacaotjcore-0.1.
|
|
20
|
+
libretificacaotjcore-0.1.36.dist-info/METADATA,sha256=f3LhO06GgojKkclG48eJgtN9ME3FNXpwDJDrcCyLowY,2564
|
|
21
|
+
libretificacaotjcore-0.1.36.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
22
|
+
libretificacaotjcore-0.1.36.dist-info/top_level.txt,sha256=J9vnz_X9OUnxC-eXHiAzlc9xIrWBwZ5bgnIDQIIFY4c,21
|
|
23
|
+
libretificacaotjcore-0.1.36.dist-info/RECORD,,
|
|
File without changes
|
{libretificacaotjcore-0.1.34.dist-info → libretificacaotjcore-0.1.36.dist-info}/top_level.txt
RENAMED
|
File without changes
|