dart-tools 0.8.4__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.4 → dart_tools-0.8.6}/PKG-INFO +2 -46
  5. {dart_tools-0.8.4 → 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.4 → dart_tools-0.8.6}/dart/dart.py +5 -2
  11. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/api/doc/list_docs.py +30 -0
  12. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/api/task/list_tasks.py +206 -0
  13. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/__init__.py +2 -0
  14. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/concise_task.py +58 -0
  15. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/list_docs_o_item.py +5 -3
  16. dart_tools-0.8.6/dart/generated/models/list_tasks_o_item.py +17 -0
  17. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/task.py +58 -0
  18. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart_tools.egg-info/PKG-INFO +2 -46
  19. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart_tools.egg-info/SOURCES.txt +17 -1
  20. dart_tools-0.8.6/examples/Lambda functions.md +36 -0
  21. dart_tools-0.8.6/examples/replicate_space.py +50 -0
  22. dart_tools-0.8.6/examples/replicate_space_and_more.js +102 -0
  23. dart_tools-0.8.6/examples/upload_attachment.py +112 -0
  24. dart_tools-0.8.6/examples/watch_for_status_change.py +41 -0
  25. dart_tools-0.8.6/examples/webhook_server.py +70 -0
  26. dart_tools-0.8.6/makefile +21 -0
  27. {dart_tools-0.8.4 → dart_tools-0.8.6}/pyproject.toml +1 -1
  28. dart_tools-0.8.6/uv.lock +971 -0
  29. {dart_tools-0.8.4 → dart_tools-0.8.6}/LICENSE +0 -0
  30. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/__init__.py +0 -0
  31. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/exception.py +0 -0
  32. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/__init__.py +0 -0
  33. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/api/__init__.py +0 -0
  34. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/api/attachment/__init__.py +0 -0
  35. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/api/attachment/add_task_attachment_from_url.py +0 -0
  36. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/api/comment/__init__.py +0 -0
  37. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/api/comment/add_task_comment.py +0 -0
  38. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/api/comment/list_comments.py +0 -0
  39. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/api/config/__init__.py +0 -0
  40. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/api/config/get_config.py +0 -0
  41. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/api/dartboard/__init__.py +0 -0
  42. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/api/dartboard/get_dartboard.py +0 -0
  43. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/api/doc/__init__.py +0 -0
  44. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/api/doc/create_doc.py +0 -0
  45. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/api/doc/delete_doc.py +0 -0
  46. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/api/doc/get_doc.py +0 -0
  47. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/api/doc/update_doc.py +0 -0
  48. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/api/folder/__init__.py +0 -0
  49. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/api/folder/get_folder.py +0 -0
  50. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/api/help_center_article/__init__.py +0 -0
  51. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/api/help_center_article/list_help_center_articles.py +0 -0
  52. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/api/skill/__init__.py +0 -0
  53. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/api/skill/retrieve_skill_by_title.py +0 -0
  54. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/api/task/__init__.py +0 -0
  55. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/api/task/create_task.py +0 -0
  56. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/api/task/delete_task.py +0 -0
  57. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/api/task/get_task.py +0 -0
  58. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/api/task/update_task.py +0 -0
  59. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/api/view/__init__.py +0 -0
  60. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/api/view/get_view.py +0 -0
  61. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/client.py +0 -0
  62. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/errors.py +0 -0
  63. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/attachment.py +0 -0
  64. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/attachment_create_from_url.py +0 -0
  65. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/comment.py +0 -0
  66. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/comment_create.py +0 -0
  67. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/concise_doc.py +0 -0
  68. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/custom_properties.py +0 -0
  69. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/dartboard.py +0 -0
  70. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/doc.py +0 -0
  71. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/doc_create.py +0 -0
  72. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/doc_update.py +0 -0
  73. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/folder.py +0 -0
  74. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/list_comments_o_item.py +0 -0
  75. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/paginated_comment_list.py +0 -0
  76. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/paginated_concise_doc_list.py +0 -0
  77. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/paginated_concise_task_list.py +0 -0
  78. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/priority.py +0 -0
  79. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/skill.py +0 -0
  80. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/task_create.py +0 -0
  81. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/task_relationships_type_0.py +0 -0
  82. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/task_update.py +0 -0
  83. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/time_tracking_entry.py +0 -0
  84. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/user.py +0 -0
  85. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/user_space_configuration.py +0 -0
  86. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/user_space_configuration_custom_property_checkbox_type_def.py +0 -0
  87. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/user_space_configuration_custom_property_dates_type_def.py +0 -0
  88. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/user_space_configuration_custom_property_multiselect_type_def.py +0 -0
  89. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/user_space_configuration_custom_property_number_type_def.py +0 -0
  90. {dart_tools-0.8.4 → 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.4 → dart_tools-0.8.6}/dart/generated/models/user_space_configuration_custom_property_select_type_def.py +0 -0
  92. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/user_space_configuration_custom_property_status_type_def.py +0 -0
  93. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/user_space_configuration_custom_property_text_type_def.py +0 -0
  94. {dart_tools-0.8.4 → 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.4 → dart_tools-0.8.6}/dart/generated/models/user_space_configuration_custom_property_user_type_def.py +0 -0
  96. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/view.py +0 -0
  97. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/wrapped_comment.py +0 -0
  98. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/wrapped_comment_create.py +0 -0
  99. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/wrapped_dartboard.py +0 -0
  100. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/wrapped_doc.py +0 -0
  101. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/wrapped_doc_create.py +0 -0
  102. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/wrapped_doc_update.py +0 -0
  103. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/wrapped_folder.py +0 -0
  104. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/wrapped_help_center_articles.py +0 -0
  105. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/wrapped_skill.py +0 -0
  106. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/wrapped_task.py +0 -0
  107. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/wrapped_task_create.py +0 -0
  108. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/wrapped_task_update.py +0 -0
  109. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/models/wrapped_view.py +0 -0
  110. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/generated/types.py +0 -0
  111. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/old.py +0 -0
  112. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/order_manager.py +0 -0
  113. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart/webhook.py +0 -0
  114. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart_tools.egg-info/dependency_links.txt +0 -0
  115. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart_tools.egg-info/entry_points.txt +0 -0
  116. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart_tools.egg-info/requires.txt +0 -0
  117. {dart_tools-0.8.4 → dart_tools-0.8.6}/dart_tools.egg-info/top_level.txt +0 -0
  118. {dart_tools-0.8.4 → 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.4
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
@@ -60,7 +60,7 @@ _PROG = "dart"
60
60
 
61
61
  _PROD_HOST = "https://app.dartai.com"
62
62
  _STAG_HOST = "https://stag.dartai.com"
63
- _DEV_HOST = "http://localhost:5173"
63
+ _DEV_HOST = "http://localhost:5100"
64
64
  _HOST_MAP = {"prod": _PROD_HOST, "stag": _STAG_HOST, "dev": _DEV_HOST}
65
65
 
66
66
  # Service commands
@@ -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])
@@ -12,11 +12,13 @@ from ...types import UNSET, Response, Unset
12
12
 
