python commands
15 commands, each with a one-line explanation. Click a command to copy it, or its title for details.
Commands 15 shown
-
python3 -m venv .venv && source .venv/bin/activateCreate and activate an isolated Python environment
-
pip install -r requirements.txt --no-cache-dirInstall dependencies without using pip cache
-
pip freeze > requirements.txtSave exact versions of all installed packages
-
pip list --outdated --format=columnsList packages with newer versions available
-
python3 -m http.server 8080Serve current directory over HTTP on port 8080
-
python3 -m json.tool < input.jsonPretty-print a JSON file using stdlib
-
python3 -m cProfile -s cumulative script.py | head -30CPU profiling sorted by cumulative time
-
python3 -m pdb script.pyStart script under the Python debugger
-
breakpoint() # Python 3.7+ — drops into pdb at this lineBuilt-in breakpoint() is equivalent to import pdb; pdb.set_trace()
-
pytest -x -v --tb=short tests/Stop at first failure, verbose, short traceback
-
python3 -m py_compile script.py && echo OKCompile to bytecode only to catch syntax errors
-
black --check --diff . && black .Preview changes then apply Black formatting
-
ruff check . --fixFast linter + auto-fix (replaces flake8, isort, pyupgrade)
-
mypy --strict --ignore-missing-imports src/Strict static type checking for a package
-
python3 -c "import json; print([x for x in dir(json) if not x.startswith('_')])"List public attributes of any Python object
no commands match — try a different search