hdx-python-database 1.3.7__tar.gz → 1.3.8__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 (36) hide show
  1. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/PKG-INFO +1 -1
  2. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/requirements.txt +34 -32
  3. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/src/hdx/database/_version.py +16 -3
  4. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/src/hdx/database/database.py +4 -6
  5. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/.coveragerc +0 -0
  6. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/.github/workflows/publish.yaml +0 -0
  7. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/.github/workflows/run-python-tests.yaml +0 -0
  8. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/.gitignore +0 -0
  9. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/.pre-commit-config.yaml +0 -0
  10. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/CONTRIBUTING.md +0 -0
  11. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/LICENSE +0 -0
  12. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/README.md +0 -0
  13. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/documentation/.readthedocs.yaml +0 -0
  14. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/documentation/index.md +0 -0
  15. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/documentation/mkdocs.yaml +0 -0
  16. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/hatch.toml +0 -0
  17. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/pyproject.toml +0 -0
  18. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/pytest.ini +0 -0
  19. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/ruff.toml +0 -0
  20. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/src/hdx/database/__init__.py +0 -0
  21. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/src/hdx/database/dburi.py +0 -0
  22. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/src/hdx/database/no_timezone.py +0 -0
  23. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/src/hdx/database/postgresql.py +0 -0
  24. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/src/hdx/database/utils.py +0 -0
  25. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/src/hdx/database/views.py +0 -0
  26. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/src/hdx/database/with_timezone.py +0 -0
  27. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/tests/fixtures/test.db +0 -0
  28. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/tests/hdx/database/__init__.py +0 -0
  29. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/tests/hdx/database/conftest.py +0 -0
  30. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/tests/hdx/database/dbtestdate.py +0 -0
  31. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/tests/hdx/database/test_database.py +0 -0
  32. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/tests/hdx/database/test_dburi.py +0 -0
  33. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/tests/hdx/database/test_drop_recreate.py +0 -0
  34. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/tests/hdx/database/test_postgresql.py +0 -0
  35. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/tests/hdx/database/test_reflect.py +0 -0
  36. {hdx_python_database-1.3.7 → hdx_python_database-1.3.8}/tests/hdx/database/test_ssh.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hdx-python-database
3
- Version: 1.3.7
3
+ Version: 1.3.8
4
4
  Summary: HDX Python database utilities
5
5
  Project-URL: Homepage, https://github.com/OCHA-DAP/hdx-python-database
6
6
  Author-email: Michael Rans <rans@email.com>
@@ -1,56 +1,58 @@
1
1
  # This file was autogenerated by uv via the following command:
2
2
  # uv pip compile pyproject.toml --resolver=backtracking --all-extras -o requirements.txt
3
- astdoc==1.3.0
3
+ astdoc==1.3.2
4
4
  # via mkapi
5
5
  babel==2.17.0
6
6
  # via mkdocs-material
7
7
  backrefs==5.9
8
8
  # via mkdocs-material
9
- bcrypt==4.3.0
9
+ bcrypt==5.0.0
10
10
  # via paramiko
11
- certifi==2025.7.14
11
+ certifi==2025.10.5
12
12
  # via requests
13
- cffi==1.17.1
13
+ cffi==2.0.0
14
14
  # via
15
15
  # cryptography
16
16
  # pynacl
17
17
  cfgv==3.4.0
18
18
  # via pre-commit
19
- charset-normalizer==3.4.2
19
+ charset-normalizer==3.4.4
20
20
  # via requests
21
- click==8.2.1
21
+ click==8.3.0
22
22
  # via mkdocs
23
23
  colorama==0.4.6
24
24
  # via mkdocs-material
25
- coverage==7.9.2
25
+ coverage==7.11.0
26
26
  # via pytest-cov
27
- cryptography==45.0.5
27
+ cryptography==46.0.3
28
28
  # via paramiko
29
29
  distlib==0.4.0
30
30
  # via virtualenv
31
- filelock==3.18.0
31
+ filelock==3.20.0
32
32
  # via virtualenv
33
33
  ghp-import==2.1.0
34
34
  # via mkdocs
35
- greenlet==3.2.3
35
+ greenlet==3.2.4
36
36
  # via sqlalchemy
37
- identify==2.6.12
37
+ identify==2.6.15
38
38
  # via pre-commit
39
- idna==3.10
39
+ idna==3.11
40
40
  # via requests
41
- iniconfig==2.1.0
41
+ iniconfig==2.3.0
42
42
  # via pytest
43
+ invoke==2.2.1
44
+ # via paramiko
43
45
  jinja2==3.1.6
44
46
  # via
45
47
  # mkapi
46
48
  # mkdocs
47
49
  # mkdocs-material
48
- markdown==3.8.2
50
+ markdown==3.9
49
51
  # via
50
52
  # mkdocs
51
53
  # mkdocs-material
52
54
  # pymdown-extensions
53
- markupsafe==3.0.2
55
+ markupsafe==3.0.3
54
56
  # via
55
57
  # jinja2
56
58
  # mkdocs
@@ -58,7 +60,7 @@ mergedeep==1.3.4
58
60
  # via
59
61
  # mkdocs
60
62
  # mkdocs-get-deps
61
- mkapi==4.4.4
63
+ mkapi==4.5.0
62
64
  # via hdx-python-database (pyproject.toml)
63
65
  mkdocs==1.6.1
64
66
  # via
@@ -66,7 +68,7 @@ mkdocs==1.6.1
66
68
  # mkdocs-material
