Skip to main content

Python License Update (PyLicUp). Updates all the python headers of your project with the provided license text.

Project description

Python 3.10 Code style: black

PythonLicenseUpdater

Simple tool that updates your python files license headers for the given directories. By default it will skip init.py.

How to use it?

Installation.

  1. With pip:
pip install pylicup
  1. With latest version from GitHub:
pip install git+https://github.com/Carsopre/PythonLicenseUpdater.git 
  1. With custom version from GitHub:
pip install git+https://github.com/Deltares/PythonLicenseUpdater.git@v0.0.1

Usage

The following command should be used.

python pylicup -l <path_to_your_license_file> -d <path_to_directory_with_python_files>
  • <path_to_your_licenses_file> List of licenses, the first one will replace the ones that follow (in case present) or simply added at the top.
  • <path_to_directory_with_python_files> List of arguments representing paths to the directories containing python files.

Examples

Given the following directory hierarchy:

license_manager.py
|-src\
    |-__init__.py
    |-main.py
    |-utils.py
|-test\
    |-__init__.py
    |-test_main.py
    |-test_utils.py
|-setup.py
|-my_license.txt
|-my_newer_license.txt
  1. The following command will update the license for src\main.py and src\utils.py:
python license_manager.py -l my_license.txt -d src
  1. Whereas executing the following command will result in updating the license header for src\main.py, src\utils.py, test\test_main.py and test\test_utils.py:
python license_manager.py -l my_license.txt -d src test
  1. Last, if we want to replace an existing license header with a new one, we would do the following command:
python license_manager.py -l my_license.txt my_newer_license.txt -d src

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

pylicup-0.1.2.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

pylicup-0.1.2-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

Details for the file pylicup-0.1.2.tar.gz.

File metadata

  • Download URL: pylicup-0.1.2.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.1 CPython/3.10.10 Windows/10

File hashes

Hashes for pylicup-0.1.2.tar.gz
Algorithm Hash digest
SHA256 fbcf4d0dc9aa78bb106d68706fa59ac9e6f69f281c0b4fa2892d4991538d72bd
MD5 cfc38eb80c4b8a265188c444a6d83c08
BLAKE2b-256 8dc75e9cf89fd7d747f048fdec35b9de65210cfcc65be8a961ef860a8b05ea11

See more details on using hashes here.

File details

Details for the file pylicup-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pylicup-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 16.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.1 CPython/3.10.10 Windows/10

File hashes

Hashes for pylicup-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 75c45d73e294aedf21dce418de6bfc8e4416279a550e722e47ae9a42b616cc84
MD5 f6775d469fd895796aebc23699bb4b5f
BLAKE2b-256 ce2b9465dde01316dcef5077e5ae0c2db4b492df1479872d99bba017a89cf3ee

See more details on using hashes here.

Supported by

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