dart-tools 0.8.5__tar.gz → 0.8.6__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.

Files changed (118) hide show
  1. dart_tools-0.8.6/.env.example +1 -0
  2. dart_tools-0.8.6/.gitattributes +2 -0
  3. dart_tools-0.8.6/.gitignore +129 -0
  4. {dart_tools-0.8.5 → dart_tools-0.8.6}/PKG-INFO +2 -46
  5. {dart_tools-0.8.5 → dart_tools-0.8.6}/README.md +1 -45
  6. dart_tools-0.8.6/admin/README.md +44 -0
  7. dart_tools-0.8.6/admin/make-api.sh +30 -0
  8. dart_tools-0.8.6/admin/make-deploy.sh +8 -0
  9. dart_tools-0.8.6/admin/make-lambda-layer.sh +23 -0
  10. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/dart.py +4 -1
  11. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart_tools.egg-info/PKG-INFO +2 -46
  12. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart_tools.egg-info/SOURCES.txt +16 -1
  13. dart_tools-0.8.6/examples/Lambda functions.md +36 -0
  14. dart_tools-0.8.6/examples/replicate_space.py +50 -0
  15. dart_tools-0.8.6/examples/replicate_space_and_more.js +102 -0
  16. dart_tools-0.8.6/examples/upload_attachment.py +112 -0
  17. dart_tools-0.8.6/examples/watch_for_status_change.py +41 -0
  18. dart_tools-0.8.6/examples/webhook_server.py +70 -0
  19. dart_tools-0.8.6/makefile +21 -0
  20. {dart_tools-0.8.5 → dart_tools-0.8.6}/pyproject.toml +1 -1
  21. dart_tools-0.8.6/uv.lock +971 -0
  22. {dart_tools-0.8.5 → dart_tools-0.8.6}/LICENSE +0 -0
  23. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/__init__.py +0 -0
  24. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/exception.py +0 -0
  25. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/__init__.py +0 -0
  26. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/api/__init__.py +0 -0
  27. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/api/attachment/__init__.py +0 -0
  28. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/api/attachment/add_task_attachment_from_url.py +0 -0
  29. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/api/comment/__init__.py +0 -0
  30. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/api/comment/add_task_comment.py +0 -0
  31. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/api/comment/list_comments.py +0 -0
  32. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/api/config/__init__.py +0 -0
  33. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/api/config/get_config.py +0 -0
  34. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/api/dartboard/__init__.py +0 -0
  35. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/api/dartboard/get_dartboard.py +0 -0
  36. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/api/doc/__init__.py +0 -0
  37. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/api/doc/create_doc.py +0 -0
  38. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/api/doc/delete_doc.py +0 -0
  39. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/api/doc/get_doc.py +0 -0
  40. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/api/doc/list_docs.py +0 -0
  41. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/api/doc/update_doc.py +0 -0
  42. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/api/folder/__init__.py +0 -0
  43. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/api/folder/get_folder.py +0 -0
  44. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/api/help_center_article/__init__.py +0 -0
  45. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/api/help_center_article/list_help_center_articles.py +0 -0
  46. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/api/skill/__init__.py +0 -0
  47. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/api/skill/retrieve_skill_by_title.py +0 -0
  48. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/api/task/__init__.py +0 -0
  49. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/api/task/create_task.py +0 -0
  50. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/api/task/delete_task.py +0 -0
  51. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/api/task/get_task.py +0 -0
  52. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/api/task/list_tasks.py +0 -0
  53. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/api/task/update_task.py +0 -0
  54. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/api/view/__init__.py +0 -0
  55. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/api/view/get_view.py +0 -0
  56. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/client.py +0 -0
  57. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/errors.py +0 -0
  58. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/__init__.py +0 -0
  59. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/attachment.py +0 -0
  60. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/attachment_create_from_url.py +0 -0
  61. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/comment.py +0 -0
  62. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/comment_create.py +0 -0
  63. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/concise_doc.py +0 -0
  64. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/concise_task.py +0 -0
  65. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/custom_properties.py +0 -0
  66. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/dartboard.py +0 -0
  67. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/doc.py +0 -0
  68. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/doc_create.py +0 -0
  69. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/doc_update.py +0 -0
  70. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/folder.py +0 -0
  71. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/list_comments_o_item.py +0 -0
  72. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/list_docs_o_item.py +0 -0
  73. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/list_tasks_o_item.py +0 -0
  74. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/paginated_comment_list.py +0 -0
  75. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/paginated_concise_doc_list.py +0 -0
  76. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/paginated_concise_task_list.py +0 -0
  77. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/priority.py +0 -0
  78. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/skill.py +0 -0
  79. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/task.py +0 -0
  80. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/task_create.py +0 -0
  81. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/task_relationships_type_0.py +0 -0
  82. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/task_update.py +0 -0
  83. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/time_tracking_entry.py +0 -0
  84. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/user.py +0 -0
  85. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/user_space_configuration.py +0 -0
  86. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/user_space_configuration_custom_property_checkbox_type_def.py +0 -0
  87. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/user_space_configuration_custom_property_dates_type_def.py +0 -0
  88. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/user_space_configuration_custom_property_multiselect_type_def.py +0 -0
  89. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/user_space_configuration_custom_property_number_type_def.py +0 -0
  90. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/user_space_configuration_custom_property_number_type_def_custom_property_number_format_type_def.py +0 -0
  91. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/user_space_configuration_custom_property_select_type_def.py +0 -0
  92. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/user_space_configuration_custom_property_status_type_def.py +0 -0
  93. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/user_space_configuration_custom_property_text_type_def.py +0 -0
  94. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/user_space_configuration_custom_property_time_tracking_type_def.py +0 -0
  95. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/user_space_configuration_custom_property_user_type_def.py +0 -0
  96. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/view.py +0 -0
  97. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/wrapped_comment.py +0 -0
  98. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/wrapped_comment_create.py +0 -0
  99. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/wrapped_dartboard.py +0 -0
  100. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/wrapped_doc.py +0 -0
  101. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/wrapped_doc_create.py +0 -0
  102. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/wrapped_doc_update.py +0 -0
  103. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/wrapped_folder.py +0 -0
  104. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/wrapped_help_center_articles.py +0 -0
  105. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/wrapped_skill.py +0 -0
  106. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/wrapped_task.py +0 -0
  107. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/wrapped_task_create.py +0 -0
  108. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/wrapped_task_update.py +0 -0
  109. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/models/wrapped_view.py +0 -0
  110. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/generated/types.py +0 -0
  111. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/old.py +0 -0
  112. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/order_manager.py +0 -0
  113. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart/webhook.py +0 -0
  114. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart_tools.egg-info/dependency_links.txt +0 -0
  115. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart_tools.egg-info/entry_points.txt +0 -0
  116. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart_tools.egg-info/requires.txt +0 -0
  117. {dart_tools-0.8.5 → dart_tools-0.8.6}/dart_tools.egg-info/top_level.txt +0 -0
  118. {dart_tools-0.8.5 → dart_tools-0.8.6}/setup.cfg +0 -0
