How to use the pgctl.cli.PgctlApp function in pgctl

To help you get started, we’ve selected a few pgctl 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 Yelp / pgctl / pgctl / cli.py View on Github external
def with_services(self, services):
        """return a similar PgctlApp, but with a different set of services"""
        newconf = dict(self.pgconf)
        newconf['services'] = services
        return PgctlApp(newconf)
github Yelp / pgctl / pgctl / cli.py View on Github external
def main(argv=None):
    p = parser()
    args = p.parse_args(argv)
    config = Config('pgctl')
    config = config.combined(PGCTL_DEFAULTS, args)
    app = PgctlApp(config)

    return app()
github Yelp / pgctl / pgctl / cli.py View on Github external
def parser():
    commands = [command.__name__ for command in PgctlApp.commands]
    parser = argparse.ArgumentParser()
    parser.add_argument('--version', action='version', version=__version__)
    parser.add_argument(
        '--verbose',
        action='store_true',
        default=False,
        help='show additional service action information',
    )
    parser.add_argument('--pgdir', help='name the playground directory', default=argparse.SUPPRESS)
    parser.add_argument('--pghome', help='directory to keep user-level playground state', default=argparse.SUPPRESS)
    parser.add_argument(
        '--json', action='store_true', default=False,
        help='output in JSON (only supported by some commands)',
    )
    parser.add_argument(
        '--force', action='store_true', default=False,