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.ABC
An action registers a subcommand in the paperpy command.
To register an action in your plugin add an
paperpy.action
entry point in the setup:setup( # ... entry_points={ "paperpy.action" = "my_subcommand = module.my_action" } )
If
module.my_action
is a class that implements the Action interface then a parser for thepaperpy my_subcommand
CLI 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.ArgumentParser
constructor.
-
handle_command
(args)¶ This method receives the parsed arguments and should execute the command.
-