sqlite-export-for-ynab 2.9.8__tar.gz → 2.9.9__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.
- {sqlite_export_for_ynab-2.9.8/sqlite_export_for_ynab.egg-info → sqlite_export_for_ynab-2.9.9}/PKG-INFO +2 -3
- {sqlite_export_for_ynab-2.9.8 → sqlite_export_for_ynab-2.9.9}/pyproject.toml +5 -4
- {sqlite_export_for_ynab-2.9.8 → sqlite_export_for_ynab-2.9.9}/sqlite_export_for_ynab/_main.py +12 -41
- {sqlite_export_for_ynab-2.9.8 → sqlite_export_for_ynab-2.9.9/sqlite_export_for_ynab.egg-info}/PKG-INFO +2 -3
- {sqlite_export_for_ynab-2.9.8 → sqlite_export_for_ynab-2.9.9}/sqlite_export_for_ynab.egg-info/requires.txt +1 -4
- {sqlite_export_for_ynab-2.9.8 → sqlite_export_for_ynab-2.9.9}/LICENSE +0 -0
- {sqlite_export_for_ynab-2.9.8 → sqlite_export_for_ynab-2.9.9}/README.md +0 -0
- {sqlite_export_for_ynab-2.9.8 → sqlite_export_for_ynab-2.9.9}/setup.cfg +0 -0
- {sqlite_export_for_ynab-2.9.8 → sqlite_export_for_ynab-2.9.9}/sqlite_export_for_ynab/__init__.py +0 -0
- {sqlite_export_for_ynab-2.9.8 → sqlite_export_for_ynab-2.9.9}/sqlite_export_for_ynab/__main__.py +0 -0
- {sqlite_export_for_ynab-2.9.8 → sqlite_export_for_ynab-2.9.9}/sqlite_export_for_ynab/ddl/__init__.py +0 -0
- {sqlite_export_for_ynab-2.9.8 → sqlite_export_for_ynab-2.9.9}/sqlite_export_for_ynab/ddl/create-relations.sql +0 -0
- {sqlite_export_for_ynab-2.9.8 → sqlite_export_for_ynab-2.9.9}/sqlite_export_for_ynab/ddl/drop-relations.sql +0 -0
- {sqlite_export_for_ynab-2.9.8 → sqlite_export_for_ynab-2.9.9}/sqlite_export_for_ynab/py.typed +0 -0
- {sqlite_export_for_ynab-2.9.8 → sqlite_export_for_ynab-2.9.9}/sqlite_export_for_ynab.egg-info/SOURCES.txt +0 -0
- {sqlite_export_for_ynab-2.9.8 → sqlite_export_for_ynab-2.9.9}/sqlite_export_for_ynab.egg-info/dependency_links.txt +0 -0
- {sqlite_export_for_ynab-2.9.8 → sqlite_export_for_ynab-2.9.9}/sqlite_export_for_ynab.egg-info/entry_points.txt +0 -0
- {sqlite_export_for_ynab-2.9.8 → sqlite_export_for_ynab-2.9.9}/sqlite_export_for_ynab.egg-info/top_level.txt +0 -0
- {sqlite_export_for_ynab-2.9.8 → sqlite_export_for_ynab-2.9.9}/testing/__init__.py +0 -0
- {sqlite_export_for_ynab-2.9.8 → sqlite_export_for_ynab-2.9.9}/testing/fixtures.py +0 -0
- {sqlite_export_for_ynab-2.9.8 → sqlite_export_for_ynab-2.9.9}/tests/__init__.py +0 -0
- {sqlite_export_for_ynab-2.9.8 → sqlite_export_for_ynab-2.9.9}/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.
|
|
3
|
+
Version: 2.9.9
|
|
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
|
|
@@ -18,9 +18,8 @@ Requires-Dist: aiopathlib
|
|
|
18
18
|
Requires-Dist: aiosqlite
|
|
19
19
|
Requires-Dist: asyncio-for-ynab~=1.87.0
|
|
20
20
|
Requires-Dist: fasteners
|
|
21
|
-
Requires-Dist: rich>=
|
|
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "sqlite_export_for_ynab"
|
|
3
|
-
version = "2.9.
|
|
3
|
+
version = "2.9.9"
|
|
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
|
|
@@ -20,15 +20,14 @@ dependencies = [
|
|
|
20
20
|
"aiosqlite",
|
|
21
21
|
"asyncio-for-ynab~=1.87.0",
|
|
22
22
|
"fasteners",
|
|
23
|
-
"rich>=
|
|
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
|
|
29
28
|
Homepage = "https://github.com/mxr/sqlite-export-for-ynab"
|
|
30
29
|
|
|
31
|
-
[project.scripts]
|
|
30
|
+
[project.scripts] # generated by mxr/base
|
|
32
31
|
sqlite-export-for-ynab = "sqlite_export_for_ynab._main:main"
|
|
33
32
|
|
|
34
33
|
[dependency-groups]
|
|
@@ -125,6 +124,7 @@ env_list = ["py", "pre-commit"]
|
|
|
125
124
|
[tool.tox.env.pre-commit] # generated by mxr/base
|
|
126
125
|
commands = [["pre-commit", "run", "--all-files", "--show-diff-on-failure"]]
|
|
127
126
|
deps = ["pre-commit-uv"]
|
|
127
|
+
runner = "uv-venv-runner"
|
|
128
128
|
skip_install = true
|
|
129
129
|
|
|
130
130
|
[tool.tox.env_run_base] # generated by mxr/base
|
|
@@ -134,6 +134,7 @@ commands = [
|
|
|
134
134
|
["coverage", "report"],
|
|
135
135
|
]
|
|
136
136
|
dependency_groups = ["dev"]
|
|
137
|
+
runner = "uv-venv-lock-runner"
|
|
137
138
|
|
|
138
139
|
[tool.ty.rules] # generated by mxr/base
|
|
139
140
|
all = "error"
|
{sqlite_export_for_ynab-2.9.8 → sqlite_export_for_ynab-2.9.9}/sqlite_export_for_ynab/_main.py
RENAMED
|
@@ -43,10 +43,12 @@ 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
|
|
49
50
|
from rich.progress import TimeElapsedColumn
|
|
51
|
+
from tenacity import AsyncRetrying
|
|
50
52
|
from tenacity import retry
|
|
51
53
|
from tenacity import stop_after_attempt
|
|
52
54
|
|
|
@@ -64,48 +66,15 @@ _T = TypeVar("_T")
|
|
|
64
66
|
|
|
65
67
|
if sys.version_info >= (3, 12): # pragma: >=3.12 cover
|
|
66
68
|
from itertools import batched
|
|
67
|
-
from typing import override
|
|
68
69
|
else: # pragma: <3.12 cover
|
|
69
70
|
from itertools import islice
|
|
70
71
|
|
|
71
|
-
from typing_extensions import override
|
|
72
|
-
|
|
73
72
|
def batched(iterable: Iterable[_T], n: int) -> Iterator[tuple[_T, ...]]:
|
|
74
73
|
it = iter(iterable)
|
|
75
74
|
while batch := tuple(islice(it, n)):
|
|
76
75
|
yield batch
|
|
77
76
|
|
|
78
77
|
|
|
79
|
-
try:
|
|
80
|
-
from rich.progress import (
|
|
81
|
-
MofNCompleteColumn, # pyright: ignore[reportAssignmentType]
|
|
82
|
-
)
|
|
83
|
-
# https://github.com/benleb/surepy/issues/240
|
|
84
|
-
except ImportError: # pragma: no cover
|
|
85
|
-
from rich.progress import ProgressColumn
|
|
86
|
-
from rich.progress import Task
|
|
87
|
-
from rich.text import Text
|
|
88
|
-
|
|
89
|
-
if TYPE_CHECKING:
|
|
90
|
-
from rich.table import Column
|
|
91
|
-
|
|
92
|
-
class MofNCompleteColumn(ProgressColumn): # type:ignore[no-redef]
|
|
93
|
-
def __init__(self, separator: str = "/", table_column: Column | None = None):
|
|
94
|
-
self.separator = separator
|
|
95
|
-
super().__init__(table_column=table_column)
|
|
96
|
-
|
|
97
|
-
@override
|
|
98
|
-
def render(self, task: Task) -> Text:
|
|
99
|
-
"""Show completed/total."""
|
|
100
|
-
completed = int(task.completed)
|
|
101
|
-
total = int(task.total) if task.total is not None else "?"
|
|
102
|
-
total_width = len(str(total))
|
|
103
|
-
return Text(
|
|
104
|
-
f"{completed:{total_width}d}{self.separator}{total}",
|
|
105
|
-
style="progress.download",
|
|
106
|
-
)
|
|
107
|
-
|
|
108
|
-
|
|
109
78
|
_EntryTable = Literal[
|
|
110
79
|
"accounts",
|
|
111
80
|
"account_periodic_values",
|
|
@@ -693,15 +662,17 @@ class _ProgressYnab:
|
|
|
693
662
|
lkos: dict[str, int]
|
|
694
663
|
task_id: TaskID
|
|
695
664
|
|
|
696
|
-
@retry(stop=stop_after_attempt(3))
|
|
697
665
|
async def get(self, endpoint: Callable[..., Awaitable[_T]]) -> _T:
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
666
|
+
async for attempt in AsyncRetrying(stop=stop_after_attempt(3)):
|
|
667
|
+
with attempt:
|
|
668
|
+
try:
|
|
669
|
+
return await endpoint(
|
|
670
|
+
plan_id=self.plan_id,
|
|
671
|
+
last_knowledge_of_server=self.lkos.get(self.plan_id),
|
|
672
|
+
)
|
|
673
|
+
finally:
|
|
674
|
+
self.context.progress.update(self.task_id, advance=1)
|
|
675
|
+
raise AssertionError("unreachable")
|
|
705
676
|
|
|
706
677
|
|
|
707
678
|
@dataclass(slots=True, frozen=True)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sqlite_export_for_ynab
|
|
3
|
-
Version: 2.9.
|
|
3
|
+
Version: 2.9.9
|
|
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
|
|
@@ -18,9 +18,8 @@ Requires-Dist: aiopathlib
|
|
|
18
18
|
Requires-Dist: aiosqlite
|
|
19
19
|
Requires-Dist: asyncio-for-ynab~=1.87.0
|
|
20
20
|
Requires-Dist: fasteners
|
|
21
|
-
Requires-Dist: rich>=
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sqlite_export_for_ynab-2.9.8 → sqlite_export_for_ynab-2.9.9}/sqlite_export_for_ynab/__init__.py
RENAMED
|
File without changes
|
{sqlite_export_for_ynab-2.9.8 → sqlite_export_for_ynab-2.9.9}/sqlite_export_for_ynab/__main__.py
RENAMED
|
File without changes
|
{sqlite_export_for_ynab-2.9.8 → sqlite_export_for_ynab-2.9.9}/sqlite_export_for_ynab/ddl/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sqlite_export_for_ynab-2.9.8 → sqlite_export_for_ynab-2.9.9}/sqlite_export_for_ynab/py.typed
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|