3.1. karr_lab_aws_manager package

3.1.2. Submodules

3.1.3. karr_lab_aws_manager.__main__ module

karr_lab_aws_manager command line interface

Author

Name <email>

Date

2019-9-16

Copyright

2019, Karr Lab

License

MIT

class karr_lab_aws_manager.__main__.App(label=None, **kw)[source]

Bases: cement.core.foundation.App

Command line application

class Meta[source]

Bases: object

base_controller = 'base'[source]
handlers = [<class 'karr_lab_aws_manager.__main__.BaseController'>, <class 'karr_lab_aws_manager.__main__.Command3WithArgumentsController'>, <class 'karr_lab_aws_manager.__main__.EsBulkUpload'>, <class 'karr_lab_aws_manager.__main__.EsCheckSvr'>, <class 'karr_lab_aws_manager.__main__.EsGetIdxMapping'>, <class 'karr_lab_aws_manager.__main__.EsDeleteIdx'>, <class 'karr_lab_aws_manager.__main__.EsSetIdx'>, <class 'karr_lab_aws_manager.__main__.EsSetAnalysis'>][source]
label = 'karr_lab_aws_manager'[source]
class karr_lab_aws_manager.__main__.BaseController(*args, **kw)[source]

Bases: cement.ext.ext_argparse.ArgparseController

Base controller for command line application

class Meta[source]

Bases: object

arguments = [(['-v', '--version'], {'action': 'version', 'version': '0.0.23'})][source]
description = 'karr_lab_aws_manager'[source]
label = 'base'[source]
cmd1()[source]

command_1 description

cmd2()[source]

command_2 description

class karr_lab_aws_manager.__main__.Command3WithArgumentsController(*args, **kw)[source]

Bases: cement.ext.ext_argparse.ArgparseController

Command3 description

class Meta[source]

Bases: object

arguments = [(['arg_1'], {'type': <class 'str'>, 'help': 'Description of arg_1'}), (['arg_2'], {'type': <class 'str'>, 'help': 'Description of arg_2'}), (['--opt-arg-3'], {'type': <class 'str'>, 'default': 'default value of opt-arg-1', 'help': 'Description of opt-arg-3'}), (['--opt-arg-4'], {'type': <class 'float'>, 'default': nan, 'help': 'Description of opt-arg-4'})][source]
description = 'Command3 description'[source]
label = 'command-3'[source]
stacked_on = 'base'[source]
stacked_type = 'nested'[source]
class karr_lab_aws_manager.__main__.EsBulkUpload(*args, **kw)[source]

Bases: cement.ext.ext_argparse.ArgparseController

Karrlab elasticsearch bulk upload cli

class Meta[source]

Bases: object

arguments = [(['cursor'], {'type': <class 'str'>, 'help': 'Pymongo.Cursor/directory to files to be loaded'}), (['id'], {'type': <class 'str'>, 'help': 'Key in mongo collection for identification'}), (['--count'], {'type': <class 'int'>, 'default': None, 'help': 'Cursor/file size'}), (['--index'], {'type': <class 'str'>, 'default': 'test', 'help': 'Name of index in es'}), (['--bulk_size', '-bz'], {'type': <class 'int'>, 'default': 100, 'help': 'Name of unique key to be used as index for es'}), (['--profile_name', '-pn'], {'type': <class 'str'>, 'default': 'es-poweruser', 'help': 'AWS profile to use for authentication'}), (['--credential_path', '-cr'], {'type': <class 'str'>, 'default': '~/.wc/third_party/aws_credentials', 'help': 'Directory for aws credentials file'}), (['--config_path', '-cp'], {'type': <class 'str'>, 'default': '~/.wc/third_party/aws_config', 'help': 'Directory for aws config file'}), (['--elastic_path', '-ep'], {'type': <class 'str'>, 'default': '~/.wc/third_party/elasticsearch.ini', 'help': 'Directory for file containing aws elasticsearch service variables'}), (['--headers'], {'type': <class 'dict'>, 'default': {'Content-Type': 'application/json'}, 'help': 'Http header'})][source]
description = 'Bulk loading data into karrlab hosted elasticsearch service'[source]
label = 'es-bulk-upload'[source]
stacked_on = 'base'[source]
stacked_type = 'nested'[source]
class karr_lab_aws_manager.__main__.EsCheckSvr(*args, **kw)[source]

