Skip to main content

Flywheel common gear utilities

Project description

Flywheel Gear Utils

This repository contains Flywheel gear utils with minimal dependencies, i.e. no dependency on Flywheel site version, or SDK version.

Currently the repo contains:

  • Manifest: A class to interact with a gear Manifest
  • Config: A class to interact with a gear Config

Manifest

The Manifest class provides utilities for parsing and generating a manifest for a gear. Including functionality to:

  • Load a manifest from a file
  • Check if the manifest is valid
  • Create default config schema from manifest
  • Access properties for docker image, version, inputs, license, etc.

Ex.:

    >>> from flywheel_gear_toolkit.utils.manifest import Manifest
    >>> manifest = Manifest(<manifest_file>)
    >>> manifest.is_valid()
    []  # No errors
    True

Config

The Config class provides utilities for parsing and generating a manifest for a gear. Including functionality to:

  • Generate default config from manifest
  • Access config properties
  • Utilities for building a config.json file.

Ex.:

    >>> from flywheel_gear_toolkit.utils import config, manifest
    >>> m = manifest.Manifest(<manifest_file>)
    >>> c = config.Config.default_config_from_manifest(m)
    >>> c.add_input('dicom','~/input_dicom.dcm.zip')
    >>> c.to_json('~/gear/config.json')

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

fw_gear_utils-0.1.1-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file fw_gear_utils-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: fw_gear_utils-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.9.6 Linux/5.4.109+

File hashes

Hashes for fw_gear_utils-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 395cb67d1a35e0d19051acbfd1825a7dee75a51670d9715674f4f4e8e21f3d0a
MD5 aa9589f24826cd9c822572575ae889db
BLAKE2b-256 57a03e0937030154fc32dce0f09c660e0ea9c6be1ca67738ecdd93d40f341e85

See more details on using hashes here.

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