ohsnap.ext

class ohsnap.ext.BaseCommandApp(main=None, **kwargs)[source]

A pyCLI application that inherits from our BaseCommandMixin as well as CommandLineMixin and Application.

class ohsnap.ext.BaseCommandMixin[source]

A Mixing for use with pyCLI that enables the concept of a base application that has individualy sub commands that are each an application in their own right.

pre_run()[source]

Custom pre_run logic to preserve argv for parsing by a SubCommand.

setup()[source]

Configure the CommandLineMixin.

During setup, the application instantiates the argparse.ArgumentParser and adds a version parameter (-V, to avoid clashing with -v verbose).

class ohsnap.ext.SubCommandApp(main=None, **kwargs)[source]

A pyCLI application to handle creating applications that are subcommands of a BaseCommandApp.

class ohsnap.ext.SubCommandMixin(base=None, **kwargs)[source]

A mixin to handle creating a subcommand application.

Previous topic

ohsnap.archive

This Page