Source code for oasislmf.cli.api

from argparse import RawDescriptionHelpFormatter
from .command import OasisBaseCommand, OasisComputationCommand


[docs] class ListApiCmd(OasisComputationCommand): """ Issue API GET requests via the command line """
[docs] formatter_class = RawDescriptionHelpFormatter
[docs] computation_name = 'PlatformList'
[docs] class RunApiCmd(OasisComputationCommand): """ Run a model via the Oasis Platoform API end to end """
[docs] formatter_class = RawDescriptionHelpFormatter
[docs] computation_name = 'PlatformRun'
[docs] class RunInputApiCmd(OasisComputationCommand): """ Run a model via the Oasis Platoform API end to end """
[docs] formatter_class = RawDescriptionHelpFormatter
[docs] computation_name = 'PlatformRunInputs'
[docs] class RunLossApiCmd(OasisComputationCommand): """ Run a model via the Oasis Platoform API end to end """
[docs] formatter_class = RawDescriptionHelpFormatter
[docs] computation_name = 'PlatformRunLosses'
[docs] class DeleteApiCmd(OasisComputationCommand): """ Delete items from the Platform API """
[docs] formatter_class = RawDescriptionHelpFormatter
[docs] computation_name = 'PlatformDelete'
[docs] class GetApiCmd(OasisComputationCommand): """ Download files from the Oasis Platoform API """
[docs] formatter_class = RawDescriptionHelpFormatter
[docs] computation_name = 'PlatformGet'
[docs] class ApiCmd(OasisBaseCommand):
[docs] sub_commands = { 'list': ListApiCmd, 'run': RunApiCmd, 'generate-oasis-files': RunInputApiCmd, 'generate-losses': RunLossApiCmd, 'delete': DeleteApiCmd, 'get': GetApiCmd, }