Skip to main content

Authbox Setup Version

Overview

Setup file of library has version parameter. This library help you to generate version and increment version for next release.

How to use?

Just type:

> pip install authbox-setup-version

Example code:

> from authbox-setup-version import get_version, increment_version

> get_version('path/to/_version.py')
> 1.0.31

> increment_version('path/to/_version.py')
> # from 1.0.31 become 1.0.32
> increment_version('path/to/_version.py', major=1)
> # from 1.0.31 become 2.0.31
> increment_version('path/to/_version.py', minor=1)
> # from 1.0.31 become 1.1.31

file '_version.py' has been generate using other library, name 'incremental'

> pip install incremental

generate file '_version.py'

> python -m incremental.update <package_name> --create

Management Commands:

'''

for get current version

python manage.py getversion —rel_path <path/to/file/_version.py> python manage.py getversion —rel_path menu/_version.py 1.0.3

for increment version

python manage.py nextversion —rel_path <path/to/file/_version.py> —package_name <package_name> python manage.py nextversion —rel_path menu/_version.py —package_name menu 1.0.4

'''

Example setup.py:

from setuptools import setup, find_packages
from authbox_setup_version import get_version, increment_version

setup(
    name='package-name',
    version=get_version('/path/to/_version.py'),
    description='short desctiption',
    
    author='Iwan Setiawan',        
    author_email="suratiwan03@gmail.com",
    packages=find_packages(exclude=['tests', 'tests.*']),
            
    classifiers=[
        'License :: OSI Approved :: BSD License',
        'Intended Audience :: Developers',
        'Programming Language :: Python',
        'Programming Language :: Python :: 3',
    ],            
)

Testing:

Activate your virtual environment using 'venv' or 'pyenv' or up your choice. And type this code in command prompt:

> git pull git@github.com:PROJECT-AUTHBOX/authbox-setup-version.git
> cd authbox-setup-version
> pytest

> result:
=========================== test session starts =======================
platform linux -- Python 3.8.18, pytest-8.0.2, pluggy-1.4.0
rootdir: /path/to/library/authbox_setup_version
collected 2 items                                                                                                                                    

tests/test_init.py ..                                            [100%]

============================= 2 passed in 0.37s =======================

Metadata

Release files for authbox-setup-version 1.0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for authbox-setup-version 1.0.9
File Size Uploaded Provenance Actions
authbox-setup-version-1.0.9.tar.gz 7.3 kB Without provenance Details for authbox-setup-version-1.0.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for authbox-setup-version 1.0.9
File Interpreter ABI Platform Actions
authbox_setup_version-1.0.9-py3-none-any.whl Python 3 none any Details for authbox_setup_version-1.0.9-py3-none-any.whl

Total release size: 15.7 kB

Release files / authbox-setup-version-1.0.9.tar.gz

Download URL authbox-setup-version-1.0.9.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
1e26310bd284992d06cdcd376b5817d88d5724ae157513b3d68aae35fdc39fd1
BLAKE2b-256 checksum
How to use checksums
871e61d7effa398c2a52e2f0998497995b673f5c77df126bdae7bcdee054cf1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.2

Release files / authbox_setup_version-1.0.9-py3-none-any.whl

Download URL authbox_setup_version-1.0.9-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e39dfcc74537ccff68322481ba9ac5d83a0497db2e1113ea1802aec17ff72973
BLAKE2b-256 checksum
How to use checksums
e4d366937bbce17ca8f0ad55d9acf8ef95f195227b63dce4250619e36959fafc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.2

Security for authbox-setup-version 1.0.9

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page