sqlite-export-for-ynab 2.9.10__tar.gz → 3.0.1__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 (23) hide show
  1. {sqlite_export_for_ynab-2.9.10/sqlite_export_for_ynab.egg-info → sqlite_export_for_ynab-3.0.1}/PKG-INFO +4 -5
  2. {sqlite_export_for_ynab-2.9.10 → sqlite_export_for_ynab-3.0.1}/README.md +1 -1
  3. {sqlite_export_for_ynab-2.9.10 → sqlite_export_for_ynab-3.0.1}/pyproject.toml +3 -4
  4. {sqlite_export_for_ynab-2.9.10 → sqlite_export_for_ynab-3.0.1}/sqlite_export_for_ynab/_main.py +7 -38
  5. {sqlite_export_for_ynab-2.9.10 → sqlite_export_for_ynab-3.0.1/sqlite_export_for_ynab.egg-info}/PKG-INFO +4 -5
  6. sqlite_export_for_ynab-3.0.1/sqlite_export_for_ynab.egg-info/requires.txt +7 -0
  7. sqlite_export_for_ynab-2.9.10/sqlite_export_for_ynab.egg-info/requires.txt +0 -10
  8. {sqlite_export_for_ynab-2.9.10 → sqlite_export_for_ynab-3.0.1}/LICENSE +0 -0
  9. {sqlite_export_for_ynab-2.9.10 → sqlite_export_for_ynab-3.0.1}/setup.cfg +0 -0
  10. {sqlite_export_for_ynab-2.9.10 → sqlite_export_for_ynab-3.0.1}/sqlite_export_for_ynab/__init__.py +0 -0
  11. {sqlite_export_for_ynab-2.9.10 → sqlite_export_for_ynab-3.0.1}/sqlite_export_for_ynab/__main__.py +0 -0
  12. {sqlite_export_for_ynab-2.9.10 → sqlite_export_for_ynab-3.0.1}/sqlite_export_for_ynab/ddl/__init__.py +0 -0
  13. {sqlite_export_for_ynab-2.9.10 → sqlite_export_for_ynab-3.0.1}/sqlite_export_for_ynab/ddl/create-relations.sql +0 -0
  14. {sqlite_export_for_ynab-2.9.10 → sqlite_export_for_ynab-3.0.1}/sqlite_export_for_ynab/ddl/drop-relations.sql +0 -0
  15. {sqlite_export_for_ynab-2.9.10 → sqlite_export_for_ynab-3.0.1}/sqlite_export_for_ynab/py.typed +0 -0
  16. {sqlite_export_for_ynab-2.9.10 → sqlite_export_for_ynab-3.0.1}/sqlite_export_for_ynab.egg-info/SOURCES.txt +0 -0
  17. {sqlite_export_for_ynab-2.9.10 → sqlite_export_for_ynab-3.0.1}/sqlite_export_for_ynab.egg-info/dependency_links.txt +0 -0
  18. {sqlite_export_for_ynab-2.9.10 → sqlite_export_for_ynab-3.0.1}/sqlite_export_for_ynab.egg-info/entry_points.txt +0 -0
  19. {sqlite_export_for_ynab-2.9.10 → sqlite_export_for_ynab-3.0.1}/sqlite_export_for_ynab.egg-info/top_level.txt +0 -0
  20. {sqlite_export_for_ynab-2.9.10 → sqlite_export_for_ynab-3.0.1}/testing/__init__.py +0 -0
  21. {sqlite_export_for_ynab-2.9.10 → sqlite_export_for_ynab-3.0.1}/testing/fixtures.py +0 -0
  22. {sqlite_export_for_ynab-2.9.10 → sqlite_export_for_ynab-3.0.1}/tests/__init__.py +0 -0
  23. {sqlite_export_for_ynab-2.9.10 → sqlite_export_for_ynab-3.0.1}/tests/_main_test.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sqlite_export_for_ynab
3
- Version: 2.9.10
3
+ Version: 3.0.1
4
4
  Summary: SQLite Export for YNAB - Export YNAB Data to SQLite
5
5
  Author-email: Max R <mxr@users.noreply.github.com>
6
6
  License-Expression: MIT
@@ -16,11 +16,10 @@ License-File: LICENSE
16
16
  Requires-Dist: aiohttp>=3
17
17
  Requires-Dist: aiopathlib