67
69
  mkdocs-get-deps==0.2.0
68
70
  # via mkdocs
69
- mkdocs-material==9.6.15
71
+ mkdocs-material==9.6.23
70
72
  # via mkapi
71
73
  mkdocs-material-extensions==1.3.1
72
74
  # via mkdocs-material
@@ -78,11 +80,11 @@ packaging==25.0
78
80
  # pytest
79
81
  paginate==0.5.7
80
82
  # via mkdocs-material
81
- paramiko==3.5.1
83
+ paramiko==4.0.0
82
84
  # via sshtunnel
83
85
  pathspec==0.12.1
84
86
  # via mkdocs
85
- platformdirs==4.3.8
87
+ platformdirs==4.5.0
86
88
  # via
87
89
  # mkdocs-get-deps
88
90
  # virtualenv
@@ -90,31 +92,31 @@ pluggy==1.6.0
90
92
  # via
91
93
  # pytest
92
94
  # pytest-cov
93
- pre-commit==4.2.0
95
+ pre-commit==4.3.0
94
96
  # via hdx-python-database (pyproject.toml)
95
- psycopg==3.2.9
97
+ psycopg==3.2.12
96
98
  # via hdx-python-database (pyproject.toml)
97
- psycopg-binary==3.2.9
99
+ psycopg-binary==3.2.12
98
100
  # via psycopg
99
- pycparser==2.22
101
+ pycparser==2.23
100
102
  # via cffi
101
103
  pygments==2.19.2
102
104
  # via
103
105
  # mkdocs-material
104
106
  # pytest
105
- pymdown-extensions==10.16
107
+ pymdown-extensions==10.16.1
106
108
  # via mkdocs-material
107
- pynacl==1.5.0
109
+ pynacl==1.6.0
108
110
  # via paramiko
109
- pytest==8.4.1
111
+ pytest==8.4.2
110
112
  # via
111
113
  # hdx-python-database (pyproject.toml)
112
114
  # pytest-cov
113
- pytest-cov==6.2.1
115
+ pytest-cov==7.0.0
114
116
  # via hdx-python-database (pyproject.toml)
115
117
  python-dateutil==2.9.0.post0
116
118
  # via ghp-import
117
- pyyaml==6.0.2
119
+ pyyaml==6.0.3
118
120
  # via
119
121
  # mkdocs
120
122
  # mkdocs-get-deps
@@ -123,19 +125,19 @@ pyyaml==6.0.2
123
125
  # pyyaml-env-tag
124
126
  pyyaml-env-tag==1.1
125
127
  # via mkdocs
126
- requests==2.32.4
128
+ requests==2.32.5
127
129
  # via mkdocs-material
128
130
  six==1.17.0
129
131
  # via python-dateutil
130
- sqlalchemy==2.0.41
132
+ sqlalchemy==2.0.44
131
133
  # via hdx-python-database (pyproject.toml)
132
134
  sshtunnel==0.4.0
133
135
  # via hdx-python-database (pyproject.toml)
134
- typing-extensions==4.14.1
136
+ typing-extensions==4.15.0
135
137
  # via sqlalchemy
136
138
  urllib3==2.5.0
137
139
  # via requests
138
- virtualenv==20.32.0
140
+ virtualenv==20.35.4
139
141
  # via pre-commit
140
142
  watchdog==6.0.0
141
143
  # via mkdocs
@@ -1,7 +1,14 @@
1
1
  # file generated by setuptools-scm
2
2
  # don't change, don't track in version control
3
3
 
4
- __all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
4
+ __all__ = [
5
+ "__version__",
6
+ "__version_tuple__",
7
+ "version",
8
+ "version_tuple",
9
+ "__commit_id__",
10
+ "commit_id",
11
+ ]
5
12
 
6
13
  TYPE_CHECKING = False
7
14
  if TYPE_CHECKING:
@@ -9,13 +16,19 @@ if TYPE_CHECKING:
9
16
  from typing import Union
10
17
 
11
18
  VERSION_TUPLE = Tuple[Union[int, str], ...]
19
+ COMMIT_ID = Union[str, None]
12
20
  else:
13
21
  VERSION_TUPLE = object
22
+ COMMIT_ID = object
14
23
 
15
24
  version: str
16
25
  __version__: str
17
26
  __version_tuple__: VERSION_TUPLE
18
27
  version_tuple: VERSION_TUPLE
28
+ commit_id: COMMIT_ID
29
+ __commit_id__: COMMIT_ID
19
30
 
20
- __version__ = version = '1.3.7'
21
- __version_tuple__ = version_tuple = (1, 3, 7)
31
+ __version__ = version = '1.3.8'
32
+ __version_tuple__ = version_tuple = (1, 3, 8)
33
+
34
+ __commit_id__ = commit_id = None
@@ -244,12 +244,10 @@ class Database:
244
244
  Returns:
245
245
  Tuple[Session, Any]: (SQLAlchemy session, base)
246
246
  """
247
- batches = range(len(rows) // batch_size + 1)
248
- for batch in batches:
249
- start_row = batch * batch_size
250
- end_row = start_row + batch_size
251
- batch_rows = rows[start_row:end_row]
252
- self._session.execute(insert(dbtable), batch_rows)
247
+
248
+ for i in range(0, len(rows), batch_size):
249
+ batch = rows[i : i + batch_size]
250
+ self._session.execute(insert(dbtable), batch)
253
251
  self._session.commit()
254
252
 
255
253
  @staticmethod