fastapi-factory-utilities 0.3.1__py3-none-any.whl → 0.3.3__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.
@@ -1,9 +1,10 @@
1
1
  """FastAPI Factory Utilities exceptions."""
2
2
 
3
3
  import logging
4
- from typing import Any
4
+ from typing import Any, Sequence
5
5
 
6
6
  from opentelemetry.trace import Span, get_current_span
7
+ from opentelemetry.util.types import AttributeValue
7
8
  from structlog.stdlib import BoundLogger, get_logger
8
9
 
9
10
  _logger: BoundLogger = get_logger()
@@ -39,5 +40,12 @@ class FastAPIFactoryUtilitiesError(Exception):
39
40
  # and it will respond False to the is_recording method
40
41
  if span.is_recording():
41
42
  span.record_exception(self)
43
+ for key, value in kwargs.items():
44
+ attribute_value: AttributeValue
45
+ if not isinstance(value, (str, bool, int, float, Sequence)):
46
+ attribute_value = str(value)
47
+ else:
48
+ attribute_value = value
49
+ span.set_attribute(key, attribute_value)
42
50
  # Call the parent class
43
- super().__init__(*args, **kwargs)
51
+ super().__init__(*args)
@@ -16,6 +16,7 @@ class KratosTraitsObject(BaseModel):
16
16
 
17
17
  email: str
18
18
  username: str
19
+ realm_id: uuid.UUID
19
20
 
20
21
 
21
22
  class KratosIdentityObject(BaseModel):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: fastapi_factory_utilities
3
- Version: 0.3.1
3
+ Version: 0.3.3
4
4
  Summary: Consolidate libraries and utilities to create microservices in Python with FastAPI, Beanie, Httpx, AioPika and OpenTelemetry.
5
5
  License: MIT
6
6
  Keywords: python,fastapi,beanie,httpx,opentelemetry,microservices
@@ -15,7 +15,7 @@ fastapi_factory_utilities/core/app/fastapi_builder.py,sha256=DgIqiCnJK6cqsG-sg4H
15
15
  fastapi_factory_utilities/core/app/plugin_manager/__init__.py,sha256=eMfxCsk41Caw_juAawmDZHhytNI_ubXmqfRDug2AzvQ,319
16
16
  fastapi_factory_utilities/core/app/plugin_manager/exceptions.py,sha256=CFrZvROT7mLzNpXWwDra1j08lA_7ZrSrOHN94sEEfnQ,1026
17
17
  fastapi_factory_utilities/core/app/plugin_manager/plugin_manager.py,sha256=5E_Qp535xNJHNujZ_QRiMfIkDUy9F_3Rbjlclny5P08,6682
18
- fastapi_factory_utilities/core/exceptions.py,sha256=7ntbaMptYn5OOPeKPVR4zU98NIC0j53NQSkqVP1bD68,1362
18
+ fastapi_factory_utilities/core/exceptions.py,sha256=Z2U9m-4H6mhn04r0jfx2P6Aa7ka9alHpfTSeSY3mGjI,1757
19
19
  fastapi_factory_utilities/core/plugins/__init__.py,sha256=W-BCkqP0xG980980z3mc8T6Vrp1Akv4szA0PRzkUbiU,756
20
20
  fastapi_factory_utilities/core/plugins/example/__init__.py,sha256=GF69IygLXxzrCh7VryekEWun663kKBhWtRS3w-1tzBc,1030
21
21
  fastapi_factory_utilities/core/plugins/httpx_plugin/__init__.py,sha256=P5FUyv7mQr8RZWQ8ifkoK8GXvqSI71q2b2dm-ag2JhQ,1028
@@ -37,7 +37,7 @@ fastapi_factory_utilities/core/security/kratos.py,sha256=o6fkl2KfSFT7W_uDAwlLiVF
37
37
  fastapi_factory_utilities/core/services/kratos/__init__.py,sha256=DaC29-Ol0WR5vX56IHLGDXP9UrhISq0Juhg_sJTasw4,368
38
38
  fastapi_factory_utilities/core/services/kratos/enums.py,sha256=ULJppowlZbOjdnUIXQyI4_nHmHZoNnv7-M1CYQBYXFY,220
39
39
  fastapi_factory_utilities/core/services/kratos/exceptions.py,sha256=xAX01-lQvPpADgcwhB5YWSy1UqAxG38s2rlU9AJBJd8,472
40
- fastapi_factory_utilities/core/services/kratos/objects.py,sha256=Dq9aEuwgwz21oLqJ4VWxrBB6ASJ7Xp_MEdyA3UbzWVE,956
40
+ fastapi_factory_utilities/core/services/kratos/objects.py,sha256=a0npt4Q6d9UbF0w3e6EvyKLwMWO2l639_dFjruA8_2c,980
41
41
  fastapi_factory_utilities/core/services/kratos/services.py,sha256=RFKrME6M6omWiHORMBCSyvIG0BsimQaCfnmtsOdFfsg,3158
42
42
  fastapi_factory_utilities/core/services/status/__init__.py,sha256=N5H0cCN9ZFu_0YZar4RLdCDEjKMICrIhNtfKgB0LI78,370
43
43
  fastapi_factory_utilities/core/services/status/enums.py,sha256=IUxWAd0Ecknri4BqzaqoDRRhT_8LdcgtQcNqgNVDXGE,599
@@ -71,8 +71,8 @@ fastapi_factory_utilities/example/models/books/repository.py,sha256=7K63uAsSEGZ2
71
71
  fastapi_factory_utilities/example/services/books/__init__.py,sha256=Z06yNRoA7Zg3TGN-Q9rrvJg6Bbx-qJw661MVwukV6vQ,148
72
72
  fastapi_factory_utilities/example/services/books/services.py,sha256=-x7d4hotUWLzWo5uImMjFmtNcSTHwWv2bfttIbYYKbA,5380
73
73
  fastapi_factory_utilities/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
74
- fastapi_factory_utilities-0.3.1.dist-info/LICENSE,sha256=iO1nLzMMst6vEiqgSUrfrbetM7b0bvdzXhbed5tqG8o,1074
75
- fastapi_factory_utilities-0.3.1.dist-info/METADATA,sha256=EF9C_1EW1EvdkTtdzsKjmOlW4o4BgBfi-RXXNtRERDc,3477
76
- fastapi_factory_utilities-0.3.1.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
77
- fastapi_factory_utilities-0.3.1.dist-info/entry_points.txt,sha256=IK0VcBexXo4uXQmTrbfhhnnfq4GmXPRn0GBB8hzlsq4,101
78
- fastapi_factory_utilities-0.3.1.dist-info/RECORD,,
74
+ fastapi_factory_utilities-0.3.3.dist-info/LICENSE,sha256=iO1nLzMMst6vEiqgSUrfrbetM7b0bvdzXhbed5tqG8o,1074
75
+ fastapi_factory_utilities-0.3.3.dist-info/METADATA,sha256=gmK3S5LekNTtRKgGEqv0mPAw24aeP0l1WyCMDc2_7tM,3477
76
+ fastapi_factory_utilities-0.3.3.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
77
+ fastapi_factory_utilities-0.3.3.dist-info/entry_points.txt,sha256=IK0VcBexXo4uXQmTrbfhhnnfq4GmXPRn0GBB8hzlsq4,101
78
+ fastapi_factory_utilities-0.3.3.dist-info/RECORD,,