encode / apistar

The Web API toolkit. 🛠
https://docs.apistar.com
BSD 3-Clause "New" or "Revised" License
5.57k stars 411 forks source link

Allow "python -m apistar.cli" #666

Open maerteijn opened 4 years ago

rpkilby commented 4 years ago

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()
maerteijn commented 4 years ago

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