Skip to main content

Utilities for the Minnow file processing framework.

Project description

Minnow Python

Utilities for the Minnow file processing framework.

import minnow

Load a .properties file

This function will return the properties from a file as a dictionary.

from pathlib import Path

props = load_properties(Path('path/to/file.properties'))

Save to a .properties file

This function will save a dictionary as a .properties file.

props = {'type': 'blueprints', 'orientation': 'above', 'size': 2}
save_properties(props, Path('path/to/file.properties')

Finding files to process

This function will return pairs of data/metadata files in a directory as DataMetaPair instances.

pairs_to_process = list_pairs_at_path(Path('path/to/input/directory')

for pair in pairs_to_process:
    data_path = pair.data_file
    properties_path = pair.metadata_file

    # read the properties if you need to
    properties_dict = load_properties(properties_path)

    # do some processing on each pair

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

minnow-2020.272.0.tar.gz (2.7 kB view hashes)

Uploaded Source

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