Following convention, python packages with a CLI implement the CLI in a file called main.py which is located in the top level namespace of the package [1]. Optionally, you can then have setuptools or whatever packager create a console script entry point [2] which automatically creates a bash/batch script and puts it on the path during installation. You can see an example of this in jeweler [3].
Following convention, python packages with a CLI implement the CLI in a file called main.py which is located in the top level namespace of the package [1]. Optionally, you can then have setuptools or whatever packager create a console script entry point [2] which automatically creates a bash/batch script and puts it on the path during installation. You can see an example of this in jeweler [3].
[1] https://docs.python.org/3/library/__main__.html#main-py-in-python-packages [2] https://setuptools.pypa.io/en/latest/userguide/entry_point.html [3a] https://github.com/carterbox/jeweler/blob/6d9482c71046745744ab9762390191cb7d364307/setup.py#L16 [3b] https://github.com/carterbox/jeweler/blob/master/src/jeweler/__main__.py