Automate releases and changelogs based on commit tags and shortlogs.

Documentation Status PyPI Release Changelog MIT Licensed

attribution provides a simple tool for automating a basic release workflow for Python projects. At its core, it generates Markdown-formatted changelogs based on the version tags in your repository, and can both fit into existing workflows, or automate the entire release preparation process with a single command.

When generating a changelog, attribution will find all tag names starting with “v” followed by a valid PEP 440 version identifier. It will then use the message from each tag, combined with the “shortlog”, to generate an ordered changelog that includes recognition for all contributers to your project. The output can be saved to your preferred changelog file, or piped to other tools as part of your release workflow:

$ attribution generate
project name


Another release

$ git shortlog -s v0.1...v0.2
    1 Ash
    3 Misty


First release

$ git shortlog -s ...v0.1
    1 Ash

If you prefer and end-to-end solution, attribution can also be used for creating release notes, updating a file with a matching version, and tagging a signed version bump commit containing the final changelog:

$ attribution tag -m "Final release" 1.0
$ head
project name


Final release

$ git shortlog -s v0.2...v1.0
    3 Ash
    2 Brock

attribution is a fully bootstrapped project. The Changelog is generated by attribution, and from version 1.2.0 onward, all releases are created with attribution as well.


attribution requires Python 3.7 or newer. You can install it from PyPI:

$ pip install attribution

attribution should guess reasonable defaults for most common Python projects, but for best results, you should initialize your project configuration:

$ attribution init
Project name [attribution]:
Package namespace [attribution]:
Use file [Y/n]:

This will automatically add the appropriate configuration to your project’s pyproject.toml:

name = "attribution"
package = "attribution"
version_file = true

More details can be found in the User Guide.


attribution is copyright Amethyst Reese, and licensed under the MIT license. I am providing code in this repository to you under an open source license. This is my personal repository; the license you receive to my code is from me and not from my employer. See the LICENSE file for details.