documente_shared 0.1.38__tar.gz → 0.1.40__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 documente_shared might be problematic. Click here for more details.
- {documente_shared-0.1.38 → documente_shared-0.1.40}/PKG-INFO +2 -1
- documente_shared-0.1.40/documente_shared/application/exceptions.py +23 -0
- {documente_shared-0.1.38 → documente_shared-0.1.40}/pyproject.toml +2 -1
- {documente_shared-0.1.38 → documente_shared-0.1.40}/README.md +0 -0
- {documente_shared-0.1.38 → documente_shared-0.1.40}/documente_shared/__init__.py +0 -0
- {documente_shared-0.1.38 → documente_shared-0.1.40}/documente_shared/application/__init__.py +0 -0
- {documente_shared-0.1.38 → documente_shared-0.1.40}/documente_shared/application/digest.py +0 -0
- {documente_shared-0.1.38 → documente_shared-0.1.40}/documente_shared/application/time_utils.py +0 -0
- {documente_shared-0.1.38 → documente_shared-0.1.40}/documente_shared/domain/__init__.py +0 -0
- {documente_shared-0.1.38 → documente_shared-0.1.40}/documente_shared/domain/base_enum.py +0 -0
- {documente_shared-0.1.38 → documente_shared-0.1.40}/documente_shared/domain/entities/__init__.py +0 -0
- {documente_shared-0.1.38 → documente_shared-0.1.40}/documente_shared/domain/entities/document_process.py +0 -0
- {documente_shared-0.1.38 → documente_shared-0.1.40}/documente_shared/domain/entities/document_process_metadata.py +0 -0
- {documente_shared-0.1.38 → documente_shared-0.1.40}/documente_shared/domain/enums.py +0 -0
- {documente_shared-0.1.38 → documente_shared-0.1.40}/documente_shared/domain/repositories.py +0 -0
- {documente_shared-0.1.38 → documente_shared-0.1.40}/documente_shared/infrastructure/__init__.py +0 -0
- {documente_shared-0.1.38 → documente_shared-0.1.40}/documente_shared/infrastructure/dynamo_repositories.py +0 -0
- {documente_shared-0.1.38 → documente_shared-0.1.40}/documente_shared/infrastructure/dynamo_table.py +0 -0
- {documente_shared-0.1.38 → documente_shared-0.1.40}/documente_shared/infrastructure/s3_bucket.py +0 -0
- {documente_shared-0.1.38 → documente_shared-0.1.40}/documente_shared/infrastructure/sqs_queue.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: documente_shared
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.40
|
|
4
4
|
Summary: Shared utilities for Documente AI projects
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: Tech
|
|
@@ -13,6 +13,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.12
|
|
14
14
|
Requires-Dist: boto3 (>=1.34.102,<2.0.0)
|
|
15
15
|
Requires-Dist: botocore (>=1.34.102,<2.0.0)
|
|
16
|
+
Requires-Dist: sentry-sdk (>=1.0.0,<2.0.0)
|
|
16
17
|
Description-Content-Type: text/markdown
|
|
17
18
|
|
|
18
19
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import sentry_sdk
|
|
2
|
+
from functools import wraps
|
|
3
|
+
from typing import Callable, Any, TypeVar
|
|
4
|
+
|
|
5
|
+
F = TypeVar("F", bound=Callable[..., Any])
|
|
6
|
+
|
|
7
|
+
def initialize_sentry(dsn: str, environment: str = 'dev') -> None:
|
|
8
|
+
if not sentry_sdk.Hub.current.client:
|
|
9
|
+
sentry_sdk.init(
|
|
10
|
+
dsn=dsn,
|
|
11
|
+
environment=environment,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
def track_exceptions(func: F) -> F:
|
|
15
|
+
@wraps(func)
|
|
16
|
+
def wrapper(*args: Any, **kwargs: Any) -> Any:
|
|
17
|
+
try:
|
|
18
|
+
return func(*args, **kwargs)
|
|
19
|
+
except Exception as e:
|
|
20
|
+
sentry_sdk.capture_exception(e)
|
|
21
|
+
sentry_sdk.flush()
|
|
22
|
+
raise
|
|
23
|
+
return wrapper # type: ignore
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "documente_shared"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.40"
|
|
4
4
|
description = "Shared utilities for Documente AI projects"
|
|
5
5
|
authors = ["Tech <tech@llamitai.com>"]
|
|
6
6
|
license = "MIT"
|
|
@@ -10,6 +10,7 @@ readme = "README.md"
|
|
|
10
10
|
python = ">=3.10,<3.13"
|
|
11
11
|
boto3 = "^1.34.102"
|
|
12
12
|
botocore = "^1.34.102"
|
|
13
|
+
sentry-sdk = "^1.0.0"
|
|
13
14
|
|
|
14
15
|
[tool.poetry.dev-dependencies]
|
|
15
16
|
pytest = "^6.0"
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.38 → documente_shared-0.1.40}/documente_shared/application/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.38 → documente_shared-0.1.40}/documente_shared/application/time_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.38 → documente_shared-0.1.40}/documente_shared/domain/entities/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.38 → documente_shared-0.1.40}/documente_shared/infrastructure/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.38 → documente_shared-0.1.40}/documente_shared/infrastructure/dynamo_table.py
RENAMED
|
File without changes
|
{documente_shared-0.1.38 → documente_shared-0.1.40}/documente_shared/infrastructure/s3_bucket.py
RENAMED
|
File without changes
|
{documente_shared-0.1.38 → documente_shared-0.1.40}/documente_shared/infrastructure/sqs_queue.py
RENAMED
|
File without changes
|