Interview Prep/Python for DevOps/Environments, dependencies & packaging

What is a console script entry point?

BeginnerConceptEnvironments, dependencies & packaging
Answer

An entry in pyproject.toml that tells the installer to generate an executable wrapper on PATH:

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

After pip install ., cloudaudit --help works from anywhere, using the venv's interpreter. It is cleaner than python path/to/script.py and is what makes ENTRYPOINT ["cloudaudit"] possible in a Dockerfile.

All Python for DevOps questions Roadmap: Python for automation

More on Environments, dependencies & packaging