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. It is based on top of hatch-vcs.

🚀 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-timestamp-version>=0.0.5"]
build-backend = "hatchling.build"

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

[tool.hatch.version.raw-options]
local_scheme = "no-local-version"
timestamp_format = "short"  # or "long" for full datetime or any strftime string like "%Y%m%d%H%M"

🛠️ 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.7.tar.gz (71.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.7-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for hatch_timestamp_version-0.0.7.tar.gz
Algorithm Hash digest
SHA256 e0ed2c4eb5c1ce6991289d9d8fbb52eea9441f80f6609bb81b1a0b891a5d8955
MD5 46f31fad44ef4445f3359d760e0a289b
BLAKE2b-256 dd70d5b4ee60127165cf4beb8eb6d167d706ac1dc15bfa08f2e46c296a50c502

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for hatch_timestamp_version-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 06e9606e2cc696d44139f4f4a30cf3d9ef853321cea59af2aaa929e5549018f4
MD5 1365d3144e36138330dea694ed0117fe
BLAKE2b-256 1a4f1172784bca1a7d3fc238d11a745f7c50c8ca146cdbbb3e480c4d21947d27

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