Version helper
version-helper is a package for a better version management in python projects.
This package is still under development. Code may change frequently.
from version_helper import Version
v = Version.get_from_git_describe()
print(v.core) # major.minor.patch
print(v.full) # major.minor.patch[-prerelease][+build]
Table of contents
Requirements
Installing version-helper
pip install version-helper
Usage
Reading version from a file
import pathlib
from version_helper import Version
version = Version.read_from_file(
file=pathlib.Path('/path/to/my/version_file.txt'),
variable_name='APP_VERSION',
separator='=',
)
print(version)
Writing version to a file
import pathlib
from version_helper import Version
version = Version(1, 2, 3)
version.write_to_file(
file=pathlib.Path('/path/to/my/version_file.txt'),
variable_name='APP_VERSION',
separator='=',
)
Changelog
All notable changes to this project will be documented in the CHANGELOG.md.
References
Metadata
Release files for version-helper 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| version-helper-0.3.1.tar.gz | 7.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| version_helper-0.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.4 kB
Release files / version-helper-0.3.1.tar.gz
| Download URL | version-helper-0.3.1.tar.gz |
|---|---|
| Size | 7.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ef3415eb06e3868601007556ef655414e2d7ba4d41955345e891e7c3360c9c3
|
|
BLAKE2b-256 checksum How to use checksums |
170f3f136788c7584a6e881609e7c4f2897d67468c5521381f3a43071a821be3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.2 CPython/3.9.7 Linux/5.8.0-1041-azure
|
Release files / version_helper-0.3.1-py3-none-any.whl
| Download URL | version_helper-0.3.1-py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7e6e807281fa32871459043e9e704f1c5d5c495baa4cac6af1244765eafa4084
|
|
BLAKE2b-256 checksum How to use checksums |
cae123aec85ef7a21945866895629db54b5e19a6722cc3960769ea9c4f1e4f99
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.2 CPython/3.9.7 Linux/5.8.0-1041-azure
|