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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file pylongver-0.2.5.tar.gz.

File metadata

  • Download URL: pylongver-0.2.5.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for pylongver-0.2.5.tar.gz
Algorithm Hash digest
SHA256 bbc6d673bcc8a5b11a584ee2499fb214b16a98056c7c633d478c85b2be681f57
MD5 4c389059829051b175eeefab9f1bc7bc
BLAKE2b-256 cee4748a2d181fa0bd8c8f4c33186d8d81122fd1a504f42748624c5343f53d1e

See more details on using hashes here.

File details

Details for the file pylongver-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: pylongver-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for pylongver-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c918c193a3031618186862a1de93afbaf670ca2554544d4551e262450695587f
MD5 239ace779eae7ce5bcd39a1767b7a682
BLAKE2b-256 790347b90ca6ee10ca7af84b8237653f1af1df7e4009db5bcdde4d45838a3199

See more details on using hashes here.

Supported by

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