Skip to content

Commit

Permalink
Update file writing method to use new function
Browse files Browse the repository at this point in the history
  • Loading branch information
magland committed May 31, 2024
1 parent 85e7897 commit fb76a5a
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,7 @@ h5_url = "https://api.dandiarchive.org/api/assets/11f512ba-5bcf-4230-a8cb-dc8d36
# Create the h5py-like client
client = lindi.LindiH5pyFile.from_hdf5_file(h5_url)

# Generate a reference file system
rfs = client.to_reference_file_system()

# Save it to a file for later use
with open("example.lindi.json", "w") as f:
json.dump(rfs, f, indent=2)
client.write_lindi_file('example.lindi.json')

# See the next example for how to read this file
```
Expand Down Expand Up @@ -116,7 +111,7 @@ url = 'https://lindi.neurosift.org/dandi/dandisets/000939/assets/56d875d6-a705-4

# Load the h5py-like client for the reference file system
# in read-write mode
client = lindi.LindiH5pyFile.from_reference_file_system(url, mode="r+")
client = lindi.LindiH5pyFile.from_lindi_file(url, mode="r+")

# Edit an attribute
client.attrs['new_attribute'] = 'new_value'
Expand Down

0 comments on commit fb76a5a

Please sign in to comment.