Skip to main content

Package for a better version management in python projects

Project description

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.

PyPI PyPI - Python Version PyPI - Wheel codecov main Lines of code GitHub

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

  • Python 3.6+
  • Git, if you'd need to receive a version string from git describe

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

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

version-helper-0.3.1.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

version_helper-0.3.1-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file version-helper-0.3.1.tar.gz.

File metadata

  • Download URL: version-helper-0.3.1.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.2 CPython/3.9.7 Linux/5.8.0-1041-azure

File hashes

Hashes for version-helper-0.3.1.tar.gz
Algorithm Hash digest
SHA256 3ef3415eb06e3868601007556ef655414e2d7ba4d41955345e891e7c3360c9c3
MD5 5712aa72809f187b518aaaf5fbff186a
BLAKE2b-256 170f3f136788c7584a6e881609e7c4f2897d67468c5521381f3a43071a821be3

See more details on using hashes here.

File details

Details for the file version_helper-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: version_helper-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.2 CPython/3.9.7 Linux/5.8.0-1041-azure

File hashes

Hashes for version_helper-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7e6e807281fa32871459043e9e704f1c5d5c495baa4cac6af1244765eafa4084
MD5 142a7c22c87d78ef2a944143f6958424
BLAKE2b-256 cae123aec85ef7a21945866895629db54b5e19a6722cc3960769ea9c4f1e4f99

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page