dart-tools 0.7.6__py3-none-any.whl → 0.8.1__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 dart-tools might be problematic. Click here for more details.

dart/dart.py CHANGED
@@ -58,8 +58,8 @@ from .generated.types import UNSET, Response, Unset
58
58
  _APP = "dart-tools"
59
59
  _PROG = "dart"
60
60
 
61
- _PROD_HOST = "https://app.itsdart.com"
62
- _STAG_HOST = "https://stag.itsdart.com"
61
+ _PROD_HOST = "https://app.dartai.com"
62
+ _STAG_HOST = "https://stag.dartai.com"
63
63
  _DEV_HOST = "http://localhost:5173"
64
64
  _HOST_MAP = {"prod": _PROD_HOST, "stag": _STAG_HOST, "dev": _DEV_HOST}
65
65
 
@@ -466,7 +466,7 @@ def _auth_failure_exit() -> NoReturn:
466
466
 
467
467
 
468
468
  def _unknown_failure_exit() -> NoReturn:
469
- _dart_exit("Unknown failure, email\n\n support@itsdart.com\n\nfor help.")
469
+ _dart_exit("Unknown failure, email\n\n support@dartai.com\n\nfor help.")
470
470
 
471
471
 
472
472
  def print_version() -> str:
@@ -20,6 +20,7 @@ from .task import Task
20
20
  from .task_create import TaskCreate
21
21
  from .task_relationships import TaskRelationships
22
22
  from .task_update import TaskUpdate
23
+ from .time_tracking_entry import TimeTrackingEntry
23
24
  from .user import User
24
25
  from .user_space_configuration import UserSpaceConfiguration
