Skip to main content

plugin that provides a custom version scheme using UTC timestamps for development versions.

Project description

hatch-timestamp-version

PyPI version Python versions CI Coverage License: MIT Code Style: Black Lint: Ruff Typing: mypy

A hatch plugin that provides a custom version scheme using UTC timestamps for development versions.

🚀 Why this project exists

I have CI continuously deploy to 'Test PyPI' and I want packages to have the datetime as dev versions.

Eg: reelname-1.0.1.dev20250503202530-py3-none-any.whl

📐 Requirements

  • Python >= 3.9

📦 Installation

pip install hatch-timestamp-version

🧪 Usage

In your pyproject.toml:

[build-system]
requires = ["hatchling", "hatch-vcs", "hatch-timestamp-version"]
build-backend = "hatchling.build"

[tool.hatch.version]
source = "vcs"
scheme = "timestamp-dev"
validate-bump = true
path = "your_pkg/_version.py"

[tool.hatch.version.raw-options]
local_scheme = "no-local-version"
version_scheme = "guess-next-dev"

🛠️ Features

  • Uses datetime for the dev versions, when used with hatch-vcs
$ hatch version
# => reelname-1.0.3.dev20250524011230

🧾 Changelog

See CHANGELOG.md

🙏 Credits

📄 License

MIT © Visesh Prasad

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

hatch_timestamp_version-0.0.3.tar.gz (70.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hatch_timestamp_version-0.0.3-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file hatch_timestamp_version-0.0.3.tar.gz.

File metadata

File hashes

Hashes for hatch_timestamp_version-0.0.3.tar.gz
Algorithm Hash digest
SHA256 be44f1ab86f22fc9f73516476f66c9a42ac96fbb5c82801e8f871dcc5d9dda07
MD5 46071aa68837b63e9331f21cf3b2e52f
BLAKE2b-256 7cc3914512715acd1e7ff3009fa69ccf1dd56ee64e11c3c6af6c1b9aa26d747b

See more details on using hashes here.

File details

Details for the file hatch_timestamp_version-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for hatch_timestamp_version-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9af4053205decb9ef8187e663e02dd1f869b0d2be8ee10c8ee663fc618af6cf8
MD5 80a58a9485e4c6442b5ac7b2722df44a
BLAKE2b-256 fd1eecd7f4ab5f1629f886fc91a4483c34ee453c159d4203e3c8dbd53425e486

See more details on using hashes here.

Supported by

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