@@ -0,0 +1 @@
1
+ DART_TOKEN='' # your authentication token from https://app.dartai.com/?settings=account
@@ -0,0 +1,2 @@
1
+ **/generated/** linguist-generated=true
2
+ **/uv.lock linguist-generated=true
@@ -0,0 +1,129 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ pip-wheel-metadata/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py,cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ target/
76
+
77
+ # Jupyter Notebook
78
+ .ipynb_checkpoints
79
+
80
+ # IPython
81
+ profile_default/
82
+ ipython_config.py
83
+
84
+ # pyenv
85
+ .python-version
86
+
87
+ # pipenv
88
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
90
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
91
+ # install all needed dependencies.
92
+ #Pipfile.lock
93
+
94
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
95
+ __pypackages__/
96
+
97
+ # Celery stuff
98
+ celerybeat-schedule
99
+ celerybeat.pid
100
+
101
+ # SageMath parsed files
102
+ *.sage.py
103
+
104
+ # Environments
105
+ .env
106
+ .venv
107
+ env/
108
+ venv/
109
+ ENV/
110
+ env.bak/
111
+ venv.bak/
112
+
113
+ # Spyder project settings
114
+ .spyderproject
115
+ .spyproject
116
+
117
+ # Rope project settings
118
+ .ropeproject
119
+
120
+ # mkdocs documentation
121
+ /site
122
+
123
+ # mypy
124
+ .mypy_cache/
125
+ .dmypy.json
126
+ dmypy.json
127
+
128
+ # Pyre type checker
129
+ .pyre/
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dart-tools
3
- Version: 0.8.5
3
+ Version: 0.8.6
4
4
  Summary: The Dart CLI and Python Library