Bases: cement.ext.ext_argparse.ArgparseController

Karrlab elasticsearch delete index.

class Meta[source]

Bases: object

arguments = [(['--profile_name', '-pn'], {'type': <class 'str'>, 'default': 'es-poweruser', 'help': 'AWS profile to use for authentication'}), (['--credential_path', '-cr'], {'type': <class 'str'>, 'default': '~/.wc/third_party/aws_credentials', 'help': 'Directory for aws credentials file'}), (['--config_path', '-cp'], {'type': <class 'str'>, 'default': '~/.wc/third_party/aws_config', 'help': 'Directory for aws config file'}), (['--elastic_path', '-ep'], {'type': <class 'str'>, 'default': '~/.wc/third_party/elasticsearch.ini', 'help': 'Directory for file containing aws elasticsearch service variables'})][source]
description = 'Check ES server health status'[source]
label = 'es-check-server'[source]
stacked_on = 'base'[source]
stacked_type = 'nested'[source]
class karr_lab_aws_manager.__main__.EsDeleteIdx(*args, **kw)[source]

Bases: cement.ext.ext_argparse.ArgparseController

Karrlab elasticsearch delete index.

class Meta[source]

Bases: object

arguments = [(['index'], {'type': <class 'str'>, 'help': 'Name of index in es'}), (['--id'], {'type': <class 'str'>, 'help': 'ID of the doc in index'}), (['--profile_name', '-pn'], {'type': <class 'str'>, 'default': 'es-poweruser', 'help': 'AWS profile to use for authentication'}), (['--credential_path', '-cr'], {'type': <class 'str'>, 'default': '~/.wc/third_party/aws_credentials', 'help': 'Directory for aws credentials file'}), (['--config_path', '-cp'], {'type': <class 'str'>, 'default': '~/.wc/third_party/aws_config', 'help': 'Directory for aws config file'}), (['--elastic_path', '-ep'], {'type': <class 'str'>, 'default': '~/.wc/third_party/elasticsearch.ini', 'help': 'Directory for file containing aws elasticsearch service variables'})][source]
description = 'Delete index in ES'[source]
label = 'es-del-idx'[source]
stacked_on = 'base'[source]
stacked_type = 'nested'[source]
class karr_lab_aws_manager.__main__.EsGetIdxMapping(*args, **kw)[source]

Bases: cement.ext.ext_argparse.ArgparseController

Karrlab elasticsearch delete index.

class Meta[source]

Bases: object

arguments = [(['--index'], {'type': <class 'str'>, 'default': '.kibana_1', 'help': 'Comma separated names of indices in es'}), (['--profile_name', '-pn'], {'type': <class 'str'>, 'default': 'es-poweruser', 'help': 'AWS profile to use for authentication'}), (['--credential_path', '-cr'], {'type': <class 'str'>, 'default': '~/.wc/third_party/aws_credentials', 'help': 'Directory for aws credentials file'}), (['--config_path', '-cp'], {'type': <class 'str'>, 'default': '~/.wc/third_party/aws_config', 'help': 'Directory for aws config file'}), (['--elastic_path', '-ep'], {'type': <class 'str'>, 'default': '~/.wc/third_party/elasticsearch.ini', 'help': 'Directory for file containing aws elasticsearch service variables'})][source]
description = 'Check ES server health status'[source]
label = 'es-get-mapping'[source]
stacked_on = 'base'[source]
stacked_type = 'nested'[source]
class karr_lab_aws_manager.__main__.EsSetAnalysis(*args, **kw)[source]

Bases: cement.ext.ext_argparse.ArgparseController