13
13
  def _get_kwargs(
14
14
  *,
15
+ editor: Union[Unset, str] = UNSET,
15
16
  folder: Union[Unset, str] = UNSET,
16
17
  folder_id: Union[Unset, str] = UNSET,
17
18
  ids: Union[Unset, str] = UNSET,
18
19
  in_trash: Union[Unset, bool] = UNSET,
19
20
  limit: Union[Unset, int] = UNSET,
21
+ no_defaults: Union[Unset, bool] = False,
20
22
  o: Union[Unset, list[ListDocsOItem]] = UNSET,
21
23
  offset: Union[Unset, int] = UNSET,
22
24
  s: Union[Unset, str] = UNSET,
@@ -25,6 +27,8 @@ def _get_kwargs(
25
27
  ) -> dict[str, Any]:
26
28
  params: dict[str, Any] = {}
27
29
 
30
+ params["editor"] = editor
31
+
28
32
  params["folder"] = folder
29
33
 
30
34
  params["folder_id"] = folder_id
@@ -35,6 +39,8 @@ def _get_kwargs(
35
39
 
36
40
  params["limit"] = limit
37
41
 
42
+ params["no_defaults"] = no_defaults
43
+
38
44
  json_o: Union[Unset, list[str]] = UNSET
39
45
  if not isinstance(o, Unset):
40
46
  json_o = []
@@ -90,11 +96,13 @@ def _build_response(
90
96
  def sync_detailed(
91
97
  *,
92
98
  client: Union[AuthenticatedClient, Client],
99
+ editor: Union[Unset, str] = UNSET,
93
100
  folder: Union[Unset, str] = UNSET,
94
101
  folder_id: Union[Unset, str] = UNSET,
95
102
  ids: Union[Unset, str] = UNSET,
96
103
  in_trash: Union[Unset, bool] = UNSET,
97
104
  limit: Union[Unset, int] = UNSET,
105
+ no_defaults: Union[Unset, bool] = False,
98
106
  o: Union[Unset, list[ListDocsOItem]] = UNSET,
99
107
  offset: Union[Unset, int] = UNSET,
100
108
  s: Union[Unset, str] = UNSET,
@@ -105,11 +113,13 @@ def sync_detailed(
105
113
  full-text search. Sort by creation/update date or title. Supports pagination.
106
114
 
107
115
  Args:
116
+ editor (Union[Unset, str]):
108
117
  folder (Union[Unset, str]):
109
118
  folder_id (Union[Unset, str]):
110
119
  ids (Union[Unset, str]):
111
120
  in_trash (Union[Unset, bool]):
112
121
  limit (Union[Unset, int]):
122
+ no_defaults (Union[Unset, bool]): Default: False.
113
123
  o (Union[Unset, list[ListDocsOItem]]):
114
124
  offset (Union[Unset, int]):
115
125
  s (Union[Unset, str]):
@@ -125,11 +135,13 @@ def sync_detailed(
125
135
  """
126
136
 
127
137
  kwargs = _get_kwargs(
138
+ editor=editor,
128
139
  folder=folder,
129
140
  folder_id=folder_id,
130
141
  ids=ids,
131
142
  in_trash=in_trash,
132
143
  limit=limit,
144
+ no_defaults=no_defaults,
133
145
  o=o,
134
146
  offset=offset,
135
147
  s=s,
@@ -147,11 +159,13 @@ def sync_detailed(
147
159
  def sync(
148
160
  *,
149
161
  client: Union[AuthenticatedClient, Client],
162
+ editor: Union[Unset, str] = UNSET,
150
163
  folder: Union[Unset, str] = UNSET,
151
164
  folder_id: Union[Unset, str] = UNSET,
152
165
  ids: Union[Unset, str] = UNSET,
153
166
  in_trash: Union[Unset, bool] = UNSET,
154
167
  limit: Union[Unset, int] = UNSET,
168
+ no_defaults: Union[Unset, bool] = False,
155
169
  o: Union[Unset, list[ListDocsOItem]] = UNSET,
156
170
  offset: Union[Unset, int] = UNSET,
157
171
  s: Union[Unset, str] = UNSET,
@@ -162,11 +176,13 @@ def sync(
162
176
  full-text search. Sort by creation/update date or title. Supports pagination.
163
177
 
164
178
  Args:
179
+ editor (Union[Unset, str]):
165
180
  folder (Union[Unset, str]):
166
181
  folder_id (Union[Unset, str]):
167
182
  ids (Union[Unset, str]):
168
183
  in_trash (Union[Unset, bool]):
169
184
  limit (Union[Unset, int]):
185
+ no_defaults (Union[Unset, bool]): Default: False.
170
186
  o (Union[Unset, list[ListDocsOItem]]):
171
187
  offset (Union[Unset, int]):
172
188
  s (Union[Unset, str]):
@@ -183,11 +199,13 @@ def sync(
183
199
 
184
200
  return sync_detailed(
185
201
  client=client,
202
+ editor=editor,
186
203
  folder=folder,
187
204
  folder_id=folder_id,
188
205
  ids=ids,
189
206
  in_trash=in_trash,
190
207
  limit=limit,
208
+ no_defaults=no_defaults,
191
209
  o=o,
192
210
  offset=offset,
193
211
  s=s,
@@ -199,11 +217,13 @@ def sync(
199
217
  async def asyncio_detailed(
200
218
  *,
201
219
  client: Union[AuthenticatedClient, Client],
220
+ editor: Union[Unset, str] = UNSET,
202
221
  folder: Union[Unset, str] = UNSET,
203
222
  folder_id: Union[Unset, str] = UNSET,
204
223
  ids: Union[Unset, str] = UNSET,
205
224
  in_trash: Union[Unset, bool] = UNSET,
206
225
  limit: Union[Unset, int] = UNSET,
226
+ no_defaults: Union[Unset, bool] = False,
207
227
  o: Union[Unset, list[ListDocsOItem]] = UNSET,
208
228
  offset: Union[Unset, int] = UNSET,
209
229
  s: Union[Unset, str] = UNSET,
@@ -214,11 +234,13 @@ async def asyncio_detailed(
214
234
  full-text search. Sort by creation/update date or title. Supports pagination.
215
235
 
216
236
  Args:
237
+ editor (Union[Unset, str]):
217
238
  folder (Union[Unset, str]):
218
239
  folder_id (Union[Unset, str]):
219
240
  ids (Union[Unset, str]):
220
241
  in_trash (Union[Unset, bool]):
221
242
  limit (Union[Unset, int]):
243
+ no_defaults (Union[Unset, bool]): Default: False.
222
244
  o (Union[Unset, list[ListDocsOItem]]):
223
245
  offset (Union[Unset, int]):
224
246
  s (Union[Unset, str]):
@@ -234,11 +256,13 @@ async def asyncio_detailed(
234
256
  """
235
257
 
236
258
  kwargs = _get_kwargs(
259
+ editor=editor,
237
260
  folder=folder,
238
261
  folder_id=folder_id,
239
262
  ids=ids,
240
263
  in_trash=in_trash,
241
264
  limit=limit,
265
+ no_defaults=no_defaults,
242
266
  o=o,
243
267
  offset=offset,
244
268
  s=s,
@@ -254,11 +278,13 @@ async def asyncio_detailed(
254
278
  async def asyncio(
255
279
  *,
256
280
  client: Union[AuthenticatedClient, Client],
281
+ editor: Union[Unset, str] = UNSET,
257
282
  folder: Union[Unset, str] = UNSET,
258
283
  folder_id: Union[Unset, str] = UNSET,
259
284
  ids: Union[Unset, str] = UNSET,
260
285
  in_trash: Union[Unset, bool] = UNSET,
261
286
  limit: Union[Unset, int] = UNSET,
287
+ no_defaults: Union[Unset, bool] = False,
262
288
  o: Union[Unset, list[ListDocsOItem]] = UNSET,
263
289
  offset: Union[Unset, int] = UNSET,
264
290
  s: Union[Unset, str] = UNSET,
@@ -269,11 +295,13 @@ async def asyncio(
269
295
  full-text search. Sort by creation/update date or title. Supports pagination.
270
296
 
271
297
  Args:
298
+ editor (Union[Unset, str]):
272
299
  folder (Union[Unset, str]):
273
300
  folder_id (Union[Unset, str]):
274
301
  ids (Union[Unset, str]):
275
302
  in_trash (Union[Unset, bool]):
276
303
  limit (Union[Unset, int]):
304
+ no_defaults (Union[Unset, bool]): Default: False.
277
305
  o (Union[Unset, list[ListDocsOItem]]):
278
306
  offset (Union[Unset, int]):
279
307
  s (Union[Unset, str]):
@@ -291,11 +319,13 @@ async def asyncio(
291
319
  return (
292
320
  await asyncio_detailed(
293
321
  client=client,
322
+ editor=editor,
294
323
  folder=folder,
295
324
  folder_id=folder_id,
296
325
  ids=ids,
297
326
  in_trash=in_trash,
298
327
  limit=limit,
328
+ no_defaults=no_defaults,
299
329
  o=o,
300
330
  offset=offset,
301
331
  s=s,