tonik 0.1.6__py3-none-any.whl → 0.1.8__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.
- tonik/api.py +3 -1
- {tonik-0.1.6.dist-info → tonik-0.1.8.dist-info}/METADATA +1 -1
- {tonik-0.1.6.dist-info → tonik-0.1.8.dist-info}/RECORD +6 -6
- {tonik-0.1.6.dist-info → tonik-0.1.8.dist-info}/WHEEL +0 -0
- {tonik-0.1.6.dist-info → tonik-0.1.8.dist-info}/entry_points.txt +0 -0
- {tonik-0.1.6.dist-info → tonik-0.1.8.dist-info}/licenses/LICENSE +0 -0
tonik/api.py
CHANGED
|
@@ -23,9 +23,11 @@ logger = logging.getLogger(__name__)
|
|
|
23
23
|
if sys.version_info >= (3, 10):
|
|
24
24
|
# For Python 3.10 and above, use the new union operator '|'
|
|
25
25
|
SubdirType = Annotated[list[str] | None, Query()]
|
|
26
|
+
InventoryReturnType = list | dict
|
|
26
27
|
else:
|
|
27
28
|
# For Python 3.9 and below, use Union from typing
|
|
28
29
|
SubdirType = Annotated[Union[List[str], None], Query()]
|
|
30
|
+
InventoryReturnType = Union[list, dict]
|
|
29
31
|
|
|
30
32
|
|
|
31
33
|
class TonikAPI:
|
|
@@ -147,7 +149,7 @@ class TonikAPI:
|
|
|
147
149
|
d, units='hours since 1970-01-01 00:00:00.0', calendar='gregorian')
|
|
148
150
|
return freq, dates, spec
|
|
149
151
|
|
|
150
|
-
def inventory(self, group: str, subdir:
|
|
152
|
+
def inventory(self, group: str, subdir: SubdirType = None, tree: bool = True) -> InventoryReturnType:
|
|
151
153
|
sg = Storage(group, rootdir=self.rootdir, create=False)
|
|
152
154
|
try:
|
|
153
155
|
c = sg.get_substore(*subdir)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: tonik
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.8
|
|
4
4
|
Summary: Store time series data as HDF5 files and access them through an API.
|
|
5
5
|
Project-URL: Homepage, https://tsc-tools.github.io/tonik
|
|
6
6
|
Project-URL: Issues, https://github.com/tsc-tools/tonik/issues
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
tonik/__init__.py,sha256=ZBVGh4dm_l9xwiBGb33O5QV9MfZeNiEd3DBDAm6DiHk,511
|
|
2
|
-
tonik/api.py,sha256=
|
|
2
|
+
tonik/api.py,sha256=l9_F0ioK9n7UbKpGJKbJts-xwkFC4GBv10R2qLS6Du8,6832
|
|
3
3
|
tonik/storage.py,sha256=GNJ6w9VHOeTR_ZJMZ-Ipqe3nFK2I91fkHYwg1k9bEuo,9470
|
|
4
4
|
tonik/utils.py,sha256=3nSRU_GnV6arP4e63YHn4oEV8XbqzVAW8FCvQVIwGdg,2757
|
|
5
5
|
tonik/xarray2netcdf.py,sha256=RUsPwPDEOnUIMGt7_9F1VDyg83zu8x-Qs3jmZs3Dq0o,5173
|
|
6
6
|
tonik/xarray2zarr.py,sha256=EhEo5kqzrKyXR37RX2zYtgOAviZdRqstZi_4ZtUmSDc,2342
|
|
7
7
|
tonik/package_data/index.html,sha256=GKDClUhIam_fAYbNfzAolORhSCG3ae1wW3VjWCg4PMk,2732
|
|
8
|
-
tonik-0.1.
|
|
9
|
-
tonik-0.1.
|
|
10
|
-
tonik-0.1.
|
|
11
|
-
tonik-0.1.
|
|
12
|
-
tonik-0.1.
|
|
8
|
+
tonik-0.1.8.dist-info/METADATA,sha256=po93NQ8aYXBg6mGARBTPO1r1qq8_gsl8slfsyaC1rZM,1938
|
|
9
|
+
tonik-0.1.8.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
10
|
+
tonik-0.1.8.dist-info/entry_points.txt,sha256=VnGfC5qAzpntEHAb5pooUEpYABSgOfQoNhCEtLDJyf8,45
|
|
11
|
+
tonik-0.1.8.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
12
|
+
tonik-0.1.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|