How to use the omegaml.client.docoptparser.CommandBase function in omegaml

To help you get started, we’ve selected a few omegaml examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github omegaml / omegaml / omegaml / client / cli / cloud.py View on Github external
from omegaml.client.docoptparser import CommandBase
from omegaml.client.userconf import save_userconfig_from_apikey
from omegaml.client.util import get_omega
from omegaml.defaults import update_from_config


class CloudCommandBase(CommandBase):
    """
    Usage:
      om cloud login [] [] [options]
      om cloud config [options]

    Options:
      --userid=USERID  the userid at hub.omegaml.io (see account profile)
      --apikey=APIKEY  the apikey at hub.omegaml.io (see account profile)
      --apiurl=URL     the cloud URL [default: https://hub.omegaml.io]
    """
    command = 'cloud'

    def login(self):
        userid = self.args.get('') or self.args.get('--userid')
        apikey = self.args.get('') or self.args.get('--apikey')
        api_url = self.args.get('--apiurl')
github omegaml / omegaml / omegaml / client / cli / datasets.py View on Github external
import imghdr

import pandas as pd

from omegaml.client.docoptparser import CommandBase
from omegaml.client.util import get_omega


class DatasetsCommandBase(CommandBase):
    """
    Usage:
      om datasets list [
github omegaml / omegaml / omegaml / client / cli / shell.py View on Github external
from omegaml.client.docoptparser import CommandBase
from omegaml.client.util import get_omega


class ShellCommandBase(CommandBase):
    """
    Usage:
        om shell [options]
    """
    command = 'shell'

    def shell(self):
        om = get_omega(self.args)
        use_ipython = False
        try:
            import IPython
        except:
            self.logger.warn("you should pip install ipython for convenience")
        else:
            use_ipython = True
        # ipython
github omegaml / omegaml / omegaml / client / cli / runtime.py View on Github external
from omegaml.client.docoptparser import CommandBase
from omegaml.client.util import get_omega


class RuntimeCommandBase(CommandBase):
    """
    Usage:
      om runtime model   [] [] [--result=] [--param=]... [options]
      om runtime script  [] [...] [--async] [options]
      om runtime job  [] [] [--async] [options]
      om runtime result  [options]
      om runtime ping [options]


    Options:
      --async  don't wait for results, will print taskid

    Description:
       can be any valid model action like fit, predict, score,
      transform, decision_function etc.
github omegaml / omegaml / omegaml / client / cli / jobs.py View on Github external
import datetime
import nbformat
from cron_descriptor import get_description
from omegaml.client.docoptparser import CommandBase

from omegaml.client.util import get_omega


class JobsCommandBase(CommandBase):
    """
    Usage:
      om jobs list [
github omegaml / omegaml / omegaml / client / cli / models.py View on Github external
from importlib import import_module

from omegaml.client.docoptparser import CommandBase
from omegaml.client.util import get_omega


class ModelsCommandBase(CommandBase):
    """
    Usage:
      om models put  
      om models list [
github omegaml / omegaml / omegaml / client / cli / catchall.py View on Github external
from omegaml.client.docoptparser import CommandBase


class CatchallCommandBase(CommandBase):
    command = "catchall"

    def __call__(self):
        if self.args.get('--copyright'):
            logger = self.logger
            logger.info("(c) omega|ml by one2seven GmbH, Zurich, Switzerland, https://omegaml.io")
            logger.info("third party components (c) by their respective copyright holders")
            logger.info("see LICENSE and THIRDPARTY-LICENSES at https://github.com/omegaml/omegaml/")
            return
        self.parser.help()
github omegaml / omegaml / omegaml / client / cli / scripts.py View on Github external
import os

from omegaml.client.docoptparser import CommandBase
from omegaml.client.util import get_omega


class ScriptsCommandBase(CommandBase):
    """
    Usage:
        om scripts list [