Skip to main content

A python module to print the verbose version of your code

Project description

PyLongVer

PyLongVer is a utility to print a long version message about your python code.

This prints the version of the package in a long format with extra verbose details about the Python interpreter, system, OpenSSL, and all imported modules whose version information is available.

This package provides a simple interface for printing the version information by adding an argument to the argparse parser. The package also provides a function to print the version information directly.

Sample output

>>> from pylongver import print_version_info
>>> print_version_info("My Package 1.0.0")
My Package 1.0.0
Python Version: 3.12.6 (main, Sep  8 2024, 13:18:56) [GCC 14.2.1 20240805]
System: Linux
Platform: Linux-6.10.10-arch1-1-x86_64-with-glibc2.40
Architecture: ('64bit', 'ELF')
OpenSSL Version: OpenSSL 3.3.2 3 Sep 2024

Imported Modules:
argparse: 1.1
csv: 1.0
platform: 1.0.8
pylongver: 0.1.0
re: 2.2.1
zlib: 1.0

Usage

Using the ArgumentParser

import argparse
from pylongver import LongVersion

parser = argparse.ArgumentParser()
parser.add_argument("--version", action=LongVersion, version="My Package 1.0.0")
args = parser.parse_args()

Using the print_version_info function

from pylongver import print_version_info

print_version_info()

About

Authors

Kyle Ketchell, creator and maintainer

License

MIT

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

pylongver-0.2.5.tar.gz (4.3 kB view hashes)

Uploaded Source

Built Distribution

pylongver-0.2.5-py3-none-any.whl (5.5 kB view hashes)

Uploaded Python 3

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