Skip to main content

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.8.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cargo_workspace-1.2.8-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file cargo_workspace-1.2.8.tar.gz.

File metadata

  • Download URL: cargo_workspace-1.2.8.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for cargo_workspace-1.2.8.tar.gz
Algorithm Hash digest
SHA256 8b631feb168460f6918a7ffb2184162e7436a760c820a43f1ed062b9d39fa2e4
MD5 ca8fc7b5797d009738cf7e258ced62bc
BLAKE2b-256 35acb1edf35cda18025eb3404f454a613038cb501aa240404dc5beea6e65dd76

See more details on using hashes here.

File details

Details for the file cargo_workspace-1.2.8-py3-none-any.whl.

File metadata

File hashes

Hashes for cargo_workspace-1.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 9a7235405752333734fedc1d15426a9c6e44df26d083c5b63e5232e1ade5cab3
MD5 a23250a509c510f10900633f9934f762
BLAKE2b-256 0d3ef368dff61c996e82b51be20a42271f63b507427fa743275fd8a48e65754a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page