Parse a cargo workspace and analyze its packages
Project description
Cargo Workspace
Parse Rust Workspace files from a Cargo.toml
file.
Example
from cargo_workspace import Workspace
# Path can be a file or directory:
workspace = Workspace.from_path('Cargo.toml')
for crate in workspace.crates:
print(f'crate at {crate.path} has name {crate.name}')
Note that this crate uses getter functions instead of the conventional
Metadata
The metadata of each crate is accessible like so:
meta = crate.workspace.get('some.custom.key')
if meta not None:
print(f'custom metadata found: {meta}')
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
cargo_workspace-1.2.1.tar.gz
(5.0 kB
view hashes)
Built Distribution
Close
Hashes for cargo_workspace-1.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f805b0ba9702c3c8296364b2f7f5351975c52ac228983d33c1c74708be25acbe |
|
MD5 | 8506db71e9a7b911c346c7c8e90d54ea |
|
BLAKE2b-256 | 9d971a3d3988645bf7288643030812e6f2e028602abc40b263e9fe43f7609e4a |