Connect to a Loom file.
loompy.
connect
(filename: str, mode: str = 'r+', *, validate: bool = True, spec_version: str = '2.0.1') → loompy.loompy.LoomConnection[source]¶Establish a connection to a .loom file.
Parameters: |
|
---|---|
Returns: | A LoomConnection instance. |
This function should typically be used as a context manager (i.e. inside a with
-block):
import loompy
with loompy.connect("mydata.loom") as ds:
print(ds.ca.keys())
This ensures that the file will be closed automatically when the context block ends
Note: if validation is requested, an exception is raised if validation fails.