{"id":26315979,"url":"https://github.com/its-dart/dart-tools","last_synced_at":"2025-03-15T12:27:44.816Z","repository":{"id":150030821,"uuid":"607468795","full_name":"its-dart/dart-tools","owner":"its-dart","description":"Dart CLI and Python library","archived":false,"fork":false,"pushed_at":"2024-10-23T23:35:11.000Z","size":757,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-24T13:08:50.214Z","etag":null,"topics":["cli","dart","library","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/dart-tools/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/its-dart.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-28T02:55:06.000Z","updated_at":"2024-10-23T23:35:15.000Z","dependencies_parsed_at":"2023-12-19T03:19:20.472Z","dependency_job_id":"e7de60e3-254c-4e02-a216-604599c5a94e","html_url":"https://github.com/its-dart/dart-tools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/its-dart%2Fdart-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/its-dart%2Fdart-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/its-dart%2Fdart-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/its-dart%2Fdart-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/its-dart","download_url":"https://codeload.github.com/its-dart/dart-tools/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243729427,"owners_count":20338466,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","dart","library","python"],"created_at":"2025-03-15T12:27:44.380Z","updated_at":"2025-03-15T12:27:44.801Z","avatar_url":"https://github.com/its-dart.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003eDart Tools\u003c/h1\u003e\n  \u003cp\u003e\n    \u003ca href=\"https://pypi.org/project/dart-tools\"\u003e\u003cimg src=\"https://img.shields.io/pypi/v/dart-tools\" alt=\"PyPI\"\u003e\u003c/a\u003e\n    \u003ca href=\"pyproject.toml\"\u003e\u003cimg src=\"https://img.shields.io/pypi/pyversions/dart-tools\" alt=\"Supported Python Versions\"\u003e\u003c/a\u003e\n    \u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/its-dart/dart-tools\" alt=\"License\"\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n[Dart](https://itsdart.com?nr=1) is Project Management powered by AI.\n\n`dart-tools` is the Dart CLI and Python Library. It enables direct integration with Dart through a terminal CLI or through Python.\n\n\n- [Installation](#installation)\n- [Using the CLI](#using-the-cli)\n- [Using the Python Library](#using-the-python-library)\n- [Using the Python Library in AWS Lambda Functions](#using-the-python-library-in-aws-lambda-functions)\n- [Advanced Usage](#advanced-usage)\n- [Help and Resources](#help-and-resources)\n- [Contributing](#contributing)\n- [License](#license)\n\n\n## Installation\n\nIn the terminal, install by running\n```sh\npip install dart-tools\n```\n\n\n## Using the CLI\n\nStart off by setting up authentication with\n```sh\ndart login\n```\n\nThen, you can create a new task with a command along the lines of\n```sh\ndart createtask \"Update the landing page\" -p0 --tag marketing\n```\nwhich will make a new task called 'Update the landing page' with priority 'Critical' (i.e. P0) and with the 'marketing' tag.\n\nYou can explore all of these options and many more with `dart --help` or the more specific help for subcommands, in this case `dart createtask --help`.\n\nAnother common workflow is to updating a preexisting task. To do this, run something like\n```sh\ndart updatetask [DUID] -s Done\n```\nThis command will mark the referenced task 'Done'. Here `[DUID]` is meant to be replaced (including the brackets) with the 'Dart ID' of an existing task. You can get a DUID 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'.\n\n\n## Using the Python Library\n\nFirst, 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.\n\nThen, you can run something like\n```python\nimport os\nfrom dart import create_task, is_logged_in, update_task\n\n# Check that auth is set up and stop if not, can remove this once everything is set up\nis_logged_in(should_raise=True)\n\n# Create a new task called 'Update the landing page' with priority 'Critical' (i.e. p0) and with the 'marketing' tag\nnew_task = create_task(\n    \"Update the landing page\", priority_int=0, tag_titles=[\"marketing\"]\n)\n\n# Update the task to be 'Done'\nupdate_task(new_task.duid, status_title=\"Done\")\n```\n\n\n## Using the Python Library in AWS Lambda Functions\n\nTo 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:\n\n1. Navigate to the directory containing your `lambda_function.py` source file. In this example, the directory is named `my_function`.\n\n  ```sh\n  cd my_function\n  ```\n\n2. Create a Deployment Package\n\n  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:\n\n  ```sh\n  export RUNTIME_PYTHON_VERSION=3.12\n  export RUNTIME_ARCHITECTURE=x86_64\n  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\"\n  ```\n\n  This command installs the `dart-tools` library into a directory named `package` in your current working directory.\n\n3. Zip the contents of the `package` directory along with your `lambda_function.py`\n\n  ```sh\n  cd package\n  zip -r ../my_deployment_package.zip .\n  cd ..\n  zip -r my_deployment_package.zip lambda_function.py\n  ```\n\n4. Deploy the Lambda function\n\n  Upload the `my_deployment_package.zip` file to AWS Lambda using the AWS Management Console or the AWS CLI.\n\nBy following these steps, you can use the `dart-tools` Python library within your AWS Lambda functions.\n\n\n## Advanced Usage\n\nAlmost anything that can be done in Dart can be done with the Python library, but there are not convenient wrapper functions for everything.\nFor most advanced usage, the best thing to do is to [get in touch with us](mailto:support@itsdart.com) and we can help.\n\nHowever, if you want to explore on your own, the client is well-typed, so you can simply explore the code to see what is possible.\nAll updates will go through the the `dart.transact` function.\n\nAs an example, you could run something akin to `update_task` with\n```python\nfrom dart import (\n    Dart,\n    Operation,\n    OperationKind,\n    OperationModelKind,\n    TaskUpdate,\n    TransactionKind,\n)\n\n# Initialize the inner client\ndart = Dart()\n\n# Prepare the update operation\ntask_update = TaskUpdate(\n    duid=\"[DUID]\",\n    size=5,\n)\ntask_update_op = Operation(\n    model=OperationModelKind.TASK,\n    kind=OperationKind.UPDATE,\n    data=task_update,\n)\n\n# Call the operation transactionally to perform the update\nresponse = dart.transact([task_update_op], TransactionKind.TASK_UPDATE)\n```\n\n\n## Help and Resources\n\n- [Homepage](https://www.itsdart.com/?nr=1)\n- [Web App](https://app.itsdart.com/)\n- [Help Center](https://help.itsdart.com/)\n- [Bugs and Features](https://app.itsdart.com/p/r/JFyPnhL9En61)\n- [Library Source](https://github.com/its-dart/dart-tools/)\n- [Chat on Discord](https://discord.gg/RExv8jEkSh)\n- Email us at [support@itsdart.com](mailto:support@itsdart.com)\n\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request.\n\n\n## License\n\nThis project is licensed under [the MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fits-dart%2Fdart-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fits-dart%2Fdart-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fits-dart%2Fdart-tools/lists"}