Incremental

24.11.0 · active · verified Sun Apr 05

Incremental is a Python library that implements a CalVer (Calendar Versioning) manager for Python projects. It provides tools to define and manage project versions following a YY.MM.PATCH scheme, including release candidates, post-releases, and development releases. The library is currently at version 24.11.0 and follows a calendar-based release cadence.

Warnings

Install

Imports

Quickstart

Define your project's version using the `Version` class in a `_version.py` file. Optionally, expose it via your package's `__init__.py`. For modern Python (>=3.8), `importlib.metadata.version()` is the recommended way to retrieve an installed package's version dynamically. The `incremental update` CLI tool automates the `_version.py` file management.

# 1. In your project's `_version.py` file:
from incremental import Version

__version__ = Version("my_project", 24, 11, 0, release_candidate=0)

# 2. In your project's top-level `__init__.py` file:
# from ._version import __version__

# 3. Accessing the version (e.g., from setup.py or build system):
# import importlib.metadata
# project_version = importlib.metadata.version('my_project')

# Or, if __version__ is exposed via __init__.py:
# from my_project import __version__
# print(__version__.public()) # '24.11.0rc0'

view raw JSON →