documente_shared 0.1.93__py3-none-any.whl → 0.1.94__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 documente_shared might be problematic. Click here for more details.

@@ -7,16 +7,21 @@ from typing import Optional
7
7
  class DocumenteClientMixin(object):
8
8
  api_url: str
9
9
  api_key: str
10
+ tenant: Optional[str] = None
10
11
  session: Optional[Session] = None
11
12
 
12
13
  def __post_init__(self):
13
- self.session = Session()
14
+ if self.session is None:
15
+ self.session = Session()
14
16
  self.session.headers.update(self.get_common_headers())
15
17
 
16
18
 
17
19
  def get_common_headers(self) -> dict:
18
- return {
20
+ common_headers = {
19
21
  "X-Api-Key": self.api_key,
20
22
  "Content-Type": "application/json"
21
23
  }
24
+ if self.tenant:
25
+ common_headers.update({"X-Tenant": self.tenant})
26
+ return common_headers
22
27
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: documente_shared
3
- Version: 0.1.93
3
+ Version: 0.1.94
4
4
  Summary: Shared utilities for Documente AI projects
5
5
  License: MIT
6
6
  Author: Tech
@@ -32,7 +32,7 @@ documente_shared/domain/repositories/document.py,sha256=vJzr6c92gqBzyhaEdjrvnone
32
32
  documente_shared/domain/repositories/processing_case.py,sha256=QcY0LumRokRLmL3IWkOZTgN-LQ-Kku5_v7DWujO1Dfw,778
33
33
  documente_shared/domain/repositories/processing_case_item.py,sha256=uBgJN2fJnZDcKUk018P_Fv25dQRZD5FBxFxsCQNaGAQ,948
34
34
  documente_shared/infrastructure/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
- documente_shared/infrastructure/documente_client.py,sha256=paO66zNelDyA6D6iqTXXFVQ9ERRZoJCGWR3T3hySsaM,503
35
+ documente_shared/infrastructure/documente_client.py,sha256=u6k73yIefuEkCsHULMpVCydFzrSXclf_5oQd2D7CkKU,698
36
36
  documente_shared/infrastructure/dynamo_table.py,sha256=TMQbcuty7wjDMbuhI8PbT0IGXelgELsNTtqTEQeZ824,2112
37
37
  documente_shared/infrastructure/lambdas.py,sha256=sGgkw7Mhvuq2TpbW_RNdf5JvQnuzxWYH6gPOVtQ4DtE,357
38
38
  documente_shared/infrastructure/repositories/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -48,6 +48,6 @@ documente_shared/infrastructure/services/http_scaling.py,sha256=cIo-61nfIwbtO86E
48
48
  documente_shared/infrastructure/sqs_queue.py,sha256=KZWeHZ9zmXmrxoNpOQX7GEdDhZ1knbPXgwSwFwJblGg,1504
49
49
  documente_shared/presentation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
50
  documente_shared/presentation/presenters.py,sha256=GGAEwefmjCIVepsUA2oZOVLxXbhhiISPM0Jgt6dT6O0,423
51
- documente_shared-0.1.93.dist-info/METADATA,sha256=YSvwdn6kKI2_1xOaKGIhUcY4X60uPnJrt0odePZrQvU,920
52
- documente_shared-0.1.93.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
53
- documente_shared-0.1.93.dist-info/RECORD,,
51
+ documente_shared-0.1.94.dist-info/METADATA,sha256=yMOwslRgPg3e61wpNd7-3KFUsSngl_aFBUFch39L7xs,920
52
+ documente_shared-0.1.94.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
53
+ documente_shared-0.1.94.dist-info/RECORD,,