Skip to main content

A small library that supports with various tasks around Package URLs

Project description

purl-tools - Helpful PackageURL functions

OpenRail Administrative Project Test suites REUSE status The latest version of Compliance Assistant can be found on PyPI. Information on what versions of Python Compliance Assistant supports can be found on PyPI.

This library serves as a helper for various tasks around Package URL (purl).

Features

  • Convert a PURL to ClearlyDefined coordinates
  • Find certain metadata about a PURL for some types, e.g. latest available version and source code URL
  • Convert a PURL to a URL (using packageurl-python)
  • Convert a URL to a PURL (using packageurl-python)

Requirements

  • Python 3.10+
  • Internet connection for accessing the GitHub API, if a human-readable tag is requested

Installation

Install and run via pipx (Recommended)

pipx makes installing and running Python programs easier and avoids conflicts with other packages. Install it with

pip3 install pipx

The following one-liner both installs and runs this program from PyPI:

pipx run purl-tools

If you want to be able to use purl-tools without prepending it with pipx run every time, install it globally like so:

pipx install purl-tools

purl-tools will then be available in ~/.local/bin, which must be added to your $PATH.

After this, make sure that ~/.local/bin is in your $PATH. On Windows, the required path for your environment may look like %USERPROFILE%\AppData\Roaming\Python\Python310\Scripts, depending on the Python version you have installed.

To upgrade purl-tools to the newest available version, run this command:

pipx upgrade purl-tools

Other installation methods

You may also use pure pip or poetry to install this package.

CLI Usage

purl-tools provides multiple commands to facilitate different tasks. Each command is invoked through the purl-tools command-line interface with specific options.

Depending on your exact installation method, this may be one of

# Run via pipx
pipx run purl-tools
# Installation via pipx or pip
purl-tools
# Run via poetry
poetry run purl-tools

In the following, we will just use purl-tools.

Command Structure

purl-tools <command> [subcommand-options]

Commands

Please run purl-tools --help to get an overview of the commands and global options.

For each command, you can get detailed options, e.g., purl-tools purl2cd --help.

Development and Contribution

We welcome contributions to improve this library. Please read CONTRIBUTING.md for all information.

License

The content of this repository is licensed under the Apache 2.0 license.

There may be components under different, but compatible licenses or from different copyright holders. The project is REUSE compliant which makes these portions transparent. You will find all used licenses in the LICENSES directory.

The project has been started by the OpenRail Association. You are welcome to contribute!

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

purl_tools-0.2.1.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

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

purl_tools-0.2.1-py3-none-any.whl (25.3 kB view details)

Uploaded Python 3

File details

Details for the file purl_tools-0.2.1.tar.gz.

File metadata

  • Download URL: purl_tools-0.2.1.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.13.1 Linux/6.11.0-1012-azure

File hashes

Hashes for purl_tools-0.2.1.tar.gz
Algorithm Hash digest
SHA256 989ad0828765c0e1edca67f862f18a361019e97c8dbc3f5bc81f675cedb6ebeb
MD5 3d4f174f9320fcea9f2473aea7ef217c
BLAKE2b-256 8abf5d1d2dab9e9598497eee2feb0e89b2ce14ea597465ac4e29859d286d4737

See more details on using hashes here.

File details

Details for the file purl_tools-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: purl_tools-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 25.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.13.1 Linux/6.11.0-1012-azure

File hashes

Hashes for purl_tools-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cd4c817c262df5456e4fbeed9e225652cf2e4ad8f06b5b1b87484feea5ed17d2
MD5 9ff9e997be0785738a692249746ce4fb
BLAKE2b-256 c1ad2d1fa53bb0afe8f2578e37233db3ff341b9405725a82e7b1f27352c8e87b

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