Ask a question
I would like to register a command with a Namespace similarly to how Flask does it
For example,
import click
from ..views import api
@api.cli.command("setup")
@click.argument("name")
def create(name):
return f"Successfully created {name}"
and from my .view.py
from flask_restx import Namespace
api = Namespace("search", description="Search data with Elasticsearch.")
Running flask search create alice returns Error: No such command 'search'.; similarly running flask --help doesn't like the command in the Commands section.
Ask a question I would like to register a command with a
Namespace
similarly to how Flask does itFor example,
and from my
.view.py
Running
flask search create alice
returnsError: No such command 'search'.
; similarly runningflask --help
doesn't like the command in theCommands
section.Additional context N/A