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'Dependencies of {crate.name}:')
for dep in crate.dependencies:
print(f' - {dep.name}')
Metadata
The metadata of each crate is accessible as well:
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.6.tar.gz
(8.4 kB
view details)
Built Distribution
File details
Details for the file cargo_workspace-1.2.6.tar.gz
.
File metadata
- Download URL: cargo_workspace-1.2.6.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 423a6be78578e82899ac47569d73267c35282289663018fa110075fda632ff3a |
|
MD5 | 7b806de35c8fb63f405fd7ce3b487998 |
|
BLAKE2b-256 | f6640824668d23327bdde60d781c0bc55626632f90e5de0a01989be19da78e50 |
File details
Details for the file cargo_workspace-1.2.6-py3-none-any.whl
.
File metadata
- Download URL: cargo_workspace-1.2.6-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1786512f8f36f334cfe1efbc09c640ab48d8536fca986e35486e2e874aefec61 |
|
MD5 | 2469fc7f693e4cdbd2b9ed6cbf2d451d |
|
BLAKE2b-256 | e99c8e460018fc5ad627a837ba0613059fbc97791a6cbb9b84da3aea280a9f84 |