Changelog Tools
This project provides tools to manage changelog files, according to the Keep a Changelog format. It can be used with a command line interface and as a lib for your projects.
- :material-license: FreeBSD License
- :fontawesome-brands-python: Python >= 3.10 is required
- :fontawesome-solid-link: https://pypi.org/
- :fontawesome-solid-at: Author : Sigilence Technologies
CLI
Usage
python3 -m changelog_tools <command> [options]
python3 -m changelog_tools --help # Display usage information and a list of the provided commands.
Available commands
get
Check and display the latest version of a changelog file, which is by default the CHANGELOG.md file in the current directory.
python3 -m changelog_tools get
<CHANGELOG_PATH> (optional)
Specifies a changelog path. If given path is a directory, the tool defaults a CHANGELOG.md file in that directory.
python3 -m changelog_tools get data/CHANGELOG.md
summarize
To get a list of changes between two versions, run the script:
python3 -m changelog_tools summarize --old <old_version> --new <new_version> <changelog_path>
--old (optional) Specifies a version from which to start looking for changes. This version corresponds to the lowest/oldest of the file. If not provided, the tool defaults to the initial version. If provided version does not exist in the file, it'll raise an error.
--new (optional) Specifies a version to end looking for changes. This version corresponds to the highest/latest version of the file. If not provided, the tool defaults to the latest version. If provided version does not exist in the file, it'll raise an error.
--include_unreleased (optional) Set by default to False. It is used to include unreleased items to the output, if needed.
<CHANGELOG_PATH> (optional)
Specifies a changelog path. If given path is a directory, the tool defaults a CHANGELOG.md file in that directory.
Example of what you'll get
Summary with different sections sorted by alphabetical order.
# Changelog summary
Here are all the changes between 0.0.1 and 0.0.3:
### Added
- v1.1 Brazilian Portuguese translation.
- v1.1 German Translation.
- v1.1 Spanish translation.
### Changed
- Use frontmatter title & description in each language version template.
- Replace broken OpenGraph image with an appropriately-sized Keep a Changelog image that will render properly (although in English for all languages).
As a lib
Usage
- Get the package from PyPI and add it to your virtual environment
python3 -m venv venv
pip install changelog-tools
- In your python file, import the package as following:
import changelog_tools
Most common use cases
- Get the latest version of a changelog file
latest_version = changelog_tools.get_latest_version(<CHANGELOG_PATH>)
- Get a summary of all entries of a changelog file
summaries = changelog_tools.get_summary(<CHANGELOG_PATH>)
# Display dict with changes sections sorted by alphabetic order
for summary in sorted(summaries.keys()):
print(f"\n{summary}\n")
for change in summaries[summary]:
print(change)
Metadata
Release files for changelog-tools 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| changelog_tools-0.4.0.tar.gz | 11.1 kB | Without provenance | Details for changelog_tools-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| changelog_tools-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for changelog_tools-0.4.0-py3-none-any.whl |
Total release size: 20.2 kB
Release files / changelog_tools-0.4.0.tar.gz
| Download URL | changelog_tools-0.4.0.tar.gz |
|---|---|
| Size | 11.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8af66fe88a506cb67d925161f75d78025bb233045301478eaaa3508ad1bfe7b0
|
|
BLAKE2b-256 checksum How to use checksums |
22b7c3af99192cce3ca3102192d1e9f4fbb784d96455fe39073b93590b110211
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.11.2
|
Release files / changelog_tools-0.4.0-py3-none-any.whl
| Download URL | changelog_tools-0.4.0-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aa65fbb82ed28df4c5badf2b4f0c8e12b6359c7f0a8da09b84985ca6b8e78294
|
|
BLAKE2b-256 checksum How to use checksums |
9c283cadb249d93e8c1ec02b67131b8cbd6911bf1e5b1a8f9802c8ea2f1bb184
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.11.2
|
Security for changelog-tools 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.