dart-tools 0.7.0__tar.gz → 0.7.1__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 dart-tools might be problematic. Click here for more details.
- {dart_tools-0.7.0 → dart_tools-0.7.1}/PKG-INFO +44 -13
- {dart_tools-0.7.0 → dart_tools-0.7.1}/README.md +20 -11
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/dart.py +40 -42
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/old.py +12 -12
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart_tools.egg-info/PKG-INFO +44 -13
- {dart_tools-0.7.0 → dart_tools-0.7.1}/pyproject.toml +3 -3
- {dart_tools-0.7.0 → dart_tools-0.7.1}/LICENSE +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/__init__.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/exception.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/__init__.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/api/__init__.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/api/comment/__init__.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/api/comment/create_comment.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/api/config/__init__.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/api/config/get_config.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/api/dartboard/__init__.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/api/dartboard/retrieve_dartboard.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/api/doc/__init__.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/api/doc/create_doc.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/api/doc/delete_doc.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/api/doc/list_docs.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/api/doc/retrieve_doc.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/api/doc/update_doc.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/api/folder/__init__.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/api/folder/retrieve_folder.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/api/task/__init__.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/api/task/create_task.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/api/task/delete_task.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/api/task/list_tasks.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/api/task/retrieve_task.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/api/task/update_task.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/api/view/__init__.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/api/view/retrieve_view.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/client.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/errors.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/models/__init__.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/models/comment.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/models/comment_create.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/models/concise_doc.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/models/concise_task.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/models/dartboard.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/models/doc.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/models/doc_create.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/models/doc_update.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/models/folder.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/models/list_docs_o_item.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/models/paginated_concise_doc_list.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/models/paginated_concise_task_list.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/models/priority.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/models/task.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/models/task_create.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/models/task_update.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/models/user.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/models/user_space_configuration.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/models/view.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/models/wrapped_comment.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/models/wrapped_comment_create.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/models/wrapped_dartboard.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/models/wrapped_doc.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/models/wrapped_doc_create.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/models/wrapped_doc_update.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/models/wrapped_folder.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/models/wrapped_task.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/models/wrapped_task_create.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/models/wrapped_task_update.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/models/wrapped_view.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/py.typed +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/generated/types.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/order_manager.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart/webhook.py +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart_tools.egg-info/SOURCES.txt +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart_tools.egg-info/dependency_links.txt +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart_tools.egg-info/entry_points.txt +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart_tools.egg-info/requires.txt +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/dart_tools.egg-info/top_level.txt +0 -0
- {dart_tools-0.7.0 → dart_tools-0.7.1}/setup.cfg +0 -0
|
@@ -1,9 +1,30 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dart-tools
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.1
|
|
4
4
|
Summary: The Dart CLI and Python Library
|
|
5
5
|
Author-email: Dart <software@itsdart.com>
|
|
6
|
-
License
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2023 Dart
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
|
|
7
28
|
Project-URL: Homepage, https://www.itsdart.com/?nr=1
|
|
8
29
|
Project-URL: Web App, https://app.itsdart.com/
|
|
9
30
|
Project-URL: Help Center, https://help.itsdart.com/
|
|
@@ -13,6 +34,7 @@ Keywords: dart,cli,projectmanagement,taskmanagement
|
|
|
13
34
|
Classifier: Development Status :: 4 - Beta
|
|
14
35
|
Classifier: Environment :: Console
|
|
15
36
|
Classifier: Intended Audience :: Developers
|
|
37
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
38
|
Classifier: Natural Language :: English
|
|
17
39
|
Classifier: Operating System :: OS Independent
|
|
18
40
|
Classifier: Programming Language :: Python
|
|
@@ -52,52 +74,63 @@ Dynamic: license-file
|
|
|
52
74
|
|
|
53
75
|
`dart-tools` is the Dart CLI and Python Library. It enables direct integration with Dart through a terminal CLI or through Python.
|
|
54
76
|
|
|
55
|
-
|
|
56
77
|
- [Installation](#installation)
|
|
78
|
+
- [Naming conflicts](#naming-conflicts)
|
|
57
79
|
- [Using the CLI](#using-the-cli)
|
|
58
80
|
- [Using the Python Library](#using-the-python-library)
|
|
59
81
|
- [Using the Python Library in AWS Lambda Functions](#using-the-python-library-in-aws-lambda-functions)
|
|
60
|
-
- [
|
|
82
|
+
- [Navigate to the directory containing your `lambda_function.py` source file. In this example, the directory is named `my_function`.](#navigate-to-the-directory-containing-your-lambda_functionpy-source-file-in-this-example-the-directory-is-named-my_function)
|
|
83
|
+
- [Create a Deployment Package](#create-a-deployment-package)
|
|
84
|
+
- [Zip the contents of the `package` directory along with your `lambda_function.py`](#zip-the-contents-of-the-package-directory-along-with-your-lambda_functionpy)
|
|
85
|
+
- [Deploy the Lambda function](#deploy-the-lambda-function)
|
|
61
86
|
- [Help and Resources](#help-and-resources)
|
|
62
87
|
- [Contributing](#contributing)
|
|
63
88
|
- [License](#license)
|
|
64
89
|
|
|
65
|
-
|
|
66
90
|
## Installation
|
|
67
91
|
|
|
68
92
|
In the terminal, install by running
|
|
93
|
+
|
|
69
94
|
```sh
|
|
70
95
|
pip install dart-tools
|
|
71
96
|
```
|
|
72
97
|
|
|
98
|
+
### Naming conflicts
|
|
99
|
+
|
|
100
|
+
If you have a preexisting shell command named `dart`, a quick fix is to run `which -a dart` and fine the path for this `dart` application. Then you can create an alias and add it to your shell profile file (`.zshrc`, `.bashrc`, etc.). For example, open `~/.zshrc` and add a line like `alias dartai="/path/to/dart"`, save it, and restart your terminal.
|
|
73
101
|
|
|
74
102
|
## Using the CLI
|
|
75
103
|
|
|
76
104
|
Start off by setting up authentication with
|
|
105
|
+
|
|
77
106
|
```sh
|
|
78
107
|
dart login
|
|
79
108
|
```
|
|
80
109
|
|
|
81
110
|
Then, you can create a new task with a command along the lines of
|
|
111
|
+
|
|
82
112
|
```sh
|
|
83
113
|
dart task-create "Update the landing page" -p0 --tag marketing
|
|
84
114
|
```
|
|
115
|
+
|
|
85
116
|
which will make a new task called 'Update the landing page' with priority 'Critical' (i.e. P0) and with the 'marketing' tag.
|
|
86
117
|
|
|
87
118
|
You can explore all of these options and many more with `dart --help` or the more specific help for subcommands, in this case `dart task-create --help`.
|
|
88
119
|
|
|
89
120
|
Another common workflow is to updating a preexisting task. To do this, run something like
|
|
121
|
+
|
|
90
122
|
```sh
|
|
91
123
|
dart task-update [ID] -s Done
|
|
92
124
|
```
|
|
93
|
-
This command will mark the referenced task 'Done'. Here `[ID]` is meant to be replaced (including the brackets) with the ID of an existing task. You can get a ID from any existing task in a number of ways, such as by copying it from the end of a task's URL or by clicking the '...' button in a task page in Dart and then choosing 'Copy ID'.
|
|
94
125
|
|
|
126
|
+
This command will mark the referenced task 'Done'. Here `[ID]` is meant to be replaced (including the brackets) with the ID of an existing task. You can get a ID from any existing task in a number of ways, such as by copying it from the end of a task's URL or by clicking the '...' button in a task page in Dart and then choosing 'Copy ID'.
|
|
95
127
|
|
|
96
128
|
## Using the Python Library
|
|
97
129
|
|
|
98
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.
|
|
99
131
|
|
|
100
132
|
Then, you can run something like
|
|
133
|
+
|
|
101
134
|
```python
|
|
102
135
|
import os
|
|
103
136
|
from dart import create_task, is_logged_in, update_task
|
|
@@ -114,18 +147,17 @@ new_task = create_task(
|
|
|
114
147
|
update_task(new_task.id, status_title="Done")
|
|
115
148
|
```
|
|
116
149
|
|
|
117
|
-
|
|
118
150
|
## Using the Python Library in AWS Lambda Functions
|
|
119
151
|
|
|
120
152
|
To use the `dart-tools` Python library in an AWS Lambda function, you need to package the library with your Lambda deployment package (see more details at [Working with .zip file archives for Python Lambda functions](https://docs.aws.amazon.com/lambda/latest/dg/python-package.html)). Follow these steps:
|
|
121
153
|
|
|
122
|
-
|
|
154
|
+
### Navigate to the directory containing your `lambda_function.py` source file. In this example, the directory is named `my_function`.
|
|
123
155
|
|
|
124
156
|
```sh
|
|
125
157
|
cd my_function
|
|
126
158
|
```
|
|
127
159
|
|
|
128
|
-
|
|
160
|
+
### Create a Deployment Package
|
|
129
161
|
|
|
130
162
|
Use Docker to create a deployment package that includes the `dart-tools` library. Run the following commands in your terminal, ensuring that the `RUNTIME_PYTHON_VERSION` and `RUNTIME_ARCHITECTURE` environment variables match the runtime settings of your Lambda function:
|
|
131
163
|
|
|
@@ -137,7 +169,7 @@ To use the `dart-tools` Python library in an AWS Lambda function, you need to pa
|
|
|
137
169
|
|
|
138
170
|
This command installs the `dart-tools` library into a directory named `package` in your current working directory.
|
|
139
171
|
|
|
140
|
-
|
|
172
|
+
### Zip the contents of the `package` directory along with your `lambda_function.py`
|
|
141
173
|
|
|
142
174
|
```sh
|
|
143
175
|
cd package
|
|
@@ -146,16 +178,15 @@ To use the `dart-tools` Python library in an AWS Lambda function, you need to pa
|
|
|
146
178
|
zip -r my_deployment_package.zip lambda_function.py
|
|
147
179
|
```
|
|
148
180
|
|
|
149
|
-
|
|
181
|
+
### Deploy the Lambda function
|
|
150
182
|
|
|
151
183
|
Upload the `my_deployment_package.zip` file to AWS Lambda using the AWS Management Console or the AWS CLI.
|
|
152
184
|
|
|
153
185
|
By following these steps, you can use the `dart-tools` Python library within your AWS Lambda functions.
|
|
154
186
|
|
|
155
|
-
|
|
156
187
|
## Help and Resources
|
|
157
188
|
|
|
158
|
-
- [Homepage](https://
|
|
189
|
+
- [Homepage](https://itsdart.com/?nr=1)
|
|
159
190
|
- [Web App](https://app.itsdart.com/)
|
|
160
191
|
- [Help Center](https://help.itsdart.com/)
|
|
161
192
|
- [Bugs and Features](https://app.itsdart.com/p/r/JFyPnhL9En61)
|
|
@@ -11,52 +11,63 @@
|
|
|
11
11
|
|
|
12
12
|
`dart-tools` is the Dart CLI and Python Library. It enables direct integration with Dart through a terminal CLI or through Python.
|
|
13
13
|
|
|
14
|
-
|
|
15
14
|
- [Installation](#installation)
|
|
15
|
+
- [Naming conflicts](#naming-conflicts)
|
|
16
16
|
- [Using the CLI](#using-the-cli)
|
|
17
17
|
- [Using the Python Library](#using-the-python-library)
|
|
18
18
|
- [Using the Python Library in AWS Lambda Functions](#using-the-python-library-in-aws-lambda-functions)
|
|
19
|
-
- [
|
|
19
|
+
- [Navigate to the directory containing your `lambda_function.py` source file. In this example, the directory is named `my_function`.](#navigate-to-the-directory-containing-your-lambda_functionpy-source-file-in-this-example-the-directory-is-named-my_function)
|
|
20
|
+
- [Create a Deployment Package](#create-a-deployment-package)
|
|
21
|
+
- [Zip the contents of the `package` directory along with your `lambda_function.py`](#zip-the-contents-of-the-package-directory-along-with-your-lambda_functionpy)
|
|
22
|
+
- [Deploy the Lambda function](#deploy-the-lambda-function)
|
|
20
23
|
- [Help and Resources](#help-and-resources)
|
|
21
24
|
- [Contributing](#contributing)
|
|
22
25
|
- [License](#license)
|
|
23
26
|
|
|
24
|
-
|
|
25
27
|
## Installation
|
|
26
28
|
|
|
27
29
|
In the terminal, install by running
|
|
30
|
+
|
|
28
31
|
```sh
|
|
29
32
|
pip install dart-tools
|
|
30
33
|
```
|
|
31
34
|
|
|
35
|
+
### Naming conflicts
|
|
36
|
+
|
|
37
|
+
If you have a preexisting shell command named `dart`, a quick fix is to run `which -a dart` and fine the path for this `dart` application. Then you can create an alias and add it to your shell profile file (`.zshrc`, `.bashrc`, etc.). For example, open `~/.zshrc` and add a line like `alias dartai="/path/to/dart"`, save it, and restart your terminal.
|
|
32
38
|
|
|
33
39
|
## Using the CLI
|
|
34
40
|
|
|
35
41
|
Start off by setting up authentication with
|
|
42
|
+
|
|
36
43
|
```sh
|
|
37
44
|
dart login
|
|
38
45
|
```
|
|
39
46
|
|
|
40
47
|
Then, you can create a new task with a command along the lines of
|
|
48
|
+
|
|
41
49
|
```sh
|
|
42
50
|
dart task-create "Update the landing page" -p0 --tag marketing
|
|
43
51
|
```
|
|
52
|
+
|
|
44
53
|
which will make a new task called 'Update the landing page' with priority 'Critical' (i.e. P0) and with the 'marketing' tag.
|
|
45
54
|
|
|
46
55
|
You can explore all of these options and many more with `dart --help` or the more specific help for subcommands, in this case `dart task-create --help`.
|
|
47
56
|
|
|
48
57
|
Another common workflow is to updating a preexisting task. To do this, run something like
|
|
58
|
+
|
|
49
59
|
```sh
|
|
50
60
|
dart task-update [ID] -s Done
|
|
51
61
|
```
|
|
52
|
-
This command will mark the referenced task 'Done'. Here `[ID]` is meant to be replaced (including the brackets) with the ID of an existing task. You can get a ID from any existing task in a number of ways, such as by copying it from the end of a task's URL or by clicking the '...' button in a task page in Dart and then choosing 'Copy ID'.
|
|
53
62
|
|
|
63
|
+
This command will mark the referenced task 'Done'. Here `[ID]` is meant to be replaced (including the brackets) with the ID of an existing task. You can get a ID from any existing task in a number of ways, such as by copying it from the end of a task's URL or by clicking the '...' button in a task page in Dart and then choosing 'Copy ID'.
|
|
54
64
|
|
|
55
65
|
## Using the Python Library
|
|
56
66
|
|
|
57
67
|
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.
|
|
58
68
|
|
|
59
69
|
Then, you can run something like
|
|
70
|
+
|
|
60
71
|
```python
|
|
61
72
|
import os
|
|
62
73
|
from dart import create_task, is_logged_in, update_task
|
|
@@ -73,18 +84,17 @@ new_task = create_task(
|
|
|
73
84
|
update_task(new_task.id, status_title="Done")
|
|
74
85
|
```
|
|
75
86
|
|
|
76
|
-
|
|
77
87
|
## Using the Python Library in AWS Lambda Functions
|
|
78
88
|
|
|
79
89
|
To use the `dart-tools` Python library in an AWS Lambda function, you need to package the library with your Lambda deployment package (see more details at [Working with .zip file archives for Python Lambda functions](https://docs.aws.amazon.com/lambda/latest/dg/python-package.html)). Follow these steps:
|
|
80
90
|
|
|
81
|
-
|
|
91
|
+
### Navigate to the directory containing your `lambda_function.py` source file. In this example, the directory is named `my_function`.
|
|
82
92
|
|
|
83
93
|
```sh
|
|
84
94
|
cd my_function
|
|
85
95
|
```
|
|
86
96
|
|
|
87
|
-
|
|
97
|
+
### Create a Deployment Package
|
|
88
98
|
|
|
89
99
|
Use Docker to create a deployment package that includes the `dart-tools` library. Run the following commands in your terminal, ensuring that the `RUNTIME_PYTHON_VERSION` and `RUNTIME_ARCHITECTURE` environment variables match the runtime settings of your Lambda function:
|
|
90
100
|
|
|
@@ -96,7 +106,7 @@ To use the `dart-tools` Python library in an AWS Lambda function, you need to pa
|
|
|
96
106
|
|
|
97
107
|
This command installs the `dart-tools` library into a directory named `package` in your current working directory.
|
|
98
108
|
|
|
99
|
-
|
|
109
|
+
### Zip the contents of the `package` directory along with your `lambda_function.py`
|
|
100
110
|
|
|
101
111
|
```sh
|
|
102
112
|
cd package
|
|
@@ -105,16 +115,15 @@ To use the `dart-tools` Python library in an AWS Lambda function, you need to pa
|
|
|
105
115
|
zip -r my_deployment_package.zip lambda_function.py
|
|
106
116
|
```
|
|
107
117
|
|
|
108
|
-
|
|
118
|
+
### Deploy the Lambda function
|
|
109
119
|
|
|
110
120
|
Upload the `my_deployment_package.zip` file to AWS Lambda using the AWS Management Console or the AWS CLI.
|
|
111
121
|
|
|
112
122
|
By following these steps, you can use the `dart-tools` Python library within your AWS Lambda functions.
|
|
113
123
|
|
|
114
|
-
|
|
115
124
|
## Help and Resources
|
|
116
125
|
|
|
117
|
-
- [Homepage](https://
|
|
126
|
+
- [Homepage](https://itsdart.com/?nr=1)
|
|
118
127
|
- [Web App](https://app.itsdart.com/)
|
|
119
128
|
- [Help Center](https://help.itsdart.com/)
|
|
120
129
|
- [Bugs and Features](https://app.itsdart.com/p/r/JFyPnhL9En61)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
1
|
+
#!/usr/bin/env uv run python3
|
|
2
2
|
# -*- coding: utf-8 -*-
|
|
3
3
|
|
|
4
4
|
"""A CLI to interact with the Dart web app."""
|
|
@@ -19,7 +19,7 @@ from collections import defaultdict
|
|
|
19
19
|
from datetime import timezone
|
|
20
20
|
from functools import wraps
|
|
21
21
|
from importlib.metadata import version
|
|
22
|
-
from typing import Callable, NoReturn, TypeVar
|
|
22
|
+
from typing import Callable, NoReturn, TypeVar, Union
|
|
23
23
|
from webbrowser import open_new_tab
|
|
24
24
|
|
|
25
25
|
import dateparser
|
|
@@ -27,8 +27,6 @@ import httpx
|
|
|
27
27
|
import platformdirs
|
|
28
28
|
from pick import pick
|
|
29
29
|
|
|
30
|
-
from dart.generated.types import Response
|
|
31
|
-
|
|
32
30
|
from .exception import DartException
|
|
33
31
|
from .generated import Client, api
|
|
34
32
|
from .generated.models import (
|
|
@@ -54,7 +52,7 @@ from .generated.models import (
|
|
|
54
52
|
WrappedTaskCreate,
|
|
55
53
|
WrappedTaskUpdate,
|
|
56
54
|
)
|
|
57
|
-
from .generated.types import UNSET, Unset
|
|
55
|
+
from .generated.types import UNSET, Response, Unset
|
|
58
56
|
|
|
59
57
|
_APP = "dart-tools"
|
|
60
58
|
_PROG = "dart"
|
|
@@ -66,7 +64,7 @@ _HOST_MAP = {"prod": _PROD_HOST, "stag": _STAG_HOST, "dev": _DEV_HOST}
|
|
|
66
64
|
|
|
67
65
|
# Service commands
|
|
68
66
|
_LOGIN_CMD = "login"
|
|
69
|
-
_SET_HOST_CMD = "
|
|
67
|
+
_SET_HOST_CMD = "host-set"
|
|
70
68
|
_VERSION_CMD = "--version"
|
|
71
69
|
# Task commands
|
|
72
70
|
_CREATE_TASK_CMD = "task-create"
|
|
@@ -131,7 +129,7 @@ def _make_id() -> str:
|
|
|
131
129
|
return "".join(random.choices(_ID_CHARS, k=12))
|
|
132
130
|
|
|
133
131
|
|
|
134
|
-
def trim_slug_str(s: str, length: int, max_under: int
|
|
132
|
+
def trim_slug_str(s: str, length: int, max_under: Union[int, None] = None) -> str:
|
|
135
133
|
max_under = max_under if max_under is not None else length // 6
|
|
136
134
|
if len(s) <= length:
|
|
137
135
|
return s
|
|
@@ -141,7 +139,7 @@ def trim_slug_str(s: str, length: int, max_under: int | None = None) -> str:
|
|
|
141
139
|
return s[:length]
|
|
142
140
|
|
|
143
141
|
|
|
144
|
-
def slugify_str(s: str, lower: bool = False, trim_kwargs: dict
|
|
142
|
+
def slugify_str(s: str, lower: bool = False, trim_kwargs: Union[dict, None] = None) -> str:
|
|
145
143
|
lowered = s.lower() if lower else s
|
|
146
144
|
formatted = _NON_ALPHANUM_RE.sub("-", lowered.replace("'", ""))
|
|
147
145
|
formatted = _REPEATED_DASH_RE.sub("-", formatted).strip("-")
|
|
@@ -205,7 +203,7 @@ def _handle_request_errors(fn: Callable) -> Callable:
|
|
|
205
203
|
except DartException as ex:
|
|
206
204
|
_dart_exit(ex)
|
|
207
205
|
except (httpx.TimeoutException, httpx.RequestError, httpx.ConnectError) as ex:
|
|
208
|
-
_dart_exit(f"Failed to execute API call
|
|
206
|
+
_dart_exit(f"Failed to execute API call: {ex}.")
|
|
209
207
|
|
|
210
208
|
return wrapper
|
|
211
209
|
|
|
@@ -276,7 +274,7 @@ class Dart:
|
|
|
276
274
|
def get_client_id(self) -> str:
|
|
277
275
|
return self._config.client_id
|
|
278
276
|
|
|
279
|
-
def get_auth_token(self) -> str
|
|
277
|
+
def get_auth_token(self) -> Union[str, None]:
|
|
280
278
|
result = self._config.get(_AUTH_TOKEN_KEY)
|
|
281
279
|
if result is not None:
|
|
282
280
|
return result
|
|
@@ -456,7 +454,7 @@ def _auth_failure_exit() -> NoReturn:
|
|
|
456
454
|
_dart_exit(
|
|
457
455
|
f"Not logged in, run\n\n {_PROG} {_LOGIN_CMD}\n\nto log in."
|
|
458
456
|
if _is_cli
|
|
459
|
-
else "Not logged in, either run
|
|
457
|
+
else "Not logged in, either run\n\n dart.login(token)\n\nor save the token into the DART_TOKEN environment variable."
|
|
460
458
|
)
|
|
461
459
|
|
|
462
460
|
|
|
@@ -492,7 +490,7 @@ def is_logged_in(should_raise: bool = False) -> bool:
|
|
|
492
490
|
|
|
493
491
|
if not result and should_raise:
|
|
494
492
|
_auth_failure_exit()
|
|
495
|
-
_log(f"You are
|
|
493
|
+
_log(f"You are{'' if result else ' not'} logged in")
|
|
496
494
|
return result
|
|
497
495
|
|
|
498
496
|
|
|
@@ -555,7 +553,7 @@ def begin_task() -> bool:
|
|
|
555
553
|
return True
|
|
556
554
|
|
|
557
555
|
|
|
558
|
-
def _normalize_priority(priority_int: int
|
|
556
|
+
def _normalize_priority(priority_int: Union[int, None, Unset]) -> Union[str, None, Unset]:
|
|
559
557
|
if priority_int in (None, UNSET):
|
|
560
558
|
return priority_int
|
|
561
559
|
|
|
@@ -565,13 +563,13 @@ def _normalize_priority(priority_int: int | None | Unset) -> str | None | Unset:
|
|
|
565
563
|
return _PRIORITY_MAP[priority_int]
|
|
566
564
|
|
|
567
565
|
|
|
568
|
-
def _get_due_at_from_str_arg(due_at_str: str
|
|
566
|
+
def _get_due_at_from_str_arg(due_at_str: Union[str, None, Unset]) -> Union[str, None, Unset]:
|
|
569
567
|
if due_at_str in (None, UNSET):
|
|
570
568
|
return due_at_str
|
|
571
569
|
|
|
572
570
|
due_at = dateparser.parse(due_at_str)
|
|
573
571
|
if not due_at:
|
|
574
|
-
_dart_exit(f"Could not parse due date
|
|
572
|
+
_dart_exit(f"Could not parse due date: {due_at_str}.")
|
|
575
573
|
due_at = due_at.replace(hour=0, minute=0, second=0, microsecond=0, tzinfo=timezone.utc).isoformat()
|
|
576
574
|
|
|
577
575
|
return due_at
|
|
@@ -580,13 +578,13 @@ def _get_due_at_from_str_arg(due_at_str: str | None | Unset) -> str | None | Uns
|
|
|
580
578
|
def create_task(
|
|
581
579
|
title: str,
|
|
582
580
|
*,
|
|
583
|
-
dartboard_title: str
|
|
584
|
-
status_title: str
|
|
585
|
-
assignee_emails: list[str]
|
|
586
|
-
tag_titles: list[str]
|
|
587
|
-
priority_int: int
|
|
588
|
-
size_int: int
|
|
589
|
-
due_at_str: str
|
|
581
|
+
dartboard_title: Union[str, Unset] = UNSET,
|
|
582
|
+
status_title: Union[str, Unset] = UNSET,
|
|
583
|
+
assignee_emails: Union[list[str], Unset] = UNSET,
|
|
584
|
+
tag_titles: Union[list[str], Unset] = UNSET,
|
|
585
|
+
priority_int: Union[int, None, Unset] = UNSET,
|
|
586
|
+
size_int: Union[int, None, Unset] = UNSET,
|
|
587
|
+
due_at_str: Union[str, None, Unset] = UNSET,
|
|
590
588
|
should_begin: bool = False,
|
|
591
589
|
) -> Task:
|
|
592
590
|
dart = Dart()
|
|
@@ -603,7 +601,7 @@ def create_task(
|
|
|
603
601
|
)
|
|
604
602
|
)
|
|
605
603
|
task = dart.create_task(task_create).item
|
|
606
|
-
_log(f"Created task
|
|
604
|
+
_log(f"Created task\n\n {task.title}\n {task.html_url}\n ID: {task.id}\n")
|
|
607
605
|
|
|
608
606
|
if should_begin:
|
|
609
607
|
user = dart.get_config().user
|
|
@@ -616,14 +614,14 @@ def create_task(
|
|
|
616
614
|
def update_task(
|
|
617
615
|
id: str,
|
|
618
616
|
*,
|
|
619
|
-
title: Unset
|
|
620
|
-
dartboard_title: str
|
|
621
|
-
status_title: str
|
|
622
|
-
assignee_emails: list[str]
|
|
623
|
-
tag_titles: list[str]
|
|
624
|
-
priority_int: int
|
|
625
|
-
size_int: int
|
|
626
|
-
due_at_str: str
|
|
617
|
+
title: Union[Unset, str] = UNSET,
|
|
618
|
+
dartboard_title: Union[str, Unset] = UNSET,
|
|
619
|
+
status_title: Union[str, Unset] = UNSET,
|
|
620
|
+
assignee_emails: Union[list[str], Unset] = UNSET,
|
|
621
|
+
tag_titles: Union[list[str], Unset] = UNSET,
|
|
622
|
+
priority_int: Union[int, None, Unset] = UNSET,
|
|
623
|
+
size_int: Union[int, None, Unset] = UNSET,
|
|
624
|
+
due_at_str: Union[str, None, Unset] = UNSET,
|
|
627
625
|
) -> Task:
|
|
628
626
|
dart = Dart()
|
|
629
627
|
task_update = WrappedTaskUpdate(
|
|
@@ -641,7 +639,7 @@ def update_task(
|
|
|
641
639
|
)
|
|
642
640
|
task = dart.update_task(id, task_update).item
|
|
643
641
|
|
|
644
|
-
_log(f"Updated task
|
|
642
|
+
_log(f"Updated task\n\n {task.title}\n {task.html_url}\n ID: {task.id}\n")
|
|
645
643
|
_log("Done.")
|
|
646
644
|
return task
|
|
647
645
|
|
|
@@ -650,7 +648,7 @@ def delete_task(id: str) -> Task:
|
|
|
650
648
|
dart = Dart()
|
|
651
649
|
task = dart.delete_task(id).item
|
|
652
650
|
|
|
653
|
-
_log(f"Deleted task
|
|
651
|
+
_log(f"Deleted task\n\n {task.title}\n {task.html_url}\n ID: {task.id}\n")
|
|
654
652
|
_log("Done.")
|
|
655
653
|
return task
|
|
656
654
|
|
|
@@ -658,14 +656,14 @@ def delete_task(id: str) -> Task:
|
|
|
658
656
|
def create_doc(
|
|
659
657
|
title: str,
|
|
660
658
|
*,
|
|
661
|
-
folder: str
|
|
662
|
-
text: str
|
|
659
|
+
folder: Union[str, Unset] = UNSET,
|
|
660
|
+
text: Union[str, Unset] = UNSET,
|
|
663
661
|
) -> Doc:
|
|
664
662
|
dart = Dart()
|
|
665
663
|
doc_create = WrappedDocCreate(item=DocCreate(title=title, folder=folder, text=text))
|
|
666
664
|
doc = dart.create_doc(doc_create).item
|
|
667
665
|
|
|
668
|
-
_log(f"Created doc
|
|
666
|
+
_log(f"Created doc\n\n {doc.title}\n {doc.html_url}\n ID: {doc.id}\n")
|
|
669
667
|
_log("Done.")
|
|
670
668
|
return doc
|
|
671
669
|
|
|
@@ -674,14 +672,14 @@ def update_doc(
|
|
|
674
672
|
id: str,
|
|
675
673
|
*,
|
|
676
674
|
title: str,
|
|
677
|
-
folder: str
|
|
678
|
-
text: str
|
|
675
|
+
folder: Union[str, Unset] = UNSET,
|
|
676
|
+
text: Union[str, Unset] = UNSET,
|
|
679
677
|
) -> Doc:
|
|
680
678
|
dart = Dart()
|
|
681
679
|
doc_update = WrappedDocUpdate(item=DocUpdate(id, title=title, folder=folder, text=text))
|
|
682
680
|
doc = dart.update_doc(id, doc_update).item
|
|
683
681
|
|
|
684
|
-
_log(f"Updated doc
|
|
682
|
+
_log(f"Updated doc\n\n {doc.title}\n {doc.html_url}\n ID: {doc.id}\n")
|
|
685
683
|
_log("Done.")
|
|
686
684
|
return doc
|
|
687
685
|
|
|
@@ -690,7 +688,7 @@ def delete_doc(id: str) -> Doc:
|
|
|
690
688
|
dart = Dart()
|
|
691
689
|
doc = dart.delete_doc(id).item
|
|
692
690
|
|
|
693
|
-
_log(f"Deleted doc
|
|
691
|
+
_log(f"Deleted doc\n\n {doc.title}\n {doc.html_url}\n ID: {doc.id}\n")
|
|
694
692
|
_log("Done.")
|
|
695
693
|
return doc
|
|
696
694
|
|
|
@@ -699,7 +697,7 @@ def create_comment(id: str, text: str) -> Comment:
|
|
|
699
697
|
dart = Dart()
|
|
700
698
|
comment_create = WrappedCommentCreate(item=CommentCreate(task_id=id, text=text))
|
|
701
699
|
comment = dart.create_comment(comment_create).item
|
|
702
|
-
_log(f"Created comment
|
|
700
|
+
_log(f"Created comment\n\n {comment.html_url}\n ID: {comment.id}\n")
|
|
703
701
|
_log("Done.")
|
|
704
702
|
return comment
|
|
705
703
|
|
|
@@ -793,7 +791,7 @@ def cli() -> None:
|
|
|
793
791
|
metavar=f"{{{metavar}}}",
|
|
794
792
|
)
|
|
795
793
|
|
|
796
|
-
set_host_parser = subparsers.add_parser(_SET_HOST_CMD, aliases=["
|
|
794
|
+
set_host_parser = subparsers.add_parser(_SET_HOST_CMD, aliases=["sh"])
|
|
797
795
|
set_host_parser.add_argument("host", help="the new host: {prod|stag|dev|[URL]}")
|
|
798
796
|
set_host_parser.set_defaults(func=set_host)
|
|
799
797
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
from __future__ import annotations
|
|
8
8
|
|
|
9
9
|
from functools import wraps
|
|
10
|
-
from typing import Any, Callable
|
|
10
|
+
from typing import Any, Callable, Union
|
|
11
11
|
|
|
12
12
|
import httpx
|
|
13
13
|
|
|
@@ -95,11 +95,11 @@ class DartOld(Dart):
|
|
|
95
95
|
def replicate_space(
|
|
96
96
|
space_id: str,
|
|
97
97
|
*,
|
|
98
|
-
title: str
|
|
99
|
-
abrev: str
|
|
100
|
-
color_hex: str
|
|
101
|
-
accessible_by_team: bool
|
|
102
|
-
accessor_duids: list[str]
|
|
98
|
+
title: Union[str, None] = None,
|
|
99
|
+
abrev: Union[str, None] = None,
|
|
100
|
+
color_hex: Union[str, None] = None,
|
|
101
|
+
accessible_by_team: Union[bool, None] = None,
|
|
102
|
+
accessor_duids: Union[list[str], None] = None,
|
|
103
103
|
) -> str:
|
|
104
104
|
dart = DartOld()
|
|
105
105
|
content = {}
|
|
@@ -135,7 +135,7 @@ def get_dartboards(space_id: str, include_special: bool = False) -> list[dict]:
|
|
|
135
135
|
return dartboards
|
|
136
136
|
|
|
137
137
|
|
|
138
|
-
def replicate_dartboard(dartboard_id: str, *, title: str
|
|
138
|
+
def replicate_dartboard(dartboard_id: str, *, title: Union[str, None] = None) -> str:
|
|
139
139
|
dart = DartOld()
|
|
140
140
|
content = {}
|
|
141
141
|
if title is not None:
|
|
@@ -148,7 +148,7 @@ def replicate_dartboard(dartboard_id: str, *, title: str | None = None) -> str:
|
|
|
148
148
|
return dartboard_id
|
|
149
149
|
|
|
150
150
|
|
|
151
|
-
def update_dartboard(dartboard_id: str, *, title: str
|
|
151
|
+
def update_dartboard(dartboard_id: str, *, title: Union[str, None] = None, color_hex: Union[str, None] = None) -> dict:
|
|
152
152
|
dart = DartOld()
|
|
153
153
|
dartboard_update = {}
|
|
154
154
|
|
|
@@ -170,12 +170,12 @@ def update_dartboard(dartboard_id: str, *, title: str | None = None, color_hex:
|
|
|
170
170
|
response_json = response.json()
|
|
171
171
|
dartboard = _parse_transaction_response_and_maybe_exit(response_json, "dartboard", dartboard_id)
|
|
172
172
|
|
|
173
|
-
_log(f"Updated dartboard {dartboard[
|
|
173
|
+
_log(f"Updated dartboard {dartboard['title']} at {_get_dartboard_url(dart.get_base_url(), dartboard['duid'])}")
|
|
174
174
|
_log("Done.")
|
|
175
175
|
return dartboard
|
|
176
176
|
|
|
177
177
|
|
|
178
|
-
def get_folders(space_id: str, *, include_special: bool = False) -> list[dict]:
|
|
178
|
+
def get_folders(space_id: str, *, include_special: Union[bool, None] = False) -> list[dict]:
|
|
179
179
|
dart = DartOld()
|
|
180
180
|
|
|
181
181
|
response = dart.get(_LIST_FOLDERS_URL_FRAG, params={"space_duid": space_id})
|
|
@@ -189,7 +189,7 @@ def get_folders(space_id: str, *, include_special: bool = False) -> list[dict]:
|
|
|
189
189
|
return folders
|
|
190
190
|
|
|
191
191
|
|
|
192
|
-
def update_folder(folder_id: str, *, title: str
|
|
192
|
+
def update_folder(folder_id: str, *, title: Union[str, None] = None, color_hex: Union[str, None] = None) -> dict:
|
|
193
193
|
dart = DartOld()
|
|
194
194
|
folder_update = {}
|
|
195
195
|
|
|
@@ -211,6 +211,6 @@ def update_folder(folder_id: str, *, title: str | None = None, color_hex: str |
|
|
|
211
211
|
response_json = response.json()
|
|
212
212
|
folder = _parse_transaction_response_and_maybe_exit(response_json, "folder", folder_id)
|
|
213
213
|
|
|
214
|
-
_log(f"Updated folder {folder[
|
|
214
|
+
_log(f"Updated folder {folder['title']} at {_get_folder_url(dart.get_base_url(), folder['duid'])}")
|
|
215
215
|
_log("Done.")
|
|
216
216
|
return folder
|
|
@@ -1,9 +1,30 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dart-tools
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.1
|
|
4
4
|
Summary: The Dart CLI and Python Library
|
|
5
5
|
Author-email: Dart <software@itsdart.com>
|
|
6
|
-
License
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2023 Dart
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
|
|
7
28
|
Project-URL: Homepage, https://www.itsdart.com/?nr=1
|
|
8
29
|
Project-URL: Web App, https://app.itsdart.com/
|
|
9
30
|
Project-URL: Help Center, https://help.itsdart.com/
|
|
@@ -13,6 +34,7 @@ Keywords: dart,cli,projectmanagement,taskmanagement
|
|
|
13
34
|
Classifier: Development Status :: 4 - Beta
|
|
14
35
|
Classifier: Environment :: Console
|
|
15
36
|
Classifier: Intended Audience :: Developers
|
|
37
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
38
|
Classifier: Natural Language :: English
|
|
17
39
|
Classifier: Operating System :: OS Independent
|
|
18
40
|
Classifier: Programming Language :: Python
|
|
@@ -52,52 +74,63 @@ Dynamic: license-file
|
|
|
52
74
|
|
|
53
75
|
`dart-tools` is the Dart CLI and Python Library. It enables direct integration with Dart through a terminal CLI or through Python.
|
|
54
76
|
|
|
55
|
-
|
|
56
77
|
- [Installation](#installation)
|
|
78
|
+
- [Naming conflicts](#naming-conflicts)
|
|
57
79
|
- [Using the CLI](#using-the-cli)
|
|
58
80
|
- [Using the Python Library](#using-the-python-library)
|
|
59
81
|
- [Using the Python Library in AWS Lambda Functions](#using-the-python-library-in-aws-lambda-functions)
|
|
60
|
-
- [
|
|
82
|
+
- [Navigate to the directory containing your `lambda_function.py` source file. In this example, the directory is named `my_function`.](#navigate-to-the-directory-containing-your-lambda_functionpy-source-file-in-this-example-the-directory-is-named-my_function)
|
|
83
|
+
- [Create a Deployment Package](#create-a-deployment-package)
|
|
84
|
+
- [Zip the contents of the `package` directory along with your `lambda_function.py`](#zip-the-contents-of-the-package-directory-along-with-your-lambda_functionpy)
|
|
85
|
+
- [Deploy the Lambda function](#deploy-the-lambda-function)
|
|
61
86
|
- [Help and Resources](#help-and-resources)
|
|
62
87
|
- [Contributing](#contributing)
|
|
63
88
|
- [License](#license)
|
|
64
89
|
|
|
65
|
-
|
|
66
90
|
## Installation
|
|
67
91
|
|
|
68
92
|
In the terminal, install by running
|
|
93
|
+
|
|
69
94
|
```sh
|
|
70
95
|
pip install dart-tools
|
|
71
96
|
```
|
|
72
97
|
|
|
98
|
+
### Naming conflicts
|
|
99
|
+
|
|
100
|
+
If you have a preexisting shell command named `dart`, a quick fix is to run `which -a dart` and fine the path for this `dart` application. Then you can create an alias and add it to your shell profile file (`.zshrc`, `.bashrc`, etc.). For example, open `~/.zshrc` and add a line like `alias dartai="/path/to/dart"`, save it, and restart your terminal.
|
|
73
101
|
|
|
74
102
|
## Using the CLI
|
|
75
103
|
|
|
76
104
|
Start off by setting up authentication with
|
|
105
|
+
|
|
77
106
|
```sh
|
|
78
107
|
dart login
|
|
79
108
|
```
|
|
80
109
|
|
|
81
110
|
Then, you can create a new task with a command along the lines of
|
|
111
|
+
|
|
82
112
|
```sh
|
|
83
113
|
dart task-create "Update the landing page" -p0 --tag marketing
|
|
84
114
|
```
|
|
115
|
+
|
|
85
116
|
which will make a new task called 'Update the landing page' with priority 'Critical' (i.e. P0) and with the 'marketing' tag.
|
|
86
117
|
|
|
87
118
|
You can explore all of these options and many more with `dart --help` or the more specific help for subcommands, in this case `dart task-create --help`.
|
|
88
119
|
|
|
89
120
|
Another common workflow is to updating a preexisting task. To do this, run something like
|
|
121
|
+
|
|
90
122
|
```sh
|
|
91
123
|
dart task-update [ID] -s Done
|
|
92
124
|
```
|
|
93
|
-
This command will mark the referenced task 'Done'. Here `[ID]` is meant to be replaced (including the brackets) with the ID of an existing task. You can get a ID from any existing task in a number of ways, such as by copying it from the end of a task's URL or by clicking the '...' button in a task page in Dart and then choosing 'Copy ID'.
|
|
94
125
|
|
|
126
|
+
This command will mark the referenced task 'Done'. Here `[ID]` is meant to be replaced (including the brackets) with the ID of an existing task. You can get a ID from any existing task in a number of ways, such as by copying it from the end of a task's URL or by clicking the '...' button in a task page in Dart and then choosing 'Copy ID'.
|
|
95
127
|
|
|
96
128
|
## Using the Python Library
|
|
97
129
|
|
|
98
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.
|
|
99
131
|
|
|
100
132
|
Then, you can run something like
|
|
133
|
+
|
|
101
134
|
```python
|
|
102
135
|
import os
|
|
103
136
|
from dart import create_task, is_logged_in, update_task
|
|
@@ -114,18 +147,17 @@ new_task = create_task(
|
|
|
114
147
|
update_task(new_task.id, status_title="Done")
|
|
115
148
|
```
|
|
116
149
|
|
|
117
|
-
|
|
118
150
|
## Using the Python Library in AWS Lambda Functions
|
|
119
151
|
|
|
120
152
|
To use the `dart-tools` Python library in an AWS Lambda function, you need to package the library with your Lambda deployment package (see more details at [Working with .zip file archives for Python Lambda functions](https://docs.aws.amazon.com/lambda/latest/dg/python-package.html)). Follow these steps:
|
|
121
153
|
|
|
122
|
-
|
|
154
|
+
### Navigate to the directory containing your `lambda_function.py` source file. In this example, the directory is named `my_function`.
|
|
123
155
|
|
|
124
156
|
```sh
|
|
125
157
|
cd my_function
|
|
126
158
|
```
|
|
127
159
|
|
|
128
|
-
|
|
160
|
+
### Create a Deployment Package
|
|
129
161
|
|
|
130
162
|
Use Docker to create a deployment package that includes the `dart-tools` library. Run the following commands in your terminal, ensuring that the `RUNTIME_PYTHON_VERSION` and `RUNTIME_ARCHITECTURE` environment variables match the runtime settings of your Lambda function:
|
|
131
163
|
|
|
@@ -137,7 +169,7 @@ To use the `dart-tools` Python library in an AWS Lambda function, you need to pa
|
|
|
137
169
|
|
|
138
170
|
This command installs the `dart-tools` library into a directory named `package` in your current working directory.
|
|
139
171
|
|
|
140
|
-
|
|
172
|
+
### Zip the contents of the `package` directory along with your `lambda_function.py`
|
|
141
173
|
|
|
142
174
|
```sh
|
|
143
175
|
cd package
|
|
@@ -146,16 +178,15 @@ To use the `dart-tools` Python library in an AWS Lambda function, you need to pa
|
|
|
146
178
|
zip -r my_deployment_package.zip lambda_function.py
|
|
147
179
|
```
|
|
148
180
|
|
|
149
|
-
|
|
181
|
+
### Deploy the Lambda function
|
|
150
182
|
|
|
151
183
|
Upload the `my_deployment_package.zip` file to AWS Lambda using the AWS Management Console or the AWS CLI.
|
|
152
184
|
|
|
153
185
|
By following these steps, you can use the `dart-tools` Python library within your AWS Lambda functions.
|
|
154
186
|
|
|
155
|
-
|
|
156
187
|
## Help and Resources
|
|
157
188
|
|
|
158
|
-
- [Homepage](https://
|
|
189
|
+
- [Homepage](https://itsdart.com/?nr=1)
|
|
159
190
|
- [Web App](https://app.itsdart.com/)
|
|
160
191
|
- [Help Center](https://help.itsdart.com/)
|
|
161
192
|
- [Bugs and Features](https://app.itsdart.com/p/r/JFyPnhL9En61)
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "dart-tools"
|
|
3
|
-
version = "0.7.
|
|
3
|
+
version = "0.7.1"
|
|
4
4
|
description = "The Dart CLI and Python Library"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.9"
|
|
7
|
-
|
|
8
|
-
license = "MIT"
|
|
7
|
+
license = {file = "LICENSE"}
|
|
9
8
|
keywords = ["dart", "cli", "projectmanagement", "taskmanagement"]
|
|
10
9
|
authors = [
|
|
11
10
|
{ name="Dart", email="software@itsdart.com" }
|
|
@@ -14,6 +13,7 @@ classifiers=[
|
|
|
14
13
|
"Development Status :: 4 - Beta",
|
|
15
14
|
"Environment :: Console",
|
|
16
15
|
"Intended Audience :: Developers",
|
|
16
|
+
"License :: OSI Approved :: MIT License",
|
|
17
17
|
"Natural Language :: English",
|
|
18
18
|
"Operating System :: OS Independent",
|
|
19
19
|
"Programming Language :: Python",
|
|
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
|
|
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
|
|
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
|
|
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
|