18
18
  Requires-Dist: aiosqlite
19
- Requires-Dist: asyncio-for-ynab~=1.87.0
19
+ Requires-Dist: asyncio-for-ynab~=1.88.0
20
20
  Requires-Dist: fasteners
21
- Requires-Dist: rich>=10
21
+ Requires-Dist: rich>=12
22
22
  Requires-Dist: tenacity
23
- Requires-Dist: typing-extensions; python_version < "3.12"
24
23
  Dynamic: license-file
25
24
 
26
25
  # sqlite-export-for-ynab
@@ -105,7 +104,7 @@ additions:
105
104
 
106
105
  ## Querying
107
106
 
108
- You can issue queries with typical SQLite tools. *`sqlite-export-for-ynab` deliberately does not implement a SQL REPL.*
107
+ You can issue queries with typical SQLite tools. _`sqlite-export-for-ynab` deliberately does not implement a SQL REPL._
109
108
 
110
109
  ### Sample Queries
111
110
 
@@ -80,7 +80,7 @@ additions:
80
80
 
81
81
  ## Querying
82
82
 
83
- You can issue queries with typical SQLite tools. *`sqlite-export-for-ynab` deliberately does not implement a SQL REPL.*
83
+ You can issue queries with typical SQLite tools. _`sqlite-export-for-ynab` deliberately does not implement a SQL REPL._
84
84
 
85
85
  ### Sample Queries
86
86
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "sqlite_export_for_ynab"
3
- version = "2.9.10"
3
+ version = "3.0.1"
4
4
  description = "SQLite Export for YNAB - Export YNAB Data to SQLite"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11" # generated by mxr/base
@@ -18,11 +18,10 @@ dependencies = [
18
18
  "aiohttp>=3",
19
19
  "aiopathlib",
20
20
  "aiosqlite",
21
- "asyncio-for-ynab~=1.87.0",
21
+ "asyncio-for-ynab~=1.88.0",
22
22
  "fasteners",
23
- "rich>=10",
23
+ "rich>=12",
24
24
  "tenacity",
25
- "typing-extensions; python_version<'3.12'",
26
25
  ]
27
26
 
28
27
  [project.urls] # generated by mxr/base
@@ -43,6 +43,7 @@ from asyncio_for_ynab import TransactionsApi
43
43
  from asyncio_for_ynab import TransactionsResponse
44
44
  from asyncio_for_ynab import TransactionsResponseData
45
45
  from rich.progress import BarColumn
46
+ from rich.progress import MofNCompleteColumn
46
47
  from rich.progress import Progress
47
48
  from rich.progress import TaskID
48
49
  from rich.progress import TextColumn
@@ -54,9 +55,10 @@ from tenacity import stop_after_attempt
54
55
  from sqlite_export_for_ynab import ddl
55
56
 
56
57
  if TYPE_CHECKING:
57
- from collections.abc import AsyncIterator
58
+ from collections.abc import AsyncGenerator
58
59
  from collections.abc import Awaitable
59
60
  from collections.abc import Callable
61
+ from collections.abc import Generator
60
62
  from collections.abc import Iterable
61
63
  from collections.abc import Iterator
62
64
  from collections.abc import Sequence
@@ -65,48 +67,15 @@ _T = TypeVar("_T")
65
67
 
66
68
  if sys.version_info >= (3, 12): # pragma: >=3.12 cover
67
69
  from itertools import batched
68
- from typing import override
69
70
  else: # pragma: <3.12 cover
70
71
  from itertools import islice
71
72
 
72
- from typing_extensions import override
73
-
74
73
  def batched(iterable: Iterable[_T], n: int) -> Iterator[tuple[_T, ...]]:
75
74
  it = iter(iterable)
76
75
  while batch := tuple(islice(it, n)):
77
76
  yield batch
78
77
 
79
78
 
