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.5.tar.gz
(8.0 kB
view hashes)
Built Distribution
Close
Hashes for cargo_workspace-1.2.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa6777033b78faf8747cf9ba1f5cfea0d20205ec32f76518c47e63f83b99d471 |
|
MD5 | 6f7d8b2f6d037ade71cdfc8f5c39d116 |
|
BLAKE2b-256 | b6e24d4b0cf718620de50da5782c55e3d2202064d0d42374082114b56d015cee |