entry point

A declared command name that, when your package is installed, becomes a real command which calls a chosen function.

In more detail

In pyproject.toml, [project.scripts] wordcount = "wordcount.cli:main" makes pip create a wordcount command that calls main in wordcount/cli.py, on every operating system. The command is placed in the environment's bin or Scripts folder, so it runs from any directory while that environment is on PATH.

Example

[project.scripts]
wordcount = "wordcount.cli:main"

Related terms

Taught in

References