clerk-sdk 0.1.3__tar.gz → 0.1.4__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.
- {clerk_sdk-0.1.3/clerk_sdk.egg-info → clerk_sdk-0.1.4}/PKG-INFO +1 -1
- {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/clerk/decorator/task_decorator.py +9 -3
- {clerk_sdk-0.1.3 → clerk_sdk-0.1.4/clerk_sdk.egg-info}/PKG-INFO +1 -1
- {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/setup.py +1 -1
- {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/LICENSE +0 -0
- {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/MANIFEST.in +0 -0
- {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/README.md +0 -0
- {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/clerk/__init__.py +0 -0
- {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/clerk/client.py +0 -0
- {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/clerk/decorator/__init__.py +0 -0
- {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/clerk/decorator/models.py +0 -0
- {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/clerk/models/__init__.py +0 -0
- {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/clerk/models/document.py +0 -0
- {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/clerk/models/document_statuses.py +0 -0
- {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/clerk/models/file.py +0 -0
- {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/clerk/models/response_model.py +0 -0
- {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/clerk_sdk.egg-info/SOURCES.txt +0 -0
- {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/clerk_sdk.egg-info/dependency_links.txt +0 -0
- {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/clerk_sdk.egg-info/requires.txt +0 -0
- {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/clerk_sdk.egg-info/top_level.txt +0 -0
- {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/pyproject.toml +0 -0
- {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/requirements.txt +0 -0
- {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/setup.cfg +0 -0
|
@@ -12,7 +12,9 @@ def clerk_code():
|
|
|
12
12
|
@wraps(func)
|
|
13
13
|
def wrapper(payload: Optional[ClerkCodePayload] = None) -> ClerkCodePayload:
|
|
14
14
|
# 1. Load payload from file if not provided
|
|
15
|
+
use_pickle = False
|
|
15
16
|
if payload is None:
|
|
17
|
+
use_pickle = True
|
|
16
18
|
try:
|
|
17
19
|
with open(input_pkl, "rb") as f:
|
|
18
20
|
raw_data = pickle.load(f)
|
|
@@ -28,9 +30,12 @@ def clerk_code():
|
|
|
28
30
|
|
|
29
31
|
# 2. Execute function
|
|
30
32
|
try:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
if use_pickle:
|
|
34
|
+
output = func(payload)
|
|
35
|
+
if not isinstance(output, ClerkCodePayload):
|
|
36
|
+
raise TypeError(
|
|
37
|
+
"Function must return a ClerkCodePayload instance."
|
|
38
|
+
)
|
|
34
39
|
except Exception as e:
|
|
35
40
|
output = e
|
|
36
41
|
|
|
@@ -44,6 +49,7 @@ def clerk_code():
|
|
|
44
49
|
# 4. Raise if error or return result
|
|
45
50
|
if isinstance(output, Exception):
|
|
46
51
|
raise output
|
|
52
|
+
|
|
47
53
|
return output
|
|
48
54
|
|
|
49
55
|
return wrapper
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|