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.
Files changed (23) hide show
  1. {clerk_sdk-0.1.3/clerk_sdk.egg-info → clerk_sdk-0.1.4}/PKG-INFO +1 -1
  2. {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/clerk/decorator/task_decorator.py +9 -3
  3. {clerk_sdk-0.1.3 → clerk_sdk-0.1.4/clerk_sdk.egg-info}/PKG-INFO +1 -1
  4. {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/setup.py +1 -1
  5. {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/LICENSE +0 -0
  6. {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/MANIFEST.in +0 -0
  7. {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/README.md +0 -0
  8. {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/clerk/__init__.py +0 -0
  9. {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/clerk/client.py +0 -0
  10. {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/clerk/decorator/__init__.py +0 -0
  11. {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/clerk/decorator/models.py +0 -0
  12. {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/clerk/models/__init__.py +0 -0
  13. {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/clerk/models/document.py +0 -0
  14. {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/clerk/models/document_statuses.py +0 -0
  15. {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/clerk/models/file.py +0 -0
  16. {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/clerk/models/response_model.py +0 -0
  17. {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/clerk_sdk.egg-info/SOURCES.txt +0 -0
  18. {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/clerk_sdk.egg-info/dependency_links.txt +0 -0
  19. {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/clerk_sdk.egg-info/requires.txt +0 -0
  20. {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/clerk_sdk.egg-info/top_level.txt +0 -0
  21. {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/pyproject.toml +0 -0
  22. {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/requirements.txt +0 -0
  23. {clerk_sdk-0.1.3 → clerk_sdk-0.1.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: clerk-sdk
3
- Version: 0.1.3
3
+ Version: 0.1.4
4
4
  Summary: Library for interacting with Clerk
5
5
  Home-page: https://github.com/F-ONE-Group/clerk_pypi
6
6
  Author: F-ONE Group
@@ -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
- output = func(payload)
32
- if not isinstance(output, ClerkCodePayload):
33
- raise TypeError("Function must return a ClerkCodePayload instance.")
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: clerk-sdk
3
- Version: 0.1.3
3
+ Version: 0.1.4
4
4
  Summary: Library for interacting with Clerk
5
5
  Home-page: https://github.com/F-ONE-Group/clerk_pypi
6
6
  Author: F-ONE Group
@@ -6,7 +6,7 @@ with open("./requirements.txt", "r") as f:
6
6
 
7
7
  setup(
8
8
  name="clerk-sdk",
9
- version="0.1.3",
9
+ version="0.1.4",
10
10
  description="Library for interacting with Clerk",
11
11
  long_description=open("README.md").read(),
12
12
  long_description_content_type="text/markdown",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes