Files
torrent_backend/cli_commands.py
2024-05-10 16:44:46 +04:00

16 lines
331 B
Python

from asyncio import run as aiorun
import typer
import database
cli = typer.Typer()
@cli.command(name="create")
def create_database(): aiorun(database.create_all())
@cli.command(name="drop")
def drop_database(): aiorun(database.drop_all())
@cli.command(name="recreate")
def recreate_database(): aiorun(database.recreate_all())