apistar icon indicating copy to clipboard operation
apistar copied to clipboard

Allow "python -m apistar.cli"

Open maerteijn opened this issue 6 years ago • 2 comments

maerteijn avatar Sep 19 '19 13:09 maerteijn

You can define a __main__.py module to enable invoking the package by name (e.g., python -m apistar).

# apistar/__main__.py
from .cli import cli

if __name__ = '__main__':
    cli()

rpkilby avatar Sep 20 '19 20:09 rpkilby

I know, but just adding this two lines means no new file and does the job.

maerteijn avatar Sep 20 '19 21:09 maerteijn