Skip to main content

hcl

Explore Hdf5 files on the Command Line.

Designed to be familiar to Unix CLI users, but no particular effort has been made for true compatibility or POSIX compliance.

Usage

usage: hcl [-h] [-c COMMAND] [-p PLUGIN] [--verbose] [--mode MODE] [--version]
           [file]

CLI for interactive exploration of HDF5 files.

positional arguments:
  file                  HDF5 file to explore. Add ':/path/to/group' to start
                        in a specific group. If this is not given, only
                        `--version`, `--help`, or `--command '<some_command>
                        --help'` can be used.

optional arguments:
  -h, --help            show this help message and exit
  -c COMMAND, --command COMMAND
                        Run a single command and exit.
  -p PLUGIN, --plugin PLUGIN
                        Import path for additional commands, in the form
                        '{module}:{object}', where {module} can be an absolute
                        import path, or the path to a python file which can be
                        run; {object} can be a Command subclass, an iterable
                        of them, or a callable returning either. Can be used
                        multiple times.
  --verbose, -v         Increase logging verbosity, up to -vv for debug.
  --mode MODE, -m MODE  Mode in which to open the file. 'r' (default):
                        Readonly, file must exist. 'r+': Read/write, file must
                        exist. 'w': Create file, truncate if exists. 'w-' or
                        'x': Create file, fail if exists. 'a': Read/write if
                        exists, create otherwise.
  --version, -V         Print version and exit.

Commands available

attrs               List attributes or look at one attribute.
cd                  Change working group.
chunks              Get dataset chunks.
compression         Get dataset compression.
compression_opts    Get dataset compression_opts.
driver              Get group or dataset driver.
dtype               Get dataset dtype.
exit                Quit hcl.
filename            Get group or dataset filename.
fillvalue           Get dataset fillvalue.
fletcher32          Get dataset fletcher32.
help                List available commands.
is_virtual          Get dataset is_virtual.
libver              Get group or dataset libver.
ls                  List members of a group.
maxshape            Get dataset maxshape.
mode                Get group or dataset mode.
name                Get group or dataset name.
pwd                 Get working group.
scaleoffset         Get dataset scaleoffset.
shape               Get dataset shape.
shuffle             Get dataset shuffle.
size                Get dataset size.
tree                Show hierarchy as a tree.
userblock_size      Get group or dataset userblock_size.

See files in commands/ for usage for each command.

Development

Plugins

Pull requests adding more commands to the core tool are very welcome.

However, hcl also supplies an easy route to add functionality locally. The --plugin option allows you to supply the python import path or a file system path to a python script, containing third party commands.

These should subclass hcl.Command, and allow you to control autocompletion, return codes and so on. See hcl/commands.py for examples on how to use this class. The context variable passed to the Command's constructor is the main hcl.cli.Cli instance.

Documentation

Run make docs to automatically update this README's usage information, and the command documentation in ./commands. CI checks whether these are up to date.

Notes

Very similar to h5cli. hcl features:

  • more documentation
  • piping output from --command mode
  • doesn't crash when I try to run it.

Metadata

Release files for hcl 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hcl 0.2.1
File Size Uploaded Provenance
hcl-0.2.1.tar.gz 16.8 kB Without provenance Details

Release files / hcl-0.2.1.tar.gz

Download URL hcl-0.2.1.tar.gz
Size 16.8 kB
Tags Source
SHA-256 checksum
How to use checksums
27f257747814c4368c0c786cfea90dd4663d6219cb3bfe62bb9915dd12e91495
BLAKE2b-256 checksum
How to use checksums
da8824e25b3511dd96647f5e37d7f5dbf1958b01a3fba54160bc59bcae860428
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.6

Security for hcl 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page