Skip to main content

Python tools for querying Flexible File Structure

Project description

ffs

Python tools for querying a Flexible File Structure as specified in https://gitlab.com/cardonazlaticlabs/data-policy

The name of the PyPI package is flexfs to avoid naming collisions with the unrelated ffs project. The import and CLI name is ffs.

Usage

The entry point is a command line tool called ffs with a number of subcommands:

Usage: ffs [OPTIONS] COMMAND [ARGS]...

  Command line tool for working with a Flexible File Structure.

Options:
  --version      Show the version and exit.
  -v, --verbose  Increase logging verbosity.  [x>=0]
  --help         Show this message and exit.

Commands:
  book      Export the FFS metadata into files for mdbook.
  export    Read the FFS and its metadata into JSON.
  problems  List problems with the structure of the FFS.

Export

Usage: ffs export [OPTIONS] [ROOT]

  Read the FFS and its metadata into JSON.

Options:
  -s, --sort               Whether to sort keys in outupt.
  -s, --indent INTEGER     Indentation of output: none by default, 0 for
                           newlines, a positive number N for N spaces, a
                           negative number -N for N tabs.
  -l, --flatlines          Un-nest the entries and print one object per line.
                           The 'children' attribute is replaced by an array of
                           string names, and the 'name' attribute now includes
                           the entry's ancestors (/-separated). '--indent'
                           option is ignored.
  -r, --recursion INTEGER  Depth to recurse into entries; negative (default)
                           for infinite. Directories which are not valid
                           entries are not explored.
  --help                   Show this message and exit.

Book

Usage: ffs book [OPTIONS] [ROOT] TARGET

  Export the FFS metadata into files for mdbook.

Options:
  -t, --title TEXT         Title for generated book, default
                           '{FQDN}:{ROOT_REAL_PATH}'.
  -r, --recursion INTEGER  Depth to recurse into entries; negative (default)
                           for infinite. Directories which are not valid
                           entries are not explored.
  --help                   Show this message and exit.

Problems

Usage: ffs problems [OPTIONS] [ROOT]

  List problems with the structure of the FFS.

Options:
  -c, --check          Exit with an error code at the first problem
  -s, --skip-problems  Do not attempt to traverse below problematic
                       directories
  --help               Show this message and exit.

Development

A number of make recipes are included for convenience of regular development tasks. In particular, see make {install-dev,update-spec,fmt,lint,test,readme,book}.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flexfs-2.0.2.tar.gz (2.8 MB view hashes)

Uploaded Source

Built Distribution

flexfs-2.0.2-py3-none-any.whl (19.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page