hatch-timestamp-version
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-2.0.4.dev20250526231209-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
- Supports three options for timestamp format:
short-YYYYMMDDlong-YYYYMMDDHHMMSS(default)- Custom strftime formats like
%Y%m%d%H%M
$ hatch version
2.0.4.dev20250526231209
🧾 Changelog
See CHANGELOG.md
🙏 Credits
- Inspired by Simon Willison's work.
📄 License
MIT © Visesh Prasad
Metadata
Release files for hatch-timestamp-version 0.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hatch_timestamp_version-0.0.8.tar.gz | 72.8 kB | Without provenance | Details for hatch_timestamp_version-0.0.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hatch_timestamp_version-0.0.8-py3-none-any.whl | Python 3 | none | any | Details for hatch_timestamp_version-0.0.8-py3-none-any.whl |
Total release size: 78.9 kB
Release files / hatch_timestamp_version-0.0.8.tar.gz
| Download URL | hatch_timestamp_version-0.0.8.tar.gz |
|---|---|
| Size | 72.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
78df438a1310ed9f786e66a455a040fb2909d4d20ce30d1d42f12b0230790752
|
|
BLAKE2b-256 checksum How to use checksums |
b499c4b4540ad216ca2bb86aaa837d79f426eaf1dec82105884b834cd6bcec52
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.2
|
Release files / hatch_timestamp_version-0.0.8-py3-none-any.whl
| Download URL | hatch_timestamp_version-0.0.8-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c05f5d73be686eebe1da8ba691626123a1a81267a591cc92235b186a20ea1efa
|
|
BLAKE2b-256 checksum How to use checksums |
0418d211eab27d55efe2fda49c2686c456f828abc9dd82fbde0cfec928f4d566
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.2
|
Security for hatch-timestamp-version 0.0.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.