Skip to main content

Small library to track and log the declaration of new (setup) variables

Project description

SetupVariableTracker

Very simple library to track and log the declaration of new (setup) variables.

Usage example

from SetupVariableTracker import SetupVariableTracker
vtrack = SetupVariableTracker(locals())

# Define parameters for this script
setup_variable_1 = "Hello"
setup_variable_2 = "World!"
foo = 1
bar = None

# Create a summary of all newly defined variables
summary_content = vtrack.save(locals(), sort=True)
print(summary_content)

This will print an overview of the declared variables (setup_variable_1, setup_variable_2, foo, and bar) as well as save them in a timestamped .log file.

I know there are more elegant ways to achieve this, but I found this an elegant way to add this functionality to legacy code with very little effort. Hope it'll be useful to others.

Installation

pip install SetupVariableTracker

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

setupvariabletracker-0.0.7.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

setupvariabletracker-0.0.7-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file setupvariabletracker-0.0.7.tar.gz.

File metadata

  • Download URL: setupvariabletracker-0.0.7.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for setupvariabletracker-0.0.7.tar.gz
Algorithm Hash digest
SHA256 68592bd12ee5f882b2dbe97c1ba8da3e5afa496c847199d012fc31d6df6fe418
MD5 b94b872418487f00ed555edd2962de69
BLAKE2b-256 9283cf5445a4ff290cc41016122be8cf46048c6bffd43031f630060feabeb17e

See more details on using hashes here.

Provenance

The following attestation bundles were made for setupvariabletracker-0.0.7.tar.gz:

Publisher: python-publish.yml on Aypac/SetupVariableTracker

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file setupvariabletracker-0.0.7-py3-none-any.whl.

File metadata

File hashes

Hashes for setupvariabletracker-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 7cffa79c6d6db5e9a78c53f928b2882b59f22740ca2e9dd734167ac914aa1270
MD5 d77386849938b9dffd8b7b283248a25a
BLAKE2b-256 b63353f73751ceee1ff5113d58319cedf703a14c8d17ffd1098bce28ed7bd7b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for setupvariabletracker-0.0.7-py3-none-any.whl:

Publisher: python-publish.yml on Aypac/SetupVariableTracker

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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