python 获取文件哈希
Python's (pip's) requirements.txt
file is the equivalent to package.json
in the JavaScript / Node.js world. This requirements.txt
file isn't as pretty as package.json
but it not only defines a version but goes a step further, providing a sha hash to compare against to ensure package integrity:
Python的(pip)的requirements.txt
文件与JavaScript / Node.js世界中的package.json
等效。 这个requirements.txt
文件不像package.json
那样漂亮,但它不仅定义了版本,而且更进一步,提供了可与之进行比较的sha哈希值,以确保包完整性:
Flask==0.12.1 \
--hash=sha256:6c3130c8927109a08225993e4e503de4ac4f2678678ae211b33b519c622a7242
Jinja2==2.9.6 \
--hash=sha256:2231bace0dfd8d2bf1e5d7e41239c06c9e0ded46e70cc1094a0aa64b0afeb054
MarkupSafe==1.0 \
--hash=sha256:a6be69091dac236ea9