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 = "timestamp-dev"
scheme = "timestamp-dev"
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.6.tar.gz (71.7 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.6-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for hatch_timestamp_version-0.0.6.tar.gz
Algorithm Hash digest
SHA256 510531a2d3f0140c3e9771b93b03da95dce15cc5dcc842bdd9ea7e8571ec6315
MD5 1c9715dcd213d2c019bce4c741f4e805
BLAKE2b-256 5d308835b619df26a7c26b51bb254177e260fcc272e3fc245da9cf1538834ecf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for hatch_timestamp_version-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 365851431d5c26e5c22f1a53ef89936f51f8c2dd5243a44a233e909494027150
MD5 aa4de2d882ec6f16ec70aa901c7c4eb1
BLAKE2b-256 a7a2917a43ef6eaa2f4f150e704e1d610b531349b0a958f26379682f65cb55f7

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