Skip to content

Native .annnet Format

Primary read and write entry points from annnet.io.annnet_format.

annnet.io.annnet_format.write

write(graph, path, *, compression='zstd', overwrite=False)

Write an AnnNet graph to a directory or .annnet archive.

annnet.io.annnet_format.read

read(path, *, lazy=False)

Load graph from disk with zero loss.

Parameters:

Name Type Description Default
path str | Path

Path to .annnet directory

required
lazy bool

If True, delay loading large arrays until accessed

False

Returns:

Type Description
AnnNet

Reconstructed graph with all topology and metadata