PyLicense is a CLI tool that queries license information from one of the following package repositories: PyPI, Anaconda or conda-forge.
Project description
PyLicense
PyLicense is a CLI tool that queries license information from one of the following package repositories: PyPI, Anaconda or conda-forge.
PyLicense uses the online information of those repositories, e.g. the license
information that is listed on pypi.org/pypi/<packagename>
, e.g. https://pypi.org/project/dcs-pylicense/.
While this means that the package must not be installed on the local system,
it also shows information about the lastest package version and not every
possible package version.
Installation
To install the package run
$ pip install dcs-pylicense
The tool registers itself as pylicense
.
To learn about the available arguments refer to its help:
$ pylicense --help
Usage
PyLicense requires a file in the format of a requirements file. The format is described here.
To query license information of the packages run
$ pylicense path/to/my/requirements.txt
| name | license | version |
|:-----------|:----------|:----------|
| black | MIT | 20.8b1 |
| pylint | GPL | 2.6.0 |
| pytest | MIT | 6.0.2 |
| pytest-cov | MIT | 2.10.1 |
| sphinx | BSD | 3.2.1 |
| twine | unknown | 3.2.1 |
It is also possible to read from stdin
$ cat /path/to/my/requirements.txt | pylicense
By default the result is returned as a markdown table. Other format options are available, e.g. output formatting as CSV.
$ pylicense --output-format csv path/to/my/requirements.txt
name|license|version
black|MIT|20.8b1
pylint|GPL|2.6.0
pytest|MIT|6.0.2
pytest-cov|MIT|2.10.1
sphinx|BSD|3.2.1
twine|unknown|3.2.1
By default the Python Package Index (PyPI) is queried.
This can be changed with the --repository
flag.
For example to query the anaconda package repository use the following command
$ pylicense --repository anaconda path/to/my/requirements.txt
| name | license | version |
|:-----------|:-------------|:----------|
| black | MIT | 19.10b0 |
| pylint | GPL-2 | 2.6.0 |
| pytest | MIT | 6.0.2 |
| pytest-cov | MIT | 2.10.1 |
| sphinx | BSD-2-Clause | 3.2.1 |
| twine | Apache 2 | 2.0.0 |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file dcs-pylicense-0.0.3.tar.gz
.
File metadata
- Download URL: dcs-pylicense-0.0.3.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3202fd997f01dac1450e5cebb32b81e2cce43c9d5fbbc97ae6c3485542ee4c8a |
|
MD5 | 56553412ff6b90df4e0f3e0c6999f0e9 |
|
BLAKE2b-256 | 2a9f33d52a2f06d146311f454e3e97ce233b6967b6a68f0be9d25b9d3b14b70b |
File details
Details for the file dcs_pylicense-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: dcs_pylicense-0.0.3-py3-none-any.whl
- Upload date:
- Size: 19.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36043a8080a4bd73fbec5f9531eb2566406e32e4a515a66fd41c7543f476329c |
|
MD5 | d06b7f0f19506292b7d1b749ef2093c0 |
|
BLAKE2b-256 | 1f070eb49d4850eef77704c53352faa1e5bb0cd61915a713936ca267e99d4b7e |