Skip to content

Commit 42b9804

Browse files
committed
prune top-level synchronous API
1 parent 9f0ccfa commit 42b9804

File tree

2 files changed

+0
-61
lines changed

2 files changed

+0
-61
lines changed

src/zarr/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
create_group,
1111
create_hierarchy,
1212
create_nodes,
13-
create_rooted_hierarchy,
1413
empty,
1514
empty_like,
1615
full,

src/zarr/api/synchronous.py

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,10 @@
5151
"create_array",
5252
"create_hierarchy",
5353
"create_nodes",
54-
"create_rooted_hierarchy",
5554
"empty",
5655
"empty_like",
5756
"full",
5857
"full_like",
59-
"get_node",
6058
"group",
6159
"load",
6260
"ones",
@@ -1208,61 +1206,3 @@ def create_nodes(
12081206

12091207
for key, value in sync(_collect_aiterator(coro)):
12101208
yield key, _parse_async_node(value)
1211-
1212-
1213-
def create_rooted_hierarchy(
1214-
*,
1215-
store: Store,
1216-
nodes: dict[str, GroupMetadata | ArrayV2Metadata | ArrayV3Metadata],
1217-
overwrite: bool = False,
1218-
) -> Group | Array:
1219-
"""
1220-
Create a Zarr hierarchy with a root, and return the root node, which could be a ``Group``
1221-
or ``Array`` instance.
1222-
1223-
Parameters
1224-
----------
1225-
store : Store
1226-
The storage backend to use.
1227-
path : str
1228-
The name of the root of the created hierarchy. Every key in ``nodes`` will be prefixed with
1229-
``path`` prior to creating nodes.
1230-
nodes : dict[str, GroupMetadata | ArrayV3Metadata | ArrayV2Metadata]
1231-
A dictionary defining the hierarchy. The keys are the paths of the nodes
1232-
in the hierarchy, and the values are the metadata of the nodes. The
1233-
metadata must be either an instance of GroupMetadata, ArrayV3Metadata
1234-
or ArrayV2Metadata.
1235-
overwrite : bool
1236-
Whether to overwrite existing nodes. Default is ``False``.
1237-
1238-
Returns
1239-
-------
1240-
Group | Array
1241-
"""
1242-
async_node = sync(
1243-
async_api.create_rooted_hierarchy(store=store, nodes=nodes, overwrite=overwrite)
1244-
)
1245-
return _parse_async_node(async_node)
1246-
1247-
1248-
def get_node(store: Store, path: str, zarr_format: ZarrFormat) -> Array | Group:
1249-
"""
1250-
Get an Array or Group from a path in a Store.
1251-
1252-
Parameters
1253-
----------
1254-
store : Store
1255-
The store-like object to read from.
1256-
path : str
1257-
The path to the node to read.
1258-
zarr_format : {2, 3}
1259-
The zarr format of the node to read.
1260-
1261-
Returns
1262-
-------
1263-
Array | Group
1264-
"""
1265-
1266-
return _parse_async_node(
1267-
sync(async_api.get_node(store=store, path=path, zarr_format=zarr_format))
1268-
)

0 commit comments

Comments
 (0)