Karrlab elasticsearch settings for index.

class Meta[source]

Bases: object

arguments = [(['index'], {'type': <class 'str'>, 'help': 'Name of index in es'}), (['filter_dir'], {'type': <class 'str'>, 'help': 'Directory of filter file'}), (['analyzer_dir'], {'type': <class 'str'>, 'help': 'Directory of analyzer file'}), (['--profile_name', '-pn'], {'type': <class 'str'>, 'default': 'es-poweruser', 'help': 'AWS profile to use for authentication'}), (['--credential_path', '-cr'], {'type': <class 'str'>, 'default': '~/.wc/third_party/aws_credentials', 'help': 'Directory for aws credentials file'}), (['--config_path', '-cp'], {'type': <class 'str'>, 'default': '~/.wc/third_party/aws_config', 'help': 'Directory for aws config file'}), (['--elastic_path', '-ep'], {'type': <class 'str'>, 'default': '~/.wc/third_party/elasticsearch.ini', 'help': 'Directory for file containing aws elasticsearch service variables'}), (['--headers'], {'type': <class 'dict'>, 'default': {'Content-Type': 'application/json'}, 'help': 'Http header'})][source]
description = 'Index settings in ES'[source]
label = 'es-set-analysis'[source]
stacked_on = 'base'[source]
stacked_type = 'nested'[source]
class karr_lab_aws_manager.__main__.EsSetIdx(*args, **kw)[source]

Bases: cement.ext.ext_argparse.ArgparseController

Karrlab elasticsearch settings for index.

class Meta[source]

Bases: object

arguments = [(['index'], {'type': <class 'str'>, 'help': 'Name of index in es'}), (['replica_count'], {'type': <class 'int'>, 'help': 'Number of replicas'}), (['--shard_count', '-sc'], {'type': <class 'int'>, 'default': 1, 'help': 'Number of primary shards contained in the es cluster'}), (['--profile_name', '-pn'], {'type': <class 'str'>, 'default': 'es-poweruser', 'help': 'AWS profile to use for authentication'}), (['--credential_path', '-cr'], {'type': <class 'str'>, 'default': '~/.wc/third_party/aws_credentials', 'help': 'Directory for aws credentials file'}), (['--config_path', '-cp'], {'type': <class 'str'>, 'default': '~/.wc/third_party/aws_config', 'help': 'Directory for aws config file'}), (['--elastic_path', '-ep'], {'type': <class 'str'>, 'default': '~/.wc/third_party/elasticsearch.ini', 'help': 'Directory for file containing aws elasticsearch service variables'}), (['--headers'], {'type': <class 'dict'>, 'default': {'Content-Type': 'application/json'}, 'help': 'Http header'})][source]
description = 'Index settings in ES'[source]
label = 'es-set-idx'[source]
stacked_on = 'base'[source]
stacked_type = 'nested'[source]
karr_lab_aws_manager.__main__.main()[source]

3.1.4. karr_lab_aws_manager._version module

3.1.5. karr_lab_aws_manager.core module

karr_lab_aws_manager

Author

Name <email>

Date

2019-9-16

Copyright

2019, Karr Lab

License

MIT

class karr_lab_aws_manager.core.ExampleClass(arg_1, arg_2, kwarg_1=None, kwarg_2=None)[source]

Bases: object

Descipton of ExampleClass

attr_1[source]

description of attr_1

Type

type of attr_1

attr_2[source]

description of attr_2

Type

type of attr_2

...
method_1(arg_1, arg_2, kwarg_1=None, kwarg_2=None)[source]

Description of method_1

Parameters
  • arg_1 (type of arg_1) – description of arg_1

  • arg_2 (type of arg_2) – description of arg_2

  • kwarg_1 (type of kwarg_1, optional) – description of kwarg_1

  • kwarg_2 (type of kwarg_2, optional) – description of kwarg_2

  • ..

Returns

description of return value

Return type

type of return value

:raises type of raised exception(s): description of raised exceptions

3.1.6. Module contents