Skip to content
This repository has been archived by the owner on Feb 25, 2022. It is now read-only.

Allow "python -m apistar.cli" #666

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

maerteijn
Copy link

No description provided.

@maerteijn maerteijn changed the title Allow "python -m apistar" Allow "python -m apistar.cli" Sep 20, 2019
@rpkilby
Copy link
Member

rpkilby commented Sep 20, 2019

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
Copy link
Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants