async def run(self): load_env("api") load_env("api") from bountydns.api.main import api for route in api.routes: print(route.name, route.path, getattr(route, "methods", None))
def run(self): load_env("db") load_env("api") from bountydns.api.main import api for route in api.routes: print(route.name, route.path, route.methods)
def run(self): load_env("db") db_register(make_db_url()) downgrade(join(db_dir("alembic"), "api"))
async def run(self): load_env("api") db_register(make_db_url()) downgrade(self.migration_dir)
async def run(self): load_env("api") db_register(make_db_url()) history(self.migration_dir)
#!/usr/bin/env python import asyncio from sys import exit from bountydns.core.utils import load_env load_env("core") async def call_command(command, args): result = await command.make(args).call() return result if __name__ == "__main__": from bountydns.cli import make_parser, commands loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) parser = make_parser() args = parser.parse_args() for command in commands: if command.has_command(args.command): result = loop.run_until_complete(call_command(command, args)) exit(result) parser.print_help() exit(1)
def run(self): load_env("db") db_register(make_db_url()) current(join(db_dir("alembic"), "api"))
def load_env(cls, key): return load_env(key)
def run(self): load_env("db") db_register(make_db_url()) initialize(join(db_dir("alembic"), "api"))
async def run(self): load_env("api") db_register(make_db_url()) initialize(self.migration_dir)