paperpy package¶
paperpy.exceptions¶
-
exception
paperpy.exceptions.PaperPyError¶ Bases:
Exception
-
exception
paperpy.exceptions.PluginError¶
paperpy.interfaces¶
This module contains all public interfaces that you can use to create plugins.
-
class
paperpy.interfaces.Action¶ Bases:
abc.ABCAn action registers a subcommand in the paperpy command.
To register an action in your plugin add an
paperpy.actionentry point in the setup:setup( # ... entry_points={ "paperpy.action" = "my_subcommand = module.my_action" } )
If
module.my_actionis a class that implements the Action interface then a parser for thepaperpy my_subcommandCLI command is registered.-
fill_parser(parser)¶ This method receives an argparse subparser for your command. Here you can add all your arguments and so on.
-
get_parser_args()¶ This method should a dictionary of keyword arguments that are sent to the
argparse.ArgumentParserconstructor.
-
handle_command(args)¶ This method receives the parsed arguments and should execute the command.
-