Skip to main content

Check ingredients of published Rust crates

Project description

crate-ingredients

This package contains Python bindings for the ingredients crate, which implements checks for the contents ("ingredients") of published Rust crates.

Both comparing contents of published crates to the state of the upstream project repository at a specific point in time ("report" mode) and comparing two different, published versions of the same crate with each other ("diff" mode) are implemented.

The Python API provided by crate-ingredients is intended to match the Rust API provided by the ingredients crate, wherever possible and reasonable.

report mode

Example using the Python API:

from crate_ingredients import Crate

crate = Crate.download("syn", "2.0.111")

report = crate.report()
print(report)

diff mode

Example using the Python API:

from crate_ingredients import Crate

old = Crate.download("syn", "2.0.110")
new = Crate.download("syn", "2.0.111")

diff = old.diff(new)
print(diff)

Installation

From PyPI: pip install crate-ingredients

External dependencies

Building:

  • cargo (refer to package.rust-version in Cargo.toml for the minimum supported Rust version)
  • openssl development headers must be available (for reqwest/native-tls)

Runtime:

  • cargo must be available in $PATH
  • git must be available in $PATH when calling Crate.report

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crate_ingredients-0.2.2.tar.gz (49.6 kB view details)

Uploaded Source

File details

Details for the file crate_ingredients-0.2.2.tar.gz.

File metadata

  • Download URL: crate_ingredients-0.2.2.tar.gz
  • Upload date:
  • Size: 49.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for crate_ingredients-0.2.2.tar.gz
Algorithm Hash digest
SHA256 3c86e5ae5a4f23692eeecec8e0aadbe1982bd05558f40d2e595146ed62164536
MD5 9178f880fdb5cbda69812733d2870efd
BLAKE2b-256 33029cc17a0f247b7208b4802cdd4b7320615895bb116bc865d5eca9a1c721e5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page