ShowMe – Quick and easy debugging for Python
ShowMe is a simple set of extremely useful function decorators for Python. It allows you to view trace information, execution time, cputime, and function documentation.
Installation
To use showme, simply:
pip install showme
or, if you must:
easy_install showme
Usage
Print passed-in arguments and function calls.
@showme.trace
def complex_function(a, b, c, **kwargs):
>>> complex_function('alpha', 'beta', False, debug=True)
calling haystack.submodule.complex_function() with
args: ({'a': 'alpha', 'b': 'beta', 'c': False},)
kwargs: {'debug': True}
Print function execution time.
@showme.cputime
def complex_function(a, b, c):
>>> complex_function()
3 function calls in 0.013 CPU seconds
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.013 0.013 0.013 0.013 test_time.py:6(test)
1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}
1 0.000 0.000 0.000 0.000 {range}
Pretty print function documentation.
@showme.docs
def complex_function():
"""Example Documentation for complex_function"""
pass
>>> complex_function()
Example Documentation for complex_function
History
1.0.0 (2010-09-05)
Featureset complete
Public release of showme to PyPi
Cleanup of project (removal of globals/locals)
0.0.5 (2010-09-05)
@showme.time support (simple but big feature)
Color output added (via vendorized Colorama)
0.0.4 (2010-09-04)
Epic @showme.trace decorator written
@showme.docs support
0.0.3 (2010-09-01)
General configuration in place
@showme.cputime support
Vendorization of decorator decorator
Metadata
Release files for showme 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| showme-1.0.0.tar.gz | 4.4 kB | Without provenance | Details for showme-1.0.0.tar.gz |
Release files / showme-1.0.0.tar.gz
| Download URL | showme-1.0.0.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4be451b7dce25d28a689e9bfb8d7e72fe8872704a8ec79ac39a8030256c5316d
|
|
BLAKE2b-256 checksum How to use checksums |
eac7bcfc6d0c9ee53fd8937c295ab6ab43f6ae1d24982851f6e08398eac6cc0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for showme 1.0.0
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.