Skip to main content

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 RegistryClient

registry = RegistryClient.crates_io(user_agent = "crate_ingredients")
crate = registry.download("syn", "2.0.111")

report = crate.report()
print(report)

diff mode

Example using the Python API:

from crate_ingredients import RegistryClient

registry = RegistryClient.crates_io(user_agent = "crate_ingredients")

old = registry.download("syn", "2.0.110")
new = registry.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

Funding

This project is funded through NGI Zero Core, a fund established by NLnet with financial support from the European Commission's Next Generation Internet program. Learn more at the NLnet project page.

NLnet foundation logo NGI Zero Logo

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.3.0.tar.gz (58.8 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for crate_ingredients-0.3.0.tar.gz
Algorithm Hash digest
SHA256 584ed8e2798ec72510d6840b8d73290f14ed26bec1312b14c29a2d0d064453d1
MD5 ddcb7a7dd90d57a1bc588b55c2d14d3b
BLAKE2b-256 1637a0acc95eae0e18c5288334e1666a9ead0b9486b1d1f923241afccf13b563

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.3.0 This release

1 file

0.2.2

1 file

0.2.0

1 file

Supported by

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