You want to distribute an internal CLI to 200 engineers. What are your options?
IntermediateScenarioTesting, CI/CD, packaging & services
Answer
Situation read → Distribution plus updates.
What I'd do →
- Publish a wheel to an internal index (CodeArtifact, Artifactory); engineers install with
pipx install acme-opsoruv tool install acme-opsand upgrade the same way. - Also publish a Docker image for CI and for people who do not want Python locally.
- Version with semver and a changelog; add a "new version available" check if needed.
- Single-file options (
shiv,pex, PyInstaller) for environments without Python.
Why → pipx/uv keep each tool isolated and upgradable.
Interview tip → pipx is the expected answer for CLI distribution.
More on Testing, CI/CD, packaging & services
You join a team whose Python automation repo has no tests. Where do you start?BeginnerYour pytest suite takes 12 minutes. How do you speed it up?IntermediateA test passes locally but fails in CI only when run with the rest of the suite. What do you suspect?IntermediateYou want a reusable CI pipeline for 15 Python tool repos. What goes in it?IntermediateYour Python Docker image is 1.1 GB. How do you shrink it?IntermediateA Flask app runs with `app.run()` in production and falls over under load. What do you change?Beginner