asana-api-cli 1.5.0__tar.gz → 2.0.0__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.
Files changed (74) hide show
  1. {asana_api_cli-1.5.0/src/asana_api_cli.egg-info → asana_api_cli-2.0.0}/PKG-INFO +77 -8
  2. {asana_api_cli-1.5.0 → asana_api_cli-2.0.0}/README.md +72 -3
  3. {asana_api_cli-1.5.0 → asana_api_cli-2.0.0}/pyproject.toml +5 -6
  4. asana_api_cli-2.0.0/src/asana_api_cli/cli.py +622 -0
  5. {asana_api_cli-1.5.0 → asana_api_cli-2.0.0}/src/asana_api_cli/click_ext.py +4 -4
  6. {asana_api_cli-1.5.0 → asana_api_cli-2.0.0/src/asana_api_cli.egg-info}/PKG-INFO +77 -8
  7. asana_api_cli-2.0.0/src/asana_api_cli.egg-info/SOURCES.txt +22 -0
  8. asana_api_cli-2.0.0/src/asana_api_cli.egg-info/requires.txt +4 -0
  9. asana_api_cli-2.0.0/tests/test_cli.py +251 -0
  10. asana_api_cli-2.0.0/tests/test_cli_surface.py +81 -0
  11. {asana_api_cli-1.5.0 → asana_api_cli-2.0.0}/tests/test_formatter.py +0 -1
  12. {asana_api_cli-1.5.0 → asana_api_cli-2.0.0}/tests/test_session.py +0 -2
  13. asana_api_cli-1.5.0/src/asana_api_cli/cli/__init__.py +0 -93
  14. asana_api_cli-1.5.0/src/asana_api_cli/cli/access_requests.py +0 -67
  15. asana_api_cli-1.5.0/src/asana_api_cli/cli/allocations.py +0 -112
  16. asana_api_cli-1.5.0/src/asana_api_cli/cli/attachments.py +0 -103
  17. asana_api_cli-1.5.0/src/asana_api_cli/cli/audit_log_api.py +0 -63
  18. asana_api_cli-1.5.0/src/asana_api_cli/cli/batch_api.py +0 -31
  19. asana_api_cli-1.5.0/src/asana_api_cli/cli/budgets.py +0 -80
  20. asana_api_cli-1.5.0/src/asana_api_cli/cli/custom_field_settings.py +0 -123
  21. asana_api_cli-1.5.0/src/asana_api_cli/cli/custom_fields.py +0 -144
  22. asana_api_cli-1.5.0/src/asana_api_cli/cli/custom_types.py +0 -61
  23. asana_api_cli-1.5.0/src/asana_api_cli/cli/events.py +0 -33
  24. asana_api_cli-1.5.0/src/asana_api_cli/cli/exports.py +0 -40
  25. asana_api_cli-1.5.0/src/asana_api_cli/cli/goal_relationships.py +0 -109
  26. asana_api_cli-1.5.0/src/asana_api_cli/cli/goals.py +0 -228
  27. asana_api_cli-1.5.0/src/asana_api_cli/cli/jobs.py +0 -30
  28. asana_api_cli-1.5.0/src/asana_api_cli/cli/memberships.py +0 -100
  29. asana_api_cli-1.5.0/src/asana_api_cli/cli/organization_exports.py +0 -45
  30. asana_api_cli-1.5.0/src/asana_api_cli/cli/portfolio_memberships.py +0 -104
  31. asana_api_cli-1.5.0/src/asana_api_cli/cli/portfolios.py +0 -236
  32. asana_api_cli-1.5.0/src/asana_api_cli/cli/project_briefs.py +0 -73
  33. asana_api_cli-1.5.0/src/asana_api_cli/cli/project_memberships.py +0 -64
  34. asana_api_cli-1.5.0/src/asana_api_cli/cli/project_portfolio_settings.py +0 -108
  35. asana_api_cli-1.5.0/src/asana_api_cli/cli/project_statuses.py +0 -88
  36. asana_api_cli-1.5.0/src/asana_api_cli/cli/project_templates.py +0 -123
  37. asana_api_cli-1.5.0/src/asana_api_cli/cli/projects.py +0 -421
  38. asana_api_cli-1.5.0/src/asana_api_cli/cli/rates.py +0 -108
  39. asana_api_cli-1.5.0/src/asana_api_cli/cli/reactions.py +0 -45
  40. asana_api_cli-1.5.0/src/asana_api_cli/cli/roles.py +0 -109
  41. asana_api_cli-1.5.0/src/asana_api_cli/cli/rules.py +0 -29
  42. asana_api_cli-1.5.0/src/asana_api_cli/cli/sections.py +0 -122
  43. asana_api_cli-1.5.0/src/asana_api_cli/cli/status_updates.py +0 -107
  44. asana_api_cli-1.5.0/src/asana_api_cli/cli/stories.py +0 -151
  45. asana_api_cli-1.5.0/src/asana_api_cli/cli/tags.py +0 -186
  46. asana_api_cli-1.5.0/src/asana_api_cli/cli/task_templates.py +0 -88
  47. asana_api_cli-1.5.0/src/asana_api_cli/cli/tasks.py +0 -601
  48. asana_api_cli-1.5.0/src/asana_api_cli/cli/team_memberships.py +0 -134
  49. asana_api_cli-1.5.0/src/asana_api_cli/cli/teams.py +0 -154
  50. asana_api_cli-1.5.0/src/asana_api_cli/cli/time_periods.py +0 -68
  51. asana_api_cli-1.5.0/src/asana_api_cli/cli/time_tracking_categories.py +0 -144
  52. asana_api_cli-1.5.0/src/asana_api_cli/cli/time_tracking_entries.py +0 -159
  53. asana_api_cli-1.5.0/src/asana_api_cli/cli/timesheet_approval_statuses.py +0 -105
  54. asana_api_cli-1.5.0/src/asana_api_cli/cli/typeahead.py +0 -41
  55. asana_api_cli-1.5.0/src/asana_api_cli/cli/user_task_lists.py +0 -46
  56. asana_api_cli-1.5.0/src/asana_api_cli/cli/users.py +0 -194
  57. asana_api_cli-1.5.0/src/asana_api_cli/cli/webhooks.py +0 -107
  58. asana_api_cli-1.5.0/src/asana_api_cli/cli/workspace_memberships.py +0 -96
  59. asana_api_cli-1.5.0/src/asana_api_cli/cli/workspaces.py +0 -124
  60. asana_api_cli-1.5.0/src/asana_api_cli.egg-info/SOURCES.txt +0 -67
  61. asana_api_cli-1.5.0/src/asana_api_cli.egg-info/requires.txt +0 -4
  62. asana_api_cli-1.5.0/tests/test_codegen.py +0 -290
  63. {asana_api_cli-1.5.0 → asana_api_cli-2.0.0}/LICENSE +0 -0
  64. {asana_api_cli-1.5.0 → asana_api_cli-2.0.0}/setup.cfg +0 -0
  65. {asana_api_cli-1.5.0 → asana_api_cli-2.0.0}/src/asana_api_cli/__init__.py +0 -0
  66. {asana_api_cli-1.5.0 → asana_api_cli-2.0.0}/src/asana_api_cli/formatter.py +0 -0
  67. {asana_api_cli-1.5.0 → asana_api_cli-2.0.0}/src/asana_api_cli/session.py +0 -0
  68. {asana_api_cli-1.5.0 → asana_api_cli-2.0.0}/src/asana_api_cli/version.py +0 -0
  69. {asana_api_cli-1.5.0 → asana_api_cli-2.0.0}/src/asana_api_cli.egg-info/dependency_links.txt +0 -0
  70. {asana_api_cli-1.5.0 → asana_api_cli-2.0.0}/src/asana_api_cli.egg-info/entry_points.txt +0 -0
  71. {asana_api_cli-1.5.0 → asana_api_cli-2.0.0}/src/asana_api_cli.egg-info/top_level.txt +0 -0
  72. {asana_api_cli-1.5.0 → asana_api_cli-2.0.0}/tests/test_click_ext.py +0 -0
  73. {asana_api_cli-1.5.0 → asana_api_cli-2.0.0}/tests/test_py310_compat.py +0 -0
  74. {asana_api_cli-1.5.0 → asana_api_cli-2.0.0}/tests/test_version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: asana-api-cli
