pyinfra-dev / pyinfra

pyinfra turns Python code into shell commands and runs them on your servers. Execute ad-hoc commands and write declarative operations. Target SSH servers, local machine and Docker containers. Fast and scales from one server to thousands.
https://pyinfra.com
MIT License
3.92k stars 382 forks source link

Add support for sha348 #1245

Open Firesphere opened 4 hours ago

Firesphere commented 4 hours ago

Is your feature request related to a problem? Please describe

Composer provides a sha348 of the build, but I can't validate it directly in pyinfra, because it doesn't have a sha348 method.

Describe the solution you'd like

Add a sha348 validation for files.download(). Optionally, probably cleaner, a way to give a specific hashing algorithm, e.g. files.download('https://example.com/download.file', hash=abcxyz123, algorithm=sha512), or similar