5
5
  Author-email: Dart <software@dartai.com>
6
6
  License: MIT License
@@ -72,17 +72,12 @@ Dynamic: license-file
72
72
 
73
73
  [Dart](https://dartai.com?nr=1) is Project Management powered by AI.
74
74
 
75
- `dart-tools` is the Dart CLI and Python Library. It enables direct integration with Dart through a terminal CLI or through Python.
75
+ `dart-tools` is the Dart CLI and Python Library. It enables direct integration with Dart through a terminal CLI or through Python. It implements client functions to the [Dart Public API](https://app.dartai.com/api/v0/public/docs/).
76
76
 
77
77
  - [Installation](#installation)
78
78
  - [Naming conflicts](#naming-conflicts)
79
79
  - [Using the CLI](#using-the-cli)
80
80
  - [Using the Python Library](#using-the-python-library)
81
- - [Using the Python Library in AWS Lambda Functions](#using-the-python-library-in-aws-lambda-functions)
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)
86
81
  - [Help and Resources](#help-and-resources)
87
82
  - [Contributing](#contributing)
88
83
  - [License](#license)
@@ -147,43 +142,6 @@ new_task = create_task(
147
142
  update_task(new_task.id, status_title="Done")
148
143
  ```
149
144
 
150
- ## Using the Python Library in AWS Lambda Functions
151
-
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:
153
-
154
- ### Navigate to the directory containing your `lambda_function.py` source file. In this example, the directory is named `my_function`.
155
-
156
- ```sh
157
- cd my_function
158
- ```
159
-
160
- ### Create a Deployment Package
161
-
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:
163
-
164
- ```sh
165
- export RUNTIME_PYTHON_VERSION=3.12
166
- export RUNTIME_ARCHITECTURE=x86_64
167
- docker run --rm --volume ${PWD}:/app --entrypoint /bin/bash public.ecr.aws/lambda/python:${RUNTIME_PYTHON_VERSION}-${RUNTIME_ARCHITECTURE} -c "pip install --target /app/package dart-tools"
168
- ```
169
-
170
- This command installs the `dart-tools` library into a directory named `package` in your current working directory.
171
-
172
- ### Zip the contents of the `package` directory along with your `lambda_function.py`
173
-
174
- ```sh
175
- cd package
176
- zip -r ../my_deployment_package.zip .
177
- cd ..
178
- zip -r my_deployment_package.zip lambda_function.py
179
- ```
180
-
181
- ### Deploy the Lambda function
182
-
183
- Upload the `my_deployment_package.zip` file to AWS Lambda using the AWS Management Console or the AWS CLI.
184
-
185
- By following these steps, you can use the `dart-tools` Python library within your AWS Lambda functions.
186
-
187
145
  ## Help and Resources
188
146
 
189
147
  - [Homepage](https://dartai.com/?nr=1)
@@ -194,12 +152,10 @@ By following these steps, you can use the `dart-tools` Python library within you
194
152
  - [Chat on Discord](https://discord.gg/RExv8jEkSh)
195
153
  - Email us at [support@dartai.com](mailto:support@dartai.com)
196
154
 
197
-
198
155
  ## Contributing
199
156
 
200
157
  Contributions are welcome! Please open an issue or submit a pull request.
201
158
 
202
-
203
159
  ## License
204
160
 
205
161
  This project is licensed under [the MIT License](LICENSE).
@@ -9,17 +9,12 @@
9
9
 
10
10
  [Dart](https://dartai.com?nr=1) is Project Management powered by AI.
11
11
 
12
- `dart-tools` is the Dart CLI and Python Library. It enables direct integration with Dart through a terminal CLI or through Python.
12
+ `dart-tools` is the Dart CLI and Python Library. It enables direct integration with Dart through a terminal CLI or through Python. It implements client functions to the [Dart Public API](https://app.dartai.com/api/v0/public/docs/).
13
13
 
14
14
  - [Installation](#installation)
15
15
  - [Naming conflicts](#naming-conflicts)
16
16
  - [Using the CLI](#using-the-cli)
17
17
  - [Using the Python Library](#using-the-python-library)
18
- - [Using the Python Library in AWS Lambda Functions](#using-the-python-library-in-aws-lambda-functions)
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)
23
18
  - [Help and Resources](#help-and-resources)
24
19
  - [Contributing](#contributing)
25
20
  - [License](#license)
@@ -84,43 +79,6 @@ new_task = create_task(
84
79
  update_task(new_task.id, status_title="Done")
85
80
  ```
86
81
 
87
- ## Using the Python Library in AWS Lambda Functions
88
-
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:
90
-
91
- ### Navigate to the directory containing your `lambda_function.py` source file. In this example, the directory is named `my_function`.
92
-
93
- ```sh
94
- cd my_function
95
- ```
96
-
97
- ### Create a Deployment Package
98
-
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:
100
-
101
- ```sh
102
- export RUNTIME_PYTHON_VERSION=3.12
103
- export RUNTIME_ARCHITECTURE=x86_64
104
- docker run --rm --volume ${PWD}:/app --entrypoint /bin/bash public.ecr.aws/lambda/python:${RUNTIME_PYTHON_VERSION}-${RUNTIME_ARCHITECTURE} -c "pip install --target /app/package dart-tools"
105
- ```
106
-
107
- This command installs the `dart-tools` library into a directory named `package` in your current working directory.
108
-
109
- ### Zip the contents of the `package` directory along with your `lambda_function.py`
110
-
111
- ```sh
112
- cd package
113
- zip -r ../my_deployment_package.zip .
114
- cd ..
115
- zip -r my_deployment_package.zip lambda_function.py
116
- ```
117
-
118
- ### Deploy the Lambda function
119
-
120
- Upload the `my_deployment_package.zip` file to AWS Lambda using the AWS Management Console or the AWS CLI.
121
-
122
- By following these steps, you can use the `dart-tools` Python library within your AWS Lambda functions.
123
-
124
82
  ## Help and Resources
125
83
 
126
84
  - [Homepage](https://dartai.com/?nr=1)
@@ -131,12 +89,10 @@ By following these steps, you can use the `dart-tools` Python library within you
131
89
  - [Chat on Discord](https://discord.gg/RExv8jEkSh)
132
90
  - Email us at [support@dartai.com](mailto:support@dartai.com)
133
91
 
134
-
135
92
  ## Contributing
136
93
 
137
94
  Contributions are welcome! Please open an issue or submit a pull request.
138
95
 
139
-
140
96
  ## License
141
97
 
142
98
  This project is licensed under [the MIT License](LICENSE).
@@ -0,0 +1,44 @@
1
+ # Admin functionality
2
+
3
+ - [Admin functionality](#admin-functionality)
4
+ - [Local setup](#local-setup)
5
+ - [Test with a different Python version](#test-with-a-different-python-version)
6
+ - [Sync API](#sync-api)
7
+ - [Deploy setup](#deploy-setup)
8
+ - [Deploy](#deploy)
9
+ - [Dependency updating](#dependency-updating)
10
+
11
+ ## Local setup
12
+
13
+ 1. Run `uv sync` to install the dependencies
14
+ 2. Run `cp -n .env.example .env` to copy the example environment file and then fill out all needed variables
15
+ 3. Run with `uv run dart [args ...]`
16
+
17
+ ## Test with a different Python version
18
+
19
+ 1. Choose the version with `uv venv --python 3.x`
20
+ 2. Run `uv sync`
21
+
22
+ ## Sync API
23
+
24
+ 1. Run `uv sync` as needed
25
+ 2. Run `make api`
26
+
27
+ ## Deploy setup
28
+
29
+ 1. Get an existing PyPI token or [make a new one](https://pypi.org/manage/account/token/)
30
+ 2. Set the `UV_PUBLISH_TOKEN` environment variable, for example, by running `export UV_PUBLISH_TOKEN=<PyPI token>`
31
+
32
+ ## Deploy
33
+
34
+ 1. Bump the version in `pyproject.toml`
35
+ 2. Run `uv sync`
36
+ 3. Run `make deploy`
37
+ 4. Commit and push all local changes to GitHub, then open and merge a PR there
38
+
39
+ ## Dependency updating
40
+
41
+ 1. Manually bump versions in `pyproject.toml`
42
+ 1. Bump the dependencies in `dependencies` to be `>=` the lowest functional minor version
43
+ 2. Bump the dependencies in `[dependency-groups]` to be `==` the latest patch version
44
+ 2. Run `make req-up-all`
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env bash
2
+ # -*- coding: utf-8 -*-
3
+
4
+ set -e
5
+
6
+ if [ -f .env ]; then
7
+ export $(grep -v '^#' .env | xargs)
8
+ fi
9
+
10
+ DART_API_SCHEMA_URL="${DART_HOST:-https://app.dartai.com}/api/v0/public/schema/"
11
+ GENERATED_PATH=$(pwd | sed 's:/admin$::')/dart/generated
12
+
13
+ uv run openapi-python-client generate --url $DART_API_SCHEMA_URL --output-path $GENERATED_PATH --overwrite --meta none
14
+
15
+ # Optimize API import paths
16
+ api_dir="$GENERATED_PATH/api"
17
+ init_file="$api_dir/__init__.py"
18
+
19
+ find "$api_dir" -type f -name "*.py" ! -name "__init__.py" | while read -r file; do
20
+ service=$(basename "$(dirname "$file")")
21
+ method=$(basename "$file" .py)
22
+ echo "from .$service import $method" >> "$init_file"
23
+ done
24
+
25
+ # Patch generated files to fix naming issues
26
+ echo "Patching generated files..."
27
+ if [ -f "$GENERATED_PATH/models/list_comments_o_item.py" ]; then
28
+ sed -i '' 's/VALUE_0 = "-published_at"/PUBLISHED_AT_DESC = "-published_at"/' "$GENERATED_PATH/models/list_comments_o_item.py"
29
+ echo "Fixed VALUE_0 enum key in list_comments_o_item.py"
30
+ fi
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ # -*- coding: utf-8 -*-
3
+
4
+ set -e
5
+
6
+ rm -rf dist
7
+ uv build
8
+ uv publish
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env bash
2
+ # -*- coding: utf-8 -*-
3
+
4
+ set -e
5
+
6
+ rm -rf layer.zip || true
7
+
8
+ cat << 'EOF' > Dockerfile
9
+ FROM public.ecr.aws/lambda/python:3.12
10
+ RUN dnf install -y gcc zip
11
+ WORKDIR /layer
12
+ RUN pip install dart-tools -t python/lib/python3.12/site-packages
13
+ RUN zip -r layer.zip python/
14
+ ENTRYPOINT []
15
+ CMD ["sleep", "1"]
16
+ EOF
17
+
18
+ docker build --no-cache --platform linux/amd64 -t layer-builder .
19
+ docker create --name layer layer-builder
20
+ docker cp layer:/layer/layer.zip ./layer.zip
21
+ docker rm layer
22
+
23
+ rm Dockerfile
@@ -85,6 +85,7 @@ _ROOT_PUBLIC_API_URL_FRAG = f"{_ROOT_PRIVATE_API_URL_FRAG}/public"
85
85
  _COPY_BRANCH_URL_FRAG = "/vcs/copy-branch-link"
86
86
 
87
87
  _AUTH_TOKEN_ENVVAR_KEY = "DART_TOKEN"
88
+ _HOST_ENVVAR_KEY = "DART_HOST"
88
89
  _CONFIG_FPATH = platformdirs.user_config_path(_APP)
89
90
  _CLIENT_ID_KEY = "clientId"
90
91
  _HOST_KEY = "host"
@@ -105,6 +106,8 @@ _DEFAULT_DARTBOARD = "General/Active"
105
106
 
106
107
  _VERSION = version(_APP)
107
108
  _AUTH_TOKEN_ENVVAR = os.environ.get(_AUTH_TOKEN_ENVVAR_KEY)
109
+ _HOST_ENVVAR = os.environ.get(_HOST_ENVVAR_KEY)
110
+ _DEFAULT_HOST = _HOST_ENVVAR or _PROD_HOST
108
111
 
109
112
 
110
113
  def _get_help_text(fn: Callable) -> str:
@@ -221,7 +224,7 @@ class _Config:
221
224
  pass
222
225
  self._content = {
223
226
  _CLIENT_ID_KEY: _make_id(),
224
- _HOST_KEY: _PROD_HOST,
227
+ _HOST_KEY: _DEFAULT_HOST,
225
228
  _HOSTS_KEY: {},
226
229
  } | self._content
227
230
  self._content[_HOSTS_KEY] = defaultdict(dict, self._content[_HOSTS_KEY])
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dart-tools
3
- Version: 0.8.5
3
+ Version: 0.8.6
4
4
  Summary: The Dart CLI and Python Library
5
5
  Author-email: Dart <software@dartai.com>
6
6
  License: MIT License
@@ -72,17 +72,12 @@ Dynamic: license-file
72
72
 
73
73
  [Dart](https://dartai.com?nr=1) is Project Management powered by AI.
74
74
 
75
- `dart-tools` is the Dart CLI and Python Library. It enables direct integration with Dart through a terminal CLI or through Python.
75
+ `dart-tools` is the Dart CLI and Python Library. It enables direct integration with Dart through a terminal CLI or through Python. It implements client functions to the [Dart Public API](https://app.dartai.com/api/v0/public/docs/).
76
76
 
77
77
  - [Installation](#installation)
78
78
  - [Naming conflicts](#naming-conflicts)
79
79
  - [Using the CLI](#using-the-cli)
80
80
  - [Using the Python Library](#using-the-python-library)
81
- - [Using the Python Library in AWS Lambda Functions](#using-the-python-library-in-aws-lambda-functions)
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)
86
81
  - [Help and Resources](#help-and-resources)
87
82
  - [Contributing](#contributing)
88
83
  - [License](#license)
@@ -147,43 +142,6 @@ new_task = create_task(
147
142
  update_task(new_task.id, status_title="Done")
148
143
  ```
149
144
 
150
- ## Using the Python Library in AWS Lambda Functions
151
-
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:
153
-
154
- ### Navigate to the directory containing your `lambda_function.py` source file. In this example, the directory is named `my_function`.
155
-
156
- ```sh
157
- cd my_function
158
- ```
159
-
160
- ### Create a Deployment Package
161
-
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:
163
-
164
- ```sh
165
- export RUNTIME_PYTHON_VERSION=3.12
166
- export RUNTIME_ARCHITECTURE=x86_64
167
- docker run --rm --volume ${PWD}:/app --entrypoint /bin/bash public.ecr.aws/lambda/python:${RUNTIME_PYTHON_VERSION}-${RUNTIME_ARCHITECTURE} -c "pip install --target /app/package dart-tools"
168
- ```
169
-
170
- This command installs the `dart-tools` library into a directory named `package` in your current working directory.
171
-
172
- ### Zip the contents of the `package` directory along with your `lambda_function.py`
173
-
174
- ```sh
175
- cd package
176
- zip -r ../my_deployment_package.zip .
177
- cd ..
178
- zip -r my_deployment_package.zip lambda_function.py
179
- ```
180
-
181
- ### Deploy the Lambda function
182
-
183
- Upload the `my_deployment_package.zip` file to AWS Lambda using the AWS Management Console or the AWS CLI.
184
-
185
- By following these steps, you can use the `dart-tools` Python library within your AWS Lambda functions.
186
-
187
145
  ## Help and Resources
188
146
 
189
147
  - [Homepage](https://dartai.com/?nr=1)
@@ -194,12 +152,10 @@ By following these steps, you can use the `dart-tools` Python library within you
194
152
  - [Chat on Discord](https://discord.gg/RExv8jEkSh)
195
153
  - Email us at [support@dartai.com](mailto:support@dartai.com)
196
154
 
197
-
198
155
  ## Contributing
199
156
 
200
157
  Contributions are welcome! Please open an issue or submit a pull request.
201
158
 
202
-
203
159
  ## License
204
160
 
205
161
  This project is licensed under [the MIT License](LICENSE).
@@ -1,6 +1,15 @@
1
+ .env.example
2
+ .gitattributes
3
+ .gitignore
1
4
  LICENSE
2
5
  README.md
6
+ makefile
3
7
  pyproject.toml
8
+ uv.lock
9
+ admin/README.md
10
+ admin/make-api.sh
11
+ admin/make-deploy.sh
12
+ admin/make-lambda-layer.sh
4
13
  dart/__init__.py
5
14
  dart/dart.py
6
15
  dart/exception.py
@@ -98,4 +107,10 @@ dart_tools.egg-info/SOURCES.txt
98
107
  dart_tools.egg-info/dependency_links.txt
99
108
  dart_tools.egg-info/entry_points.txt
100
109
  dart_tools.egg-info/requires.txt
101
- dart_tools.egg-info/top_level.txt
110
+ dart_tools.egg-info/top_level.txt
111
+ examples/Lambda functions.md
112
+ examples/replicate_space.py
113
+ examples/replicate_space_and_more.js
114
+ examples/upload_attachment.py
115
+ examples/watch_for_status_change.py
116
+ examples/webhook_server.py
@@ -0,0 +1,36 @@
1
+ # Lambda functions
2
+
3
+ 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:
4
+
5
+ ## Navigate to the directory containing your `lambda_function.py` source file. In this example, the directory is named `my_function`.
6
+
7
+ ```sh
8
+ cd my_function
9
+ ```
10
+
11
+ ## Create a Deployment Package
12
+
13
+ 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:
14
+
15
+ ```sh
16
+ export RUNTIME_PYTHON_VERSION=3.12
17
+ export RUNTIME_ARCHITECTURE=x86_64
18
+ docker run --rm --volume ${PWD}:/app --entrypoint /bin/bash public.ecr.aws/lambda/python:${RUNTIME_PYTHON_VERSION}-${RUNTIME_ARCHITECTURE} -c "pip install --target /app/package dart-tools"
19
+ ```
20
+
21
+ This command installs the `dart-tools` library into a directory named `package` in your current working directory.
22
+
23
+ ## Zip the contents of the `package` directory along with your `lambda_function.py`
24
+
25
+ ```sh
26
+ cd package
27
+ zip -r ../my_deployment_package.zip .
28
+ cd ..
29
+ zip -r my_deployment_package.zip lambda_function.py
30
+ ```
31
+
32
+ ## Deploy the Lambda function
33
+
34
+ Upload the `my_deployment_package.zip` file to AWS Lambda using the AWS Management Console or the AWS CLI.
35
+
36
+ By following these steps, you can use the `dart-tools` Python library within your AWS Lambda functions.
@@ -0,0 +1,50 @@
1
+ #! /usr/bin/env python3
2
+ # -*- coding: utf-8 -*-
3
+
4
+
5
+ from dart import (
6
+ create_task,
7
+ get_dartboards,
8
+ get_folders,
9
+ is_logged_in,
10
+ replicate_space,
11
+ update_dartboard,
12
+ update_folder,
13
+ )
14
+
15
+ # The DART_TOKEN environment variable must be set to the value from
16
+ # https://app.dartai.com/?settings=account at this point
17
+ is_logged_in(should_raise=True)
18
+
19
+
20
+ # You can get this ID from the space's three dot menu > 'Copy ID'
21
+ TEMPLATE_SPACE_ID = "J3h4WKcqRpnS"
22
+ NEW_COLOR_HEX = "#000000"
23
+
24
+ # Title is optional
25
+ new_space_id = replicate_space(
26
+ TEMPLATE_SPACE_ID,
27
+ title="New space title",
28
+ abrev="NST",
29
+ color_hex=NEW_COLOR_HEX,
30
+ accessible_by_team=True,
31
+ )
32
+
33
+ # Because space replication is async, you might need to add a timeout
34
+ # or loop until you get the expected number of dartboards here
35
+ dartboards = get_dartboards(new_space_id)
36
+ main_dartboard = [e for e in dartboards if e.title == "Dartboard title to change"][0]
37
+ # Update the relevant dartboard
38
+ update_dartboard(main_dartboard.duid, title="New dartboard title", color_hex=NEW_COLOR_HEX)
39
+
40
+ # Do the same for folders
41
+ folders = get_folders(new_space_id)
42
+ for folder in folders:
43
+ update_folder(folder.duid, title="New folder title", color_hex=NEW_COLOR_HEX)
44
+
45
+ # Create and assign tasks to the new dartboard
46
+ create_task(
47
+ dartboard_duid=main_dartboard.duid,
48
+ title="New task",
49
+ priority_int=0,
50
+ )