3
- Version: 1.5.0
3
+ Version: 2.0.0
4
4
  Summary: Command-line wrapper around the official Asana Python SDK
5
5
  Author-email: Masanao Izumo <asana@masanao.site>
6
6
  License-Expression: MIT
@@ -11,27 +11,96 @@ Project-URL: Changelog, https://github.com/izumo-m/asana-api-cli/blob/main/CHANG
11
11
  Requires-Python: >=3.10
12
12
  Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
- Requires-Dist: click<9,>=8.1
15
- Requires-Dist: jq<2,>=1.8
16
- Requires-Dist: tabulate<1,>=0.9
17
- Requires-Dist: asana<6,>=5.2.4
14
+ Requires-Dist: click>=8.0
15
+ Requires-Dist: jq>=1.5
16
+ Requires-Dist: tabulate>=0.9
17
+ Requires-Dist: asana<6,>=5.2
18
18
  Dynamic: license-file
19
19
 
20
20
  # asana-api-cli
21
21
 
22
- A CLI tool for the Asana API. It thinly wraps the official
22
+ A CLI for the Asana API. It thinly wraps the official
23
23
  [python-asana](https://github.com/Asana/python-asana) SDK with click, exposing
24
- every API endpoint from the command line via `asana-api <group> <command>`.
24
+ every endpoint as `asana-api <group> <command>`.
25
+
26
+ ## Why asana-api-cli
27
+
28
+ - **Near-complete SDK coverage.** Almost every method on every `*Api` class in
29
+ python-asana is available as a CLI command. The command tree is built at
30
+ runtime from the installed `asana` package, so new APIs surface as the
31
+ upstream library evolves — no asana-api-cli release required.
32
+ - **Tracks the SDK version you actually use.** Because commands are
33
+ introspected from whatever `asana` is installed alongside, the CLI surface
34
+ matches the SDK version pinned in your project. When using asana-api-cli
35
+ as a dev-dependency, `pip install -U asana` updates the CLI's available
36
+ endpoints in lockstep with your application code.
37
+ - **SDK-compatible arguments and output.** Command arguments map to
38
+ python-asana method parameters (with minor naming adjustments — hyphens
39
+ become underscores, group names become PascalCase API classes), and JSON
40
+ output matches the SDK's response shape. The CLI makes it easy to iterate:
41
+ try different arguments, inspect the response, and refine until you
42
+ understand the endpoint's behavior. Once verified, port the call into your
43
+ Python app — far fewer surprises on the first integration.
25
44
 
26
45
  ## Installation
27
46
 
28
47
  ```bash
29
48
  pip install asana-api-cli
49
+ ```
50
+
51
+ For best results, install asana-api-cli into the same Python environment
52
+ that holds your project's `python-asana` so the CLI surface tracks the
53
+ exact SDK version your application uses (see [As a
54
+ dev-dependency](#as-a-dev-dependency) below).
55
+
56
+ ### As a dev-dependency
57
+
58
+ If your project already uses `python-asana`, add asana-api-cli to your dev
59
+ group so the CLI tracks the same SDK version your application code uses:
60
+
61
+ ```toml
62
+ # pyproject.toml
63
+ [project]
64
+ dependencies = ["asana>=5.2,<6"]
65
+
66
+ [dependency-groups] # uv
67
+ dev = ["asana-api-cli"]
68
+ ```
69
+
70
+ ```toml
71
+ # Poetry
72
+ [tool.poetry.group.dev.dependencies]
73
+ asana-api-cli = "*"
74
+ ```
30
75
 
31
- # or, to install as an isolated CLI tool
76
+ After `uv sync` (or equivalent), `asana-api` resolves to the project's
77
+ `.venv` and introspects whatever `asana` version is locked there. Tests
78
+ prototyped with `asana-api tasks ...` will exactly match the SDK calls in
79
+ your app.
80
+
81
+ ### Installing globally with pipx
82
+
83
+ If you would rather isolate asana-api-cli from any project's dependencies
84
+ — for example, when you administer Asana from the shell without writing
85
+ Python — install it with [pipx](https://pipx.pypa.io/):
86
+
87
+ ```bash
32
88
  pipx install asana-api-cli
33
89
  ```
34
90
 
91
+ In this setup the CLI uses the `python-asana` version that shipped with
92
+ the asana-api-cli release; `pipx upgrade asana-api-cli` updates only
93
+ asana-api-cli itself, not the bundled `python-asana`. To pull a newer
94
+ `python-asana` into the existing pipx install without reinstalling the
95
+ CLI:
96
+
97
+ ```bash
98
+ pipx runpip asana-api-cli install -U asana
99
+ ```
100
+
101
+ The next `asana-api` run sees the new SDK and any newly added endpoints
102
+ automatically.
103
+
35
104
  ## Environment variables
36
105
 
37
106
  | Name | Required | Description |
@@ -1,18 +1,87 @@
1
1
  # asana-api-cli
2
2
 
3
- A CLI tool for the Asana API. It thinly wraps the official
3
+ A CLI for the Asana API. It thinly wraps the official
4
4
  [python-asana](https://github.com/Asana/python-asana) SDK with click, exposing
5
- every API endpoint from the command line via `asana-api <group> <command>`.
5
+ every endpoint as `asana-api <group> <command>`.
6
+
7
+ ## Why asana-api-cli
8
+
9
+ - **Near-complete SDK coverage.** Almost every method on every `*Api` class in
10
+ python-asana is available as a CLI command. The command tree is built at
11
+ runtime from the installed `asana` package, so new APIs surface as the
12
+ upstream library evolves — no asana-api-cli release required.
13
+ - **Tracks the SDK version you actually use.** Because commands are
14
+ introspected from whatever `asana` is installed alongside, the CLI surface
15
+ matches the SDK version pinned in your project. When using asana-api-cli
16
+ as a dev-dependency, `pip install -U asana` updates the CLI's available
17
+ endpoints in lockstep with your application code.
18
+ - **SDK-compatible arguments and output.** Command arguments map to
19
+ python-asana method parameters (with minor naming adjustments — hyphens
20
+ become underscores, group names become PascalCase API classes), and JSON
21
+ output matches the SDK's response shape. The CLI makes it easy to iterate:
22
+ try different arguments, inspect the response, and refine until you
23
+ understand the endpoint's behavior. Once verified, port the call into your
24
+ Python app — far fewer surprises on the first integration.
6
25
 
7
26
  ## Installation
8
27
 
9
28
  ```bash
10
29
  pip install asana-api-cli
30
+ ```
31
+
32
+ For best results, install asana-api-cli into the same Python environment
33
+ that holds your project's `python-asana` so the CLI surface tracks the
34
+ exact SDK version your application uses (see [As a
35
+ dev-dependency](#as-a-dev-dependency) below).
36
+
37
+ ### As a dev-dependency
38
+
39
+ If your project already uses `python-asana`, add asana-api-cli to your dev
40
+ group so the CLI tracks the same SDK version your application code uses:
41
+
42
+ ```toml
43
+ # pyproject.toml
44
+ [project]
45
+ dependencies = ["asana>=5.2,<6"]
46
+
47
+ [dependency-groups] # uv
48
+ dev = ["asana-api-cli"]
49
+ ```
50
+
51
+ ```toml
52
+ # Poetry
53
+ [tool.poetry.group.dev.dependencies]
54
+ asana-api-cli = "*"
55
+ ```
11
56
 
12
- # or, to install as an isolated CLI tool
57
+ After `uv sync` (or equivalent), `asana-api` resolves to the project's
58
+ `.venv` and introspects whatever `asana` version is locked there. Tests
59
+ prototyped with `asana-api tasks ...` will exactly match the SDK calls in
60
+ your app.
61
+
62
+ ### Installing globally with pipx
63
+
64
+ If you would rather isolate asana-api-cli from any project's dependencies
65
+ — for example, when you administer Asana from the shell without writing
66
+ Python — install it with [pipx](https://pipx.pypa.io/):
67
+
68
+ ```bash
13
69
  pipx install asana-api-cli
14
70
  ```
15
71
 
72
+ In this setup the CLI uses the `python-asana` version that shipped with
73
+ the asana-api-cli release; `pipx upgrade asana-api-cli` updates only
74
+ asana-api-cli itself, not the bundled `python-asana`. To pull a newer
75
+ `python-asana` into the existing pipx install without reinstalling the
76
+ CLI:
77
+
78
+ ```bash
79
+ pipx runpip asana-api-cli install -U asana
80
+ ```
81
+
82
+ The next `asana-api` run sees the new SDK and any newly added endpoints
83
+ automatically.
84
+
16
85
  ## Environment variables
17
86
 
18
87
  | Name | Required | Description |
@@ -1,16 +1,16 @@
1
1
  [project]
2
2
  name = "asana-api-cli"
3
- version = "1.5.0"
3
+ version = "2.0.0"
4
4
  description = "Command-line wrapper around the official Asana Python SDK"
5
5
  authors = [{name = "Masanao Izumo", email = "asana@masanao.site"}]
6
6
  readme = "README.md"
7
7
  license = "MIT"
8
8
  requires-python = ">=3.10"
9
9
  dependencies = [
10
- "click>=8.1,<9",
11
- "jq>=1.8,<2",
12
- "tabulate>=0.9,<1",
13
- "asana>=5.2.4,<6",
10
+ "click>=8.0",
11
+ "jq>=1.5",
12
+ "tabulate>=0.9",
13
+ "asana>=5.2,<6",
14
14
  ]
15
15
 
16
16
  [project.urls]
@@ -41,7 +41,6 @@ where = ["src"]
41
41
  [tool.ruff]
42
42
  target-version = "py310"
43
43
  line-length = 100
44
- extend-exclude = ["src/asana_api_cli/cli"] # auto-generated (tools/codegen.py)
45
44
 
46
45
  [tool.ruff.format]
47
46
  docstring-code-format = true