80
- try:
81
- from rich.progress import (
82
- MofNCompleteColumn, # pyright: ignore[reportAssignmentType]
83
- )
84
- # https://github.com/benleb/surepy/issues/240
85
- except ImportError: # pragma: no cover
86
- from rich.progress import ProgressColumn
87
- from rich.progress import Task
88
- from rich.text import Text
89
-
90
- if TYPE_CHECKING:
91
- from rich.table import Column
92
-
93
- class MofNCompleteColumn(ProgressColumn): # type:ignore[no-redef]
94
- def __init__(self, separator: str = "/", table_column: Column | None = None):
95
- self.separator = separator
96
- super().__init__(table_column=table_column)
97
-
98
- @override
99
- def render(self, task: Task) -> Text:
100
- """Show completed/total."""
101
- completed = int(task.completed)
102
- total = int(task.total) if task.total is not None else "?"
103
- total_width = len(str(total))
104
- return Text(
105
- f"{completed:{total_width}d}{self.separator}{total}",
106
- style="progress.download",
107
- )
108
-
109
-
110
79
  _EntryTable = Literal[
111
80
  "accounts",
112
81
  "account_periodic_values",
@@ -143,7 +112,7 @@ _PROGRESS_COLUMNS = (
143
112
 
144
113
 
145
114
  def resolve_token(token_override: str | None = None) -> str:
146
- token = token_override or os.environ.get(_ENV_TOKEN)
115
+ token = token_override or os.environ.get(_ENV_TOKEN, "")
147
116
  if token:
148
117
  return token
149
118
 
@@ -193,7 +162,7 @@ def default_db_path() -> Path:
193
162
  return (
194
163
  (
195
164
  Path(xdg_data_home)
196
- if (xdg_data_home := os.environ.get("XDG_DATA_HOME"))
165
+ if (xdg_data_home := os.environ.get("XDG_DATA_HOME", ""))
197
166
  else Path.home() / ".local" / "share"
198
167
  )
199
168
  / _PACKAGE
@@ -238,7 +207,7 @@ async def _context(
238
207
  *,
239
208
  quiet: bool,
240
209
  timeout: float = _SYNC_LOCK_TIMEOUT,
241
- ) -> AsyncIterator[_Context]:
210
+ ) -> AsyncGenerator[_Context]:
242
211
  progress = Progress(*_PROGRESS_COLUMNS, disable=quiet)
243
212
  lock_path = db.parent / f"{db.name}.lock"
244
213
  lock = fasteners.InterProcessLock(lock_path)
@@ -274,7 +243,7 @@ async def _context(
274
243
 
275
244
 
276
245
  @contextmanager
277
- def _progress(context: _Context) -> Iterator[None]:
246
+ def _progress(context: _Context) -> Generator[None]:
278
247
  context.progress.start()
279
248
  try:
280
249
  yield
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sqlite_export_for_ynab
3
- Version: 2.9.10
3
+ Version: 3.0.1
4
4
  Summary: SQLite Export for YNAB - Export YNAB Data to SQLite
5
5
  Author-email: Max R <mxr@users.noreply.github.com>
6
6
  License-Expression: MIT
@@ -16,11 +16,10 @@ License-File: LICENSE
16
16
  Requires-Dist: aiohttp>=3
17
17
  Requires-Dist: aiopathlib
18
18
  Requires-Dist: aiosqlite
19
- Requires-Dist: asyncio-for-ynab~=1.87.0
19
+ Requires-Dist: asyncio-for-ynab~=1.88.0
20
20
  Requires-Dist: fasteners
21
- Requires-Dist: rich>=10
21
+ Requires-Dist: rich>=12
22
22
  Requires-Dist: tenacity
23
- Requires-Dist: typing-extensions; python_version < "3.12"
24
23
  Dynamic: license-file
25
24
 
26
25
  # sqlite-export-for-ynab
@@ -105,7 +104,7 @@ additions:
105
104
 
106
105
  ## Querying
107
106
 
108
- You can issue queries with typical SQLite tools. *`sqlite-export-for-ynab` deliberately does not implement a SQL REPL.*
107
+ You can issue queries with typical SQLite tools. _`sqlite-export-for-ynab` deliberately does not implement a SQL REPL._
109
108
 
110
109
  ### Sample Queries
111
110
 
@@ -0,0 +1,7 @@
1
+ aiohttp>=3
2
+ aiopathlib
3
+ aiosqlite
4
+ asyncio-for-ynab~=1.88.0
5
+ fasteners
6
+ rich>=12
7
+ tenacity
@@ -1,10 +0,0 @@
1
- aiohttp>=3
2
- aiopathlib
3
- aiosqlite
4
- asyncio-for-ynab~=1.87.0
5
- fasteners
6
- rich>=10
7
- tenacity
8
-
9
- [:python_version < "3.12"]
10
- typing-extensions