hashin is a command-line tool that automates the process of adding hashes (e.g., SHA256) to entries in a `requirements.txt` file, improving supply chain security by ensuring integrity. It is currently at version 1.0.5 and maintains an active release cadence, with recent updates focusing on Python version compatibility and internal dependency management.
pip install hashinNo compatibility data collected yet for this library.
This quickstart demonstrates how to use `hashin` from the command line. It creates a temporary `requirements.txt` file, runs `hashin` to add hashes, and then prints the updated content. `hashin` modifies the file in-place.
Upgrade your Python environment to 3.9 or higher. If you must use an older Python version, pin `hashin<1.0.1` at your own risk, as it may have other compatibility issues or unpatched bugs.
Always commit your `requirements.txt` file before running `hashin`, or ensure you have backups. You can also review the changes with `git diff` after running `hashin`.
Ensure your `requirements.txt` entries are correctly formatted (e.g., `package==version`) and that the specified versions are available on PyPI or your configured package index. Use `pip install -r requirements.txt --dry-run` to test resolvability without installing.
Ensure `hashin` is installed by running `pip install hashin`. If it is installed, verify your system's PATH configuration or try running it via `python -m hashin`.
Switch to a Python 3.9+ environment (e.g., using `pyenv` or `conda`), or upgrade your default Python interpreter. For example, `python3.9 -m pip install hashin`.
Either create a `requirements.txt` file in your current directory, or specify the path to your requirements file using the `-r` option: `hashin -r path/to/my_requirements.txt`.