Skip to main content

Data management command line tool: dtool.

Project description

Data management command line tool: dtool.

Overview

The dtool-cli python package provides a skeleton command line interface to dtool that other “dtool” command line packages can be plugged into.

It makes use of click and click-plugins.

Creating a plugin

The dtool-cli plug-in system exposes two name spaces for registering commands:

  • dtool.dataset

  • dtool.collection

To create a dtool-cli plug-in, create a Python package with a dataset and/or a collection module(s). Below is the content of a hypothetical dtool_create/dataset.py file, aka the dataset module in a dtool-create plugin:

"""dataset command line module."""

import click


@click.command()
def create():
    print("Creating dataset...")

Then create entry points along the lines of the below in the setup.py:

from setuptools import setup

setup(
    ...
    entry_points={
        "dtool.dataset": [
            "create=dtool_create.dataset:create",
            "markup=dtool_create.dataset:markup",
            "manifest=dtool_create.dataset:manifest",
        ],
        "dtool.collection": [
            "create=dtool_create.collection:create",
            "markup=dtool_create.collection:markup",
        ],
    },
    ...
)

Installation

To install the dtool-cli package.

cd dtool-cli
python setup.py install

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

dtool-cli-0.1.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