libretificacaotjcore 0.1.65__tar.gz → 0.1.73__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.
Potentially problematic release.
This version of libretificacaotjcore might be problematic. Click here for more details.
- {libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/PKG-INFO +2 -2
- {libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore/database/config_db.py +15 -1
- {libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore/services/rabbitmq_consumer.py +3 -1
- {libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore/services/request_servico_api.py +4 -3
- {libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore.egg-info/PKG-INFO +2 -2
- {libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/pyproject.toml +2 -2
- {libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/README.md +0 -0
- {libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore/__init__.py +0 -0
- {libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore/database/__init__.py +0 -0
- {libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore/database/arquivo_repository.py +0 -0
- {libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore/database/certificado_repository.py +0 -0
- {libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore/database/depentente_invalido_1210_repository.py +0 -0
- {libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore/database/protocolo_repository.py +0 -0
- {libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore/database/rubrica_repository.py +0 -0
- {libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore/database/solicitacao_xml_repository.py +0 -0
- {libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore/database/tempo_processo_repository.py +0 -0
- {libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore/dtos/__init__.py +0 -0
- {libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore/dtos/arquivo_dto.py +0 -0
- {libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore/dtos/processo_dto.py +0 -0
- {libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore/dtos/solicitacao_dto.py +0 -0
- {libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore/enums/__init__.py +0 -0
- {libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore/enums/e_eventos.py +0 -0
- {libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore/enums/e_fase_retificacao.py +0 -0
- {libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore/services/__init__.py +0 -0
- {libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore/services/crypto_pass_service.py +0 -0
- {libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore/services/file_service.py +0 -0
- {libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore/services/rabbitmq_publisher.py +0 -0
- {libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore/services/s3_service.py +0 -0
- {libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore.egg-info/SOURCES.txt +0 -0
- {libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore.egg-info/dependency_links.txt +0 -0
- {libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore.egg-info/requires.txt +0 -0
- {libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore.egg-info/top_level.txt +0 -0
- {libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: libretificacaotjcore
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.73
|
|
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
|
|
@@ -19,7 +19,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.12
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.13
|
|
21
21
|
Classifier: Operating System :: OS Independent
|
|
22
|
-
Requires-Python: >=3.
|
|
22
|
+
Requires-Python: >=3.11
|
|
23
23
|
Description-Content-Type: text/markdown
|
|
24
24
|
Requires-Dist: aio-pika>=9.5.7
|
|
25
25
|
Requires-Dist: aiofiles>=24.1.0
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import motor.motor_asyncio
|
|
2
|
+
import certifi
|
|
2
3
|
|
|
3
4
|
class ConfigDb:
|
|
4
5
|
def __init__(self, host: str, user: str, password: str, port: int, db_name: str):
|
|
@@ -8,8 +9,21 @@ class ConfigDb:
|
|
|
8
9
|
self.port = port
|
|
9
10
|
self.db_name = db_name
|
|
10
11
|
|
|
12
|
+
auth = f"{self.user}:{self.password}@" if self.user and self.password else ""
|
|
13
|
+
# self.client = motor.motor_asyncio.AsyncIOMotorClient(
|
|
14
|
+
# f"mongodb+srv://{auth}{self.host}",
|
|
15
|
+
# tls=True,
|
|
16
|
+
# tlsCAFile=certifi.where(),
|
|
17
|
+
# tlsAllowInvalidCertificates=False,
|
|
18
|
+
# serverSelectionTimeoutMS=30000,
|
|
19
|
+
# socketTimeoutMS=20000,
|
|
20
|
+
# connectTimeoutMS=20000,
|
|
21
|
+
# retryWrites=True,
|
|
22
|
+
# w='majority'
|
|
23
|
+
# )
|
|
24
|
+
|
|
11
25
|
self.client = motor.motor_asyncio.AsyncIOMotorClient(
|
|
12
|
-
f"mongodb://{self.host}:{self.port}"
|
|
26
|
+
f"mongodb://{auth}{self.host}:{self.port}/"
|
|
13
27
|
)
|
|
14
28
|
self.__db = self.client[self.db_name]
|
|
15
29
|
self.db_initialized = False
|
|
@@ -11,6 +11,7 @@ class RabbitMQConsumer:
|
|
|
11
11
|
username: str,
|
|
12
12
|
password: str,
|
|
13
13
|
vhost: str = "/",
|
|
14
|
+
prefetch_count: int = 1
|
|
14
15
|
):
|
|
15
16
|
self.host = host
|
|
16
17
|
self.queue = queue
|
|
@@ -19,6 +20,7 @@ class RabbitMQConsumer:
|
|
|
19
20
|
self.vhost = vhost
|
|
20
21
|
self.connection = None
|
|
21
22
|
self.channel = None
|
|
23
|
+
self.prefetch_count = prefetch_count
|
|
22
24
|
|
|
23
25
|
async def connect(self):
|
|
24
26
|
self.connection = await aio_pika.connect_robust(
|
|
@@ -29,7 +31,7 @@ class RabbitMQConsumer:
|
|
|
29
31
|
heartbeat=600,
|
|
30
32
|
)
|
|
31
33
|
self.channel = await self.connection.channel()
|
|
32
|
-
await self.channel.set_qos(prefetch_count=
|
|
34
|
+
await self.channel.set_qos(prefetch_count=self.prefetch_count)
|
|
33
35
|
await self.channel.declare_queue(self.queue, durable=True)
|
|
34
36
|
|
|
35
37
|
async def start_consuming(self, callback):
|
|
@@ -5,13 +5,14 @@ class RequestServicoApi:
|
|
|
5
5
|
def __init__(self, url, token):
|
|
6
6
|
self.url = url
|
|
7
7
|
self.token = token
|
|
8
|
-
self.client = httpx.AsyncClient(timeout=
|
|
8
|
+
self.client = httpx.AsyncClient(timeout=1200, verify=False)
|
|
9
|
+
self.status_code_success = [200, 201, 204]
|
|
9
10
|
|
|
10
|
-
async def handler(self, *, mensagem_atualizacao: dict):
|
|
11
|
+
async def handler(self, *, mensagem_atualizacao: dict | list):
|
|
11
12
|
print(self.token)
|
|
12
13
|
response = await self.client.post(self.url, json=mensagem_atualizacao)
|
|
13
14
|
|
|
14
|
-
if response.status_code
|
|
15
|
+
if response.status_code not in self.status_code_success:
|
|
15
16
|
raise Exception(f"Erro ao fazer request ao servico de API: {response.status_code}")
|
|
16
17
|
|
|
17
18
|
await self.close()
|
{libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: libretificacaotjcore
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.73
|
|
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
|
|
@@ -19,7 +19,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.12
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.13
|
|
21
21
|
Classifier: Operating System :: OS Independent
|
|
22
|
-
Requires-Python: >=3.
|
|
22
|
+
Requires-Python: >=3.11
|
|
23
23
|
Description-Content-Type: text/markdown
|
|
24
24
|
Requires-Dist: aio-pika>=9.5.7
|
|
25
25
|
Requires-Dist: aiofiles>=24.1.0
|
|
File without changes
|
{libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore/__init__.py
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
|
{libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore/dtos/__init__.py
RENAMED
|
File without changes
|
{libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore/dtos/arquivo_dto.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore/enums/__init__.py
RENAMED
|
File without changes
|
{libretificacaotjcore-0.1.65 → libretificacaotjcore-0.1.73}/libretificacaotjcore/enums/e_eventos.py
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
|