Example #1
0
    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))
Example #2
0
    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)
Example #3
0
 def run(self):
     load_env("db")
     db_register(make_db_url())
     downgrade(join(db_dir("alembic"), "api"))
Example #4
0
 async def run(self):
     load_env("api")
     db_register(make_db_url())
     downgrade(self.migration_dir)
Example #5
0
 async def run(self):
     load_env("api")
     db_register(make_db_url())
     history(self.migration_dir)
Example #6
0
#!/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)
Example #7
0
 def run(self):
     load_env("db")
     db_register(make_db_url())
     current(join(db_dir("alembic"), "api"))
Example #8
0
 def load_env(cls, key):
     return load_env(key)
Example #9
0
 def run(self):
     load_env("db")
     db_register(make_db_url())
     initialize(join(db_dir("alembic"), "api"))
Example #10
0
 async def run(self):
     load_env("api")
     db_register(make_db_url())
     initialize(self.migration_dir)