s3conf/client.py
def main(ctx, edit, create):
    """
    Simple command line tool to help manage environment variables stored in a S3-like system. Facilitates editing text
    files remotely stored, as well as downloading and uploading files.
    """
    # configs this module logger to behave properly
    # logger messages will go to stderr (check __init__.py/patch.py)
    # client output should be generated with click.echo() to go to stdout
    try:
        click_log.basic_config('s3conf')
        logger.debug('Running main entrypoint')
        if edit:
            if ctx.invoked_subcommand is None:
                logger.debug('Using config file %s', config.LOCAL_CONFIG_FILE)
                config.ConfigFileResolver(config.LOCAL_CONFIG_FILE).edit(create=create)
                return
            else:
                raise UsageError('Edit should not be called with a subcommand.')
        # manually call help in case no relevant settings were defined
        if ctx.invoked_subcommand is None:
            click.echo(main.get_help(ctx))
    except exceptions.FileDoesNotExist as e:
        raise UsageError('The file {} does not exist. Try "-c" option if you want to create it.'.format(str(e)))
def main(ctx, edit, create):
    # configs this module logger to behave properly
    # logger messages will go to stderr (check __init__.py/patch.py)
    # client output should be generated with click.echo() to go to stdout
    try:
        click_log.basic_config('s3conf')
        logger.debug('Running main entrypoint')
        if edit:
            if ctx.invoked_subcommand is None:
                logger.debug('Using config file %s', config.LOCAL_CONFIG_FILE)
                config.ConfigFileResolver(config.LOCAL_CONFIG_FILE).edit(create=create)
                return
            else:
                raise UsageError('Edit should not be called with a subcommand.')
        # manually call help in case no relevant settings were defined
        if ctx.invoked_subcommand is None:
            click.echo(main.get_help(ctx))
    except exceptions.FileDoesNotExist as e:
        raise UsageError('The file {} does not exist. Try "-c" option if you want to create it.'.format(str(e)))
def main ( ctx , edit , create ) : # configs this module logger to behave properly # logger messages will go to stderr (check __init__.py/patch.py) # client output should be generated with click.echo() to go to stdout try : click_log . basic_config ( 's3conf' ) logger . debug ( 'Running main entrypoint' ) if edit : if ctx . invoked_subcommand is None : logger . debug ( 'Using config file %s' , config . LOCAL_CONFIG_FILE ) config . ConfigFileResolver ( config . LOCAL_CONFIG_FILE ) . edit ( create = create ) return else : raise UsageError ( 'Edit should not be called with a subcommand.' ) # manually call help in case no relevant settings were defined if ctx . invoked_subcommand is None : click . echo ( main . get_help ( ctx ) ) except exceptions . FileDoesNotExist as e : raise UsageError ( 'The file {} does not exist. Try "-c" option if you want to create it.' . format ( str ( e ) ) )
Simple command line tool to help manage environment variables stored in a S3-like system. Facilitates editing text
    files remotely stored, as well as downloading and uploading files.
Simple command line tool to help manage environment variables stored in a S3 - like system . Facilitates editing text files remotely stored as well as downloading and uploading files .