plugin that provides a custom version scheme using UTC timestamps for development versions.
Project description
hatch-timestamp-version
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-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
- Inspired by Simon Willison's work.
📄 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hatch_timestamp_version-0.0.4.tar.gz.
File metadata
- Download URL: hatch_timestamp_version-0.0.4.tar.gz
- Upload date:
- Size: 70.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e22220833ce3617fdc7515a817ed3402543ead8e8b678e283b2e28cf8699ca00
|
|
| MD5 |
5b40b6c139c2cddbf8568f6f28a0b7fa
|
|
| BLAKE2b-256 |
a10940a8f81c008e0baa6661fd03d0266bc7ab69d60cf90be39315cc0d7cd20a
|
File details
Details for the file hatch_timestamp_version-0.0.4-py3-none-any.whl.
File metadata
- Download URL: hatch_timestamp_version-0.0.4-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89da3da64c227170f683934651b08ffbc734b46ddcf8d85b7c197377016e4319
|
|
| MD5 |
09656a35cb13aa8e083403a653c504e9
|
|
| BLAKE2b-256 |
04d501618025f94fda9af1fd0f7ed0d53dec2206332ebeef2ebe0c0d2e040540
|