A pure-Julia implementation of the Package URL (PURL) specification (ECMA-427).
using Pkg
Pkg.add("PackageURLs")The package includes all 35 official PURL type definitions from purl-spec v1.0.0, bundled as a Julia artifact. Type definitions are automatically loaded when you first use the package.
using PackageURLs
# Parse a PURL string
purl = parse(PURL, "pkg:npm/lodash@4.17.21")
purl.type # "npm"
purl.name # "lodash"
purl.version # "4.17.21"
# Use the string macro
purl = purl"pkg:pypi/requests@2.28.0"
# Convert to string
string(purl) # "pkg:pypi/requests@2.28.0"See the documentation for PURL components, ecosystem examples, and API reference.
MIT License - see LICENSE for details.