tallyfy 1.0.1__py3-none-any.whl → 1.0.2__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 tallyfy might be problematic. Click here for more details.
- tallyfy/BUILD.md +5 -0
- tallyfy/README.md +1 -1
- tallyfy/core.py +0 -1
- tallyfy/models.py +63 -0
- tallyfy/template_management.py +28 -1
- {tallyfy-1.0.1.dist-info → tallyfy-1.0.2.dist-info}/METADATA +2 -2
- tallyfy-1.0.2.dist-info/RECORD +14 -0
- tallyfy-1.0.1.dist-info/RECORD +0 -13
- {tallyfy-1.0.1.dist-info → tallyfy-1.0.2.dist-info}/WHEEL +0 -0
- {tallyfy-1.0.1.dist-info → tallyfy-1.0.2.dist-info}/licenses/LICENSE +0 -0
- {tallyfy-1.0.1.dist-info → tallyfy-1.0.2.dist-info}/top_level.txt +0 -0
tallyfy/BUILD.md
ADDED
tallyfy/README.md
CHANGED
tallyfy/core.py
CHANGED
tallyfy/models.py
CHANGED
|
@@ -1010,4 +1010,67 @@ class SearchResult:
|
|
|
1010
1010
|
starter_id=data.get('starter_id'),
|
|
1011
1011
|
is_oneoff_task=data.get('is_oneoff_task'),
|
|
1012
1012
|
owners=owners
|
|
1013
|
+
)
|
|
1014
|
+
|
|
1015
|
+
|
|
1016
|
+
@dataclass
|
|
1017
|
+
class PaginationLinks:
|
|
1018
|
+
"""Pagination links data model"""
|
|
1019
|
+
next: Optional[str] = None
|
|
1020
|
+
prev: Optional[str] = None
|
|
1021
|
+
|
|
1022
|
+
@classmethod
|
|
1023
|
+
def from_dict(cls, data: Dict[str, Any]) -> 'PaginationLinks':
|
|
1024
|
+
"""Create PaginationLinks instance from dictionary"""
|
|
1025
|
+
return cls(
|
|
1026
|
+
next=data.get('next'),
|
|
1027
|
+
prev=data.get('prev')
|
|
1028
|
+
)
|
|
1029
|
+
|
|
1030
|
+
|
|
1031
|
+
@dataclass
|
|
1032
|
+
class PaginationMeta:
|
|
1033
|
+
"""Pagination metadata model"""
|
|
1034
|
+
total: int
|
|
1035
|
+
count: int
|
|
1036
|
+
per_page: int
|
|
1037
|
+
current_page: int
|
|
1038
|
+
total_pages: int
|
|
1039
|
+
links: Optional[PaginationLinks] = None
|
|
1040
|
+
|
|
1041
|
+
@classmethod
|
|
1042
|
+
def from_dict(cls, data: Dict[str, Any]) -> 'PaginationMeta':
|
|
1043
|
+
"""Create PaginationMeta instance from dictionary"""
|
|
1044
|
+
links_data = data.get('links', {})
|
|
1045
|
+
links = PaginationLinks.from_dict(links_data) if links_data else None
|
|
1046
|
+
|
|
1047
|
+
return cls(
|
|
1048
|
+
total=data.get('total', 0),
|
|
1049
|
+
count=data.get('count', 0),
|
|
1050
|
+
per_page=data.get('per_page', 0),
|
|
1051
|
+
current_page=data.get('current_page', 1),
|
|
1052
|
+
total_pages=data.get('total_pages', 0),
|
|
1053
|
+
links=links
|
|
1054
|
+
)
|
|
1055
|
+
|
|
1056
|
+
|
|
1057
|
+
@dataclass
|
|
1058
|
+
class TemplatesList:
|
|
1059
|
+
"""Templates list response with pagination"""
|
|
1060
|
+
data: List[Template]
|
|
1061
|
+
meta: PaginationMeta
|
|
1062
|
+
|
|
1063
|
+
@classmethod
|
|
1064
|
+
def from_dict(cls, data: Dict[str, Any]) -> 'TemplatesList':
|
|
1065
|
+
"""Create TemplatesListResponse instance from dictionary"""
|
|
1066
|
+
templates_data = data.get('data', [])
|
|
1067
|
+
templates = [Template.from_dict(template_data) for template_data in templates_data]
|
|
1068
|
+
|
|
1069
|
+
meta_data = data.get('meta', {})
|
|
1070
|
+
pagination_meta = meta_data.get('pagination', {})
|
|
1071
|
+
meta = PaginationMeta.from_dict(pagination_meta)
|
|
1072
|
+
|
|
1073
|
+
return cls(
|
|
1074
|
+
data=templates,
|
|
1075
|
+
meta=meta
|
|
1013
1076
|
)
|
tallyfy/template_management.py
CHANGED
|
@@ -3,7 +3,7 @@ Template management functionality for Tallyfy SDK
|
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
5
|
from typing import List, Optional, Dict, Any
|
|
6
|
-
from .models import Template, Step, AutomatedAction, PrerunField, TallyfyError
|
|
6
|
+
from .models import Template, Step, AutomatedAction, PrerunField, TallyfyError, TemplatesList
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class TemplateManagement:
|
|
@@ -100,6 +100,33 @@ class TemplateManagement:
|
|
|
100
100
|
self.sdk.logger.error(f"Failed to get template {template_id} for org {org_id}: {e}")
|
|
101
101
|
raise
|
|
102
102
|
|
|
103
|
+
def get_all_templates(self, org_id: str) -> TemplatesList:
|
|
104
|
+
"""
|
|
105
|
+
Get all templates (checklists) for an organization with pagination metadata.
|
|
106
|
+
|
|
107
|
+
Args:
|
|
108
|
+
org_id: Organization ID
|
|
109
|
+
|
|
110
|
+
Returns:
|
|
111
|
+
TemplatesList object containing list of templates and pagination metadata
|
|
112
|
+
|
|
113
|
+
Raises:
|
|
114
|
+
TallyfyError: If the request fails
|
|
115
|
+
"""
|
|
116
|
+
try:
|
|
117
|
+
endpoint = f"organizations/{org_id}/checklists"
|
|
118
|
+
response_data = self.sdk._make_request('GET', endpoint)
|
|
119
|
+
|
|
120
|
+
if isinstance(response_data, dict):
|
|
121
|
+
return TemplatesList.from_dict(response_data)
|
|
122
|
+
else:
|
|
123
|
+
self.sdk.logger.warning("Unexpected response format for templates list")
|
|
124
|
+
return TemplatesList(data=[], meta=None)
|
|
125
|
+
|
|
126
|
+
except TallyfyError as e:
|
|
127
|
+
self.sdk.logger.error(f"Failed to get all templates for org {org_id}: {e}")
|
|
128
|
+
raise
|
|
129
|
+
|
|
103
130
|
def update_template_metadata(self, org_id: str, template_id: str, **kwargs) -> Optional[Template]:
|
|
104
131
|
"""
|
|
105
132
|
Update template metadata like title, summary, guidance, icons, etc.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tallyfy
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: A comprehensive Python SDK for interacting with the Tallyfy API
|
|
5
5
|
Home-page: https://github.com/tallyfy/tallyfy-sdk
|
|
6
6
|
Author: Tallyfy
|
|
@@ -674,5 +674,5 @@ For bugs, feature requests, or questions:
|
|
|
674
674
|
2. Contact us at: support@tallyfy.com
|
|
675
675
|
---
|
|
676
676
|
|
|
677
|
-
**Version:** 1.0.
|
|
677
|
+
**Version:** 1.0.2
|
|
678
678
|
**Last Updated:** 2025
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
tallyfy/BUILD.md,sha256=38Ley-pN-MPfFAsLT98fV0Sz05JHMmcenXyy7P17tZ0,85
|
|
2
|
+
tallyfy/README.md,sha256=aBmihbXYIgWGUUpSeJzR2FSJWpDK3qMBAdTl8aMbveg,21368
|
|
3
|
+
tallyfy/__init__.py,sha256=E4eHCzUwVOD9r3PQBXHdJv0KYPSNe-2lH7h1yKdUHQ8,492
|
|
4
|
+
tallyfy/core.py,sha256=eFqmK7mO7dOXZeErml5wuaIwd9guXWwzCWnbd03HXgA,16316
|
|
5
|
+
tallyfy/form_fields_management.py,sha256=-ifTFKQuA3pcftKfPAyNCV840DOJPqRvJPsBCDNXbWU,24223
|
|
6
|
+
tallyfy/models.py,sha256=y0QSOcP1pVCQMkbpLXuxBe1hYVgIKAVoLCp0Zr7ayyo,38078
|
|
7
|
+
tallyfy/task_management.py,sha256=DIfhbo8qU3DWzuLKBZtwPlFta_D6Ip9HH3PUltr3T2o,14785
|
|
8
|
+
tallyfy/template_management.py,sha256=peYgh4vkhKT5L_782pPzCpJzE18tFQNnIWQ72lyiovU,121138
|
|
9
|
+
tallyfy/user_management.py,sha256=R7L8Nsszm7htvZDRou7C0zQvgFx0pbNmcjHHyWYbl3g,8581
|
|
10
|
+
tallyfy-1.0.2.dist-info/licenses/LICENSE,sha256=8HUsrXnc3l2sZxhPV9Z1gYinq76Q2Ym7ahYJy57QlLc,1063
|
|
11
|
+
tallyfy-1.0.2.dist-info/METADATA,sha256=DrwoFibvBwdIlPut-JmrlsGp95Zdpmw_UklAy8ihsDo,23252
|
|
12
|
+
tallyfy-1.0.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
13
|
+
tallyfy-1.0.2.dist-info/top_level.txt,sha256=yIycWbR61EZJD0MYRPwUQjOS2XZw5B5jCWx1IP73KcM,8
|
|
14
|
+
tallyfy-1.0.2.dist-info/RECORD,,
|
tallyfy-1.0.1.dist-info/RECORD
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
tallyfy/README.md,sha256=kwsWh6N6FoYbh4hrfF27H3akFzem5eKJ9PJem39g5Y8,21368
|
|
2
|
-
tallyfy/__init__.py,sha256=E4eHCzUwVOD9r3PQBXHdJv0KYPSNe-2lH7h1yKdUHQ8,492
|
|
3
|
-
tallyfy/core.py,sha256=9xA4KbrnrjUbZ_FdxoXVNlz2EobWKr-fdL-wjq2UnUk,16343
|
|
4
|
-
tallyfy/form_fields_management.py,sha256=-ifTFKQuA3pcftKfPAyNCV840DOJPqRvJPsBCDNXbWU,24223
|
|
5
|
-
tallyfy/models.py,sha256=zIcJdvzB0ms8j8KWIHoMxLPllVILIVH42US2csO9g6U,36240
|
|
6
|
-
tallyfy/task_management.py,sha256=DIfhbo8qU3DWzuLKBZtwPlFta_D6Ip9HH3PUltr3T2o,14785
|
|
7
|
-
tallyfy/template_management.py,sha256=Eg2zxcSorcXeSnhMltwu2McG0tt7omL9OUF7lzWK85k,120174
|
|
8
|
-
tallyfy/user_management.py,sha256=R7L8Nsszm7htvZDRou7C0zQvgFx0pbNmcjHHyWYbl3g,8581
|
|
9
|
-
tallyfy-1.0.1.dist-info/licenses/LICENSE,sha256=8HUsrXnc3l2sZxhPV9Z1gYinq76Q2Ym7ahYJy57QlLc,1063
|
|
10
|
-
tallyfy-1.0.1.dist-info/METADATA,sha256=YzZFApKAmX6uiFfNt7v_5D5W64E6RMeOL1DcniUU_Vc,23252
|
|
11
|
-
tallyfy-1.0.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
12
|
-
tallyfy-1.0.1.dist-info/top_level.txt,sha256=yIycWbR61EZJD0MYRPwUQjOS2XZw5B5jCWx1IP73KcM,8
|
|
13
|
-
tallyfy-1.0.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|