Registry / devops / keepachangelog

keepachangelog

JSON →
library2.0.0pypypi✓ verified 80d ago

A Python library to parse and maintain changelog files in the Keep a Changelog format. Current version 2.0.0, supports Python >=3.9. Release cadence is irregular.

pip install keepachangelog
INSTALL
IMPORT
SIG · KEEPACHANGELOG
K
keepachangelog
devopspythonv2.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

from_dict
from keepachangelog import from_dict
from keepachangelog import Changelog
release
from keepachangelog import release
to_dict
from keepachangelog import to_dict

Parse a changelog file and access version entries.

from keepachangelog import Changelog changelog = Changelog('CHANGELOG.md') print(changelog.versions) print(changelog['1.0.0'].description)
Debug
Known issues
breakingIn v2.0.0, the library was rewritten and the API changed. The old `keepachangelog.parse()` and `keepachangelog.to_dict()` no longer exist. Use the `Changelog` class instead.
fix
Migrate from functional API to class-based: `from keepachangelog import Changelog; c = Changelog(path); c.versions`.
affects: >=1.0.0, <2.0.0
breakingThe `Changelog` class constructor no longer accepts file-like objects; only file paths (str or Path) are supported.
fix
Pass a file path string or `pathlib.Path` instead of an open file handle.
affects: >=2.0.0
gotchaThe `Changelog` object is only iterable over version strings, not over version objects. Iterating yields version names (e.g., '1.0.0'), not `Version` instances.
fix
Use `changelog.versions` to get a list of version objects.
affects: >=2.0.0
Upgrade
Version history
2.0.0latest on PyPI · released Jun 14, 2024
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
11
Resources

No resource links recorded.

keepachangelog — pip install keepachangelog · libregistry