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.1.1.tar.gz
(4.9 kB
view hashes)
Built Distribution
Close
Hashes for cargo_workspace-1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 003a550c7090708fa53a37450c219026024dd501781867389975f813a6f3ffde |
|
MD5 | 3d1b0d73ded170657058d310c799130d |
|
BLAKE2b-256 | faa0399b605008cecbd7739fb722af440308a2d8c7e4497bfc53da56221d68a1 |