codapact-ynab 0.2.0__py3-none-any.whl

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.
@@ -0,0 +1,89 @@
1
+ Metadata-Version: 2.4
2
+ Name: codapact-ynab
3
+ Version: 0.2.0
4
+ Summary: Typed Python client and `ynab` CLI for the YNAB API, generated by Codapact
5
+ Keywords: ynab,budget,cli,api-client,codapact
6
+ Author: Mike Hill
7
+ License-Expression: MIT
8
+ License-File: LICENSE
9
+ Classifier: Environment :: Console
10
+ Classifier: Intended Audience :: End Users/Desktop
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Programming Language :: Python :: 3.13
13
+ Classifier: Programming Language :: Python :: 3.14
14
+ Classifier: Typing :: Typed
15
+ Requires-Dist: codapact[keyring]>=0.8.0,<0.9
16
+ Requires-Python: >=3.13
17
+ Project-URL: Homepage, https://github.com/mikejhill/codapact-ynab
18
+ Project-URL: Repository, https://github.com/mikejhill/codapact-ynab
19
+ Project-URL: Issues, https://github.com/mikejhill/codapact-ynab/issues
20
+ Project-URL: Generator, https://github.com/mikejhill/codapact
21
+ Description-Content-Type: text/markdown
22
+
23
+ # codapact-ynab
24
+
25
+ The **YNAB coda**: a typed Python client and `ynab` command-line tool for the
26
+ [YNAB API](https://api.ynab.com/), generated from YNAB's OpenAPI contract by
27
+ [Codapact](https://github.com/mikejhill/codapact).
28
+
29
+ Replaces `ynab-api-cli`, which is no longer maintained.
30
+
31
+ ## Install
32
+
33
+ ```console
34
+ uv tool install codapact-ynab # or: pipx install codapact-ynab
35
+ ynab --help
36
+ ```
37
+
38
+ Requires Python 3.13+.
39
+
40
+ ## Credentials
41
+
42
+ Create a personal access token under YNAB **Account Settings → Developer Settings**, then either:
43
+
44
+ ```console
45
+ ynab auth login # saves it in the OS keyring
46
+ ynab doctor # checks settings, credentials, and connectivity
47
+ ```
48
+
49
+ or set `YNAB_BEARER` in the environment. `YNAB_BEARER_COMMAND` runs a command that prints
50
+ the token (for example a password manager).
51
+
52
+ ## Use
53
+
54
+ ```console
55
+ ynab plans list
56
+ ynab accounts list -o table
57
+ ynab transactions list --since-date 2026-01-01 --query 'data.transactions[].payee_name'
58
+ ynab describe --brief # every command, for scripts and agents
59
+ ```
60
+
61
+ `--plan-id` defaults to `last-used`. `--dry-run` prints the HTTP request without sending it;
62
+ commands that delete ask for confirmation (or `--yes`).
63
+
64
+ As a library:
65
+
66
+ ```python
67
+ from codapact_ynab import Client
68
+
69
+ client = Client()
70
+ ```
71
+
72
+ ## How this repository works
73
+
74
+ | Path | What it is |
75
+ | --- | --- |
76
+ | `openapi.yaml` | YNAB's contract, pinned (currently API 1.91.0) |
77
+ | `codapact.yaml` | Codapact project file: shaping rules and targets |
78
+ | `gen/python/` | Generated code and tests. Do not edit; regenerate |
79
+ | `pyproject.toml` | Hand-written packaging: PyPI metadata and the release version |
80
+
81
+ ```console
82
+ uvx codapact==0.8.0 sync --check # has YNAB published a new contract?
83
+ uvx codapact==0.8.0 sync # pull it into openapi.yaml
84
+ uvx codapact==0.8.0 generate # regenerate gen/python
85
+ uv run pytest # offline tests
86
+ ```
87
+
88
+ CI fails if `gen/python` differs from what the pinned Codapact produces. Releases are cut by
89
+ release-please and published to PyPI through trusted publishing.
@@ -0,0 +1,12 @@
1
+ codapact_ynab/__init__.py,sha256=7O7i3Ezf3nTNslvKs-Bl800X_WZJwn2gFhDg29KRIIw,132
2
+ codapact_ynab/__main__.py,sha256=xm9y4hRDqW8VHjWuvBwHEQkKrz7_ElQLtOP2fC8GvBw,128
3
+ codapact_ynab/_model.json,sha256=8U2lz2iUM5ghLlNCp3oHNIQISX6xMC7wUE0xtRd3wOs,308597
4
+ codapact_ynab/cli.py,sha256=mq1QcUk2iIjWQAUVP0dauLMEJJmUqSZCZ_avOS6XxKk,86516
5
+ codapact_ynab/client.py,sha256=Zp2mKqBAsyXP0kiZBF4w-jcmGvXzcMWycfplwuycNKc,25653
6
+ codapact_ynab/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ codapact_ynab/types.py,sha256=Unx90fTZgLziAtJjruztVAg4hFYhk0F4PJVPu5xBU6c,40200
8
+ codapact_ynab-0.2.0.dist-info/licenses/LICENSE,sha256=MrM1ktUwGhqY5Eq9uprukyzAi7-UApuuTroNfjlRxPA,1066
9
+ codapact_ynab-0.2.0.dist-info/WHEEL,sha256=3OmCxFA0ffBIsX4x0o8CdfSvZAOvO3mzEG8U_z5TvV4,80
10
+ codapact_ynab-0.2.0.dist-info/entry_points.txt,sha256=djDyho9igFogOj2J-TgdZS_cyrLCFJXpzAlWn54_71k,49
11
+ codapact_ynab-0.2.0.dist-info/METADATA,sha256=WdTFrVWzUI0FYxMEiuBs4v0V-XCXS8XkaGegm8uVIeA,2926
12
+ codapact_ynab-0.2.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: uv 0.13.8
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ ynab = codapact_ynab.cli:main
3
+
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mike Hill
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.