Skip to main content

Var_processor is a Python library that can automatically handle common variable operations in projects.

Project description

Var_processor

Var_processor is a Python library that can automatically handle common variable operations in projects.

Now it supports automatic saving of specified variables when project exceptions or errors occur.

The project is currently under development, so let's look forward to more wonderful things together.

Features

  • Automatically saves specified local variables to a file.
  • Support all types of variables.
  • Support variables with the same name in different functions.

Installation

Install using pip:

pip install var_processor --index-url https://pypi.org/simple  

Usage

from var_processor.functional import save_on_error

@save_on_error(vars=["a", "b", "c"])
def main():
    a = 10
    b = 20.0
    c = {}

    # Raise ZeroDivisionError
    # Variables `a`, `b`, `c` will be automatically saved.
    d = a / 0

if __name__ == "__main__":
    main()
from var_processor.functional import pdb_on_error

@pdb_on_error
def main():
    a = "s"
    b = 1

    def a():
        a = "gg"
        tt = 1 / 0

    a()
    b = 1 / 0
    print("ss")


if __name__ == "__main__":
    main()

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

var_processor-0.0.2.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

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

var_processor-0.0.2-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file var_processor-0.0.2.tar.gz.

File metadata

  • Download URL: var_processor-0.0.2.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.14

File hashes

Hashes for var_processor-0.0.2.tar.gz
Algorithm Hash digest
SHA256 faa551735f4c20503ad6e09c16e05160561a2001e3ea87902ebb1e87c260d2e6
MD5 42cd3eb31f6dbe3876a8da16577374e1
BLAKE2b-256 f9e538d71a2e8ed1853828cd55fac87d9047d02d8742873070cca917f2b278ec

See more details on using hashes here.

File details

Details for the file var_processor-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: var_processor-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.14

File hashes

Hashes for var_processor-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0548ae2daa367aba5fccb572b34dd472fe950b60b561512dbfe657dab9d791fa
MD5 5b6ebd98ba27f658282be5d3a2735cbd
BLAKE2b-256 5cd686e035d077c8cf639204c52317e8897b020ee93e606f4487a1411f527d1d

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