25
26
  from .user_space_configuration_custom_property_checkbox_type_def import (
@@ -86,6 +87,7 @@ __all__ = (
86
87
  "TaskCreate",
87
88
  "TaskRelationships",
88
89
  "TaskUpdate",
90
+ "TimeTrackingEntry",
89
91
  "User",
90
92
  "UserSpaceConfiguration",
91
93
  "UserSpaceConfigurationCustomPropertyCheckboxTypeDef",
@@ -0,0 +1,61 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar, Union, cast
3
+
4
+ from attrs import define as _attrs_define
5
+
6
+ T = TypeVar("T", bound="TimeTrackingEntry")
7
+
8
+
9
+ @_attrs_define
10
+ class TimeTrackingEntry:
11
+ """
12
+ Attributes:
13
+ user_duid (str):
14
+ started_at (str):
15
+ finished_at (Union[None, str]):
16
+ """
17
+
18
+ user_duid: str
19
+ started_at: str
20
+ finished_at: Union[None, str]
21
+
22
+ def to_dict(self) -> dict[str, Any]:
23
+ user_duid = self.user_duid
24
+
25
+ started_at = self.started_at
26
+
27
+ finished_at: Union[None, str]
28
+ finished_at = self.finished_at
29
+
30
+ field_dict: dict[str, Any] = {}
31
+ field_dict.update(
32
+ {
33
+ "userDuid": user_duid,
34
+ "startedAt": started_at,
35
+ "finishedAt": finished_at,
36
+ }
37
+ )
38
+
39
+ return field_dict
40
+
41
+ @classmethod
42
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
43
+ d = dict(src_dict)
44
+ user_duid = d.pop("userDuid")
45
+
46
+ started_at = d.pop("startedAt")
47
+
48
+ def _parse_finished_at(data: object) -> Union[None, str]:
49
+ if data is None:
50
+ return data
51
+ return cast(Union[None, str], data)
52
+
53
+ finished_at = _parse_finished_at(d.pop("finishedAt"))
54
+
55
+ time_tracking_entry = cls(
56
+ user_duid=user_duid,
57
+ started_at=started_at,
58
+ finished_at=finished_at,
59
+ )
60
+
61
+ return time_tracking_entry
dart/old.py CHANGED
@@ -124,9 +124,15 @@ def replicate_space(
124
124
  def get_dartboards(space_id: str, include_special: bool = False) -> list[dict]:
125
125
  dart = DartOld()
126
126
 
127
- response = dart.get(_LIST_DARTBOARDS_URL_FRAG, params={"space_duid": space_id})
127
+ response = dart.get(_LIST_DARTBOARDS_URL_FRAG, params={"space_duid": space_id, "limit": 100})
128
128
  response_json = response.json()
129
129
  dartboards = response_json["results"] if response_json is not None else []
130
+ while response_json.get("next") is not None:
131
+ response = dart.get(response_json["next"])
132
+ response_json = response.json()
133
+ if response_json is not None and "results" in response_json:
134
+ dartboards.extend(response_json["results"])
135
+
130
136
  if not include_special:
131
137
  dartboards = [e for e in dartboards if e["kind"] == "Custom"]
132
138
 
@@ -178,9 +184,15 @@ def update_dartboard(dartboard_id: str, *, title: Union[str, None] = None, color
178
184
  def get_folders(space_id: str, *, include_special: Union[bool, None] = False) -> list[dict]:
179
185
  dart = DartOld()
180
186
 
181
- response = dart.get(_LIST_FOLDERS_URL_FRAG, params={"space_duid": space_id})
187
+ response = dart.get(_LIST_FOLDERS_URL_FRAG, params={"space_duid": space_id, "limit": 50})
182
188
  response_json = response.json()
183
189
  folders = response_json["results"] if response_json is not None else []
190
+ while response_json.get("next") is not None:
191
+ response = dart.get(response_json["next"])
192
+ response_json = response.json()
193
+ if response_json is not None and "results" in response_json:
194
+ folders.extend(response_json["results"])
195
+
184
196
  if not include_special:
185
197
  folders = [e for e in folders if e["kind"] == "Other"]
186
198
 
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dart-tools
3
- Version: 0.7.6
3
+ Version: 0.8.1
4
4
  Summary: The Dart CLI and Python Library
5
- Author-email: Dart <software@itsdart.com>
5
+ Author-email: Dart <software@dartai.com>
6
6
  License: MIT License
7
7
 
8
8
  Copyright (c) 2025 Dart
@@ -25,9 +25,9 @@ License: MIT License
25
25
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
26
  SOFTWARE.
27
27
 
28
- Project-URL: Homepage, https://www.itsdart.com/?nr=1
29
- Project-URL: Web App, https://app.itsdart.com/
30
- Project-URL: Help Center, https://help.itsdart.com/
28
+ Project-URL: Homepage, https://www.dartai.com/?nr=1
29
+ Project-URL: Web App, https://app.dartai.com/
30
+ Project-URL: Help Center, https://help.dartai.com/
31
31
  Project-URL: Bugs and Features, https://github.com/its-dart/dart-tools-py/issues
32
32
  Project-URL: Library Source, https://github.com/its-dart/dart-tools-py/
33
33
  Keywords: dart,cli,projectmanagement,taskmanagement
@@ -70,7 +70,7 @@ Dynamic: license-file
70
70
  </p>
71
71
  </div>
72
72
 
73
- [Dart](https://itsdart.com?nr=1) is Project Management powered by AI.
73
+ [Dart](https://dartai.com?nr=1) is Project Management powered by AI.
74
74
 
75
75
  `dart-tools` is the Dart CLI and Python Library. It enables direct integration with Dart through a terminal CLI or through Python.
76
76
 
@@ -127,7 +127,7 @@ This command will mark the referenced task 'Done'. Here `[ID]` is meant to be re
127
127
 
128
128
  ## Using the Python Library
129
129
 
130
- First, set up authentication. Run `dart login` in the terminal for an interactive process. Alternatively, copy your authentication token from [your Dart profile](https://app.itsdart.com/?settings=account) and save that as the `DART_TOKEN` environment variable.
130
+ First, set up authentication. Run `dart login` in the terminal for an interactive process. Alternatively, copy your authentication token from [your Dart profile](https://app.dartai.com/?settings=account) and save that as the `DART_TOKEN` environment variable.
131
131
 
132
132
  Then, you can run something like
133
133
 
@@ -186,13 +186,13 @@ By following these steps, you can use the `dart-tools` Python library within you
186
186
 
187
187
  ## Help and Resources
188
188
 
189
- - [Homepage](https://itsdart.com/?nr=1)
190
- - [Web App](https://app.itsdart.com/)
191
- - [Help Center](https://help.itsdart.com/)
192
- - [Bugs and Features](https://app.itsdart.com/p/r/JFyPnhL9En61)
189
+ - [Homepage](https://dartai.com/?nr=1)
190
+ - [Web App](https://app.dartai.com/)
191
+ - [Help Center](https://help.dartai.com/)
192
+ - [Bugs and Features](https://app.dartai.com/p/r/JFyPnhL9En61)
193
193
  - [Library Source](https://github.com/its-dart/dart-tools-py/)
194
194
  - [Chat on Discord](https://discord.gg/RExv8jEkSh)
195
- - Email us at [support@itsdart.com](mailto:support@itsdart.com)
195
+ - Email us at [support@dartai.com](mailto:support@dartai.com)
196
196
 
197
197
 
198
198
  ## Contributing
@@ -1,7 +1,7 @@
1
1
  dart/__init__.py,sha256=M4oDY_DtfE7s50jXziRxVuL95hE1EKEaWOEmWxy8_Ig,523
2
- dart/dart.py,sha256=pP8Gpir5dAx16ctmTG5TjFgqThd6zbEWmEfS9D6DG34,27292
2
+ dart/dart.py,sha256=MLFFI63heQ16CLCdTxwPTXYBcsnVxJxE2gaAIFsnxDo,27289
3
3
  dart/exception.py,sha256=evN1SFV7Bal5dQIIOnhYA0cRu6jSa0cOCiG7AkHZD5A,85
4
- dart/old.py,sha256=LqwFKYDpNwHlp_0NT9UACmAsx8PwYLyogLmY7YcuzVg,7053
4
+ dart/old.py,sha256=Dx7su_6Qwtw25xgRhm3vnV-mPajqNdXfnLrlRPz7pjE,7609
5
5
  dart/order_manager.py,sha256=WI8YEjdOuEFDNcRCm30INAA5lY8016ttt0yXElGIeUU,1882
6
6
  dart/webhook.py,sha256=1_8m1ik4k7yOHi1mBKUQrTy6RIXCFCuq0QJkoloZEGY,590
7
7
  dart/generated/__init__.py,sha256=8fO-FKZzuZzOUUaqtlgw7k08MUwNLf8Ll-cAt7BgmAU,158
@@ -32,7 +32,7 @@ dart/generated/api/task/retrieve_task.py,sha256=Cmf0FPrbGxzIEO22BrcsixDs_HCEqw07
32
32
  dart/generated/api/task/update_task.py,sha256=5f8wbMwQqRHya7D-iMFOcSL2VF1-flBUIIOYRJ1PjOA,5183
33
33
  dart/generated/api/view/__init__.py,sha256=5vd9uJWAjRqa9xzxzYkLD1yoZ12Ld_bAaNB5WX4fbE8,56
34
34
  dart/generated/api/view/retrieve_view.py,sha256=hQUpYzihR6u9m6Zy02RyHT5UDgPTa8ZvTlyYf-Znm0Y,4454
35
- dart/generated/models/__init__.py,sha256=N2TIgHOFIK2BXWzrogN98OQyD1RPAT0t0pW9LLrDYag,4177
35
+ dart/generated/models/__init__.py,sha256=Xqybr9JFU34LYKFt6buN9rknJJ6uIE-VkEkQj2hNYAE,4253
36
36
  dart/generated/models/comment.py,sha256=kLh7iDCW9uTq4kHxi_MSys4uTBpaZj2k5lIKUTkpSUY,2735
37
37
  dart/generated/models/comment_create.py,sha256=GVC_LWi0_afdJkN0-qZsYFt9RCmU2DjRmKOwTsmAWTo,2138
38
38
  dart/generated/models/concise_doc.py,sha256=xrJIJr4rm_iG0DlmpemBtzDaOxroHC2NgsG-V9CNsX8,2200
@@ -53,6 +53,7 @@ dart/generated/models/task.py,sha256=gdQgA9nplF5lREELSycflnUflQNECMFIazz4b6QO8rw
53
53
  dart/generated/models/task_create.py,sha256=WAgkslCtWfp3nNCLhgBzpZu3FwyodNUhz9rRUQAnEQ4,13175
54
54
  dart/generated/models/task_relationships.py,sha256=EP51ZcmAYa8K-NIG54P_voXOo5a87BUeOMBRE-QN1BQ,3284
55
55
  dart/generated/models/task_update.py,sha256=YCNDEM2xdg4ComkPIFZ74U4m86n7cPZZsw_jLy_ARfg,13418
56
+ dart/generated/models/time_tracking_entry.py,sha256=vvxoHmgKpHDnryE-9_fCHaWZjQT9FyaZ9_YT-zlzm1Y,1470
56
57
  dart/generated/models/user.py,sha256=Vl63zDoadat1k5NtTq3AAI0NMTp5T3DOIAcM5zZXD3o,1552
57
58
  dart/generated/models/user_space_configuration.py,sha256=iFfcWLp2kmSYO3uR92CyeY2BV6mm6FtGSyYeW5y_zZk,16898
58
59
  dart/generated/models/user_space_configuration_custom_property_checkbox_type_def.py,sha256=tW7yyj3vN2_pf_DFLiWDEiXnIwj2P-fPsl9cc4y55uw,2014
@@ -77,9 +78,9 @@ dart/generated/models/wrapped_task.py,sha256=TRlVMxIGhDwSaJlXdMH6q7Vx2hpz7EdiGns
77
78
  dart/generated/models/wrapped_task_create.py,sha256=Oxdot2EwfEuC3l4uo0fAvmyjRNVkXALmWCvfgHI7BcI,1654
78
79
  dart/generated/models/wrapped_task_update.py,sha256=_erGSSR_k6ahF_RFjgLKdyitx5TDQiFw_Ml77zHQdJM,1654
79
80
  dart/generated/models/wrapped_view.py,sha256=zflJxA4UnITM8w-0EObw4AF54yS-c_e5UL6vaikXyG8,1577
80
- dart_tools-0.7.6.dist-info/licenses/LICENSE,sha256=aD_0TnuylEaAHWNURgifNek_ODn5Pg36o9gFdspgHtg,1061
81
- dart_tools-0.7.6.dist-info/METADATA,sha256=jtzQN12Iyx_2kayjnkwwb2fVTQEXm4Ra-1Y4pSqikJc,9008
82
- dart_tools-0.7.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
83
- dart_tools-0.7.6.dist-info/entry_points.txt,sha256=KOVAnDWJbSKn9HoXWQ7x6NfACYzSMGHBBaBxonHEv6w,34
84
- dart_tools-0.7.6.dist-info/top_level.txt,sha256=ZwUQ6QjCyi1i32BJOAkbOA7UfgitLmIwToJGJwZXPrg,5
85
- dart_tools-0.7.6.dist-info/RECORD,,
81
+ dart_tools-0.8.1.dist-info/licenses/LICENSE,sha256=aD_0TnuylEaAHWNURgifNek_ODn5Pg36o9gFdspgHtg,1061
82
+ dart_tools-0.8.1.dist-info/METADATA,sha256=UnhGfEgQST-1gauzSEeAzRYaypepjLuOoGJ--0vejJ8,8996
83
+ dart_tools-0.8.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
84
+ dart_tools-0.8.1.dist-info/entry_points.txt,sha256=KOVAnDWJbSKn9HoXWQ7x6NfACYzSMGHBBaBxonHEv6w,34
85
+ dart_tools-0.8.1.dist-info/top_level.txt,sha256=ZwUQ6QjCyi1i32BJOAkbOA7UfgitLmIwToJGJwZXPrg,5
86
+ dart_tools-0.8.1.dist-info/RECORD,,