use-pip 0.0.1

pip command and requirement metadata primitives for RustUse
Documentation
  • Coverage
  • 61.9%
    26 out of 42 items documented1 out of 28 items with examples
  • Size
  • Source code size: 13.63 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 960.2 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 6s Average build duration of successful builds.
  • all releases: 6s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-python
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-pip

pip command and install metadata primitives for RustUse.

Experimental

use-pip is experimental while use-python remains below 0.3.0.

Example

use use_pip::{PipCommand, PipRequirement, is_requirements_file};

let command: PipCommand = "install".parse()?;
let requirement = PipRequirement::new("requests>=2")?;

assert_eq!(command.to_string(), "install");
assert_eq!(requirement.as_str(), "requests>=2");
assert!(is_requirements_file("-r requirements.txt"));
# Ok::<(), use_pip::PipTextError>(())

Scope

  • Common pip command labels.
  • Requirement, package spec, index URL, editable install, and requirement-file metadata.
  • Lightweight non-empty validation.

Non-goals

  • Shelling out to pip.
  • Contacting PyPI or package indexes.
  • Installing packages or resolving dependencies.
  • Fully parsing requirement specifiers.

License

Licensed under either Apache-2.0 or MIT.