SCout - Standard Character Out
Lightweight python 3 library to print uniformly formatted console output tagged as
- debug
- info,
- weak warning
- warning,
- error or
- header.
There is the option to use custom tags and colours. If your console supports it coloured output will be used.
Since version 2 there is an extended logging functionality available which supports:
- Actions on warning in the event of warnings or errors
- Inverse verbosity options
The SCout Logger as well as Simple SCout can be used independently.
Installation
pip3 install git+https://github.com/holzkohlengrill/SCout.gitpip3 install pypiscout
Usage
Additionally example files are provided.
Simple SCout
Usie it similar to print():
from pypiscout import SCout as sc
sc.header("Welcome to SCout!")
sc.debug("Some debug message: 0xDEADBEEF")
sc.info("An info message")
sc.wwarning("Weak warnings are supported")
sc.warning("This is a warning")
sc.error("An error occured"))
Example output:
SCout Logger
Optionally you can provide some settings for verbosity, warnings and errors.
Inverse verbosity
Instead of providing more verbose output we use inverse verbosity levels (default = 0) which provides less output the higher the level.
| Level | Description |
|---|---|
| -1 | Print all (debug, info, weak warnings, warning & error) |
| 0 | Print info, weak warnings, warning & error |
| 1 | Print weak warnings, warning & error |
| 2 | Print warning & error |
| 3 | Print error |
| 4 | Do NOT print anything |
Usage
Basic usage
Implicit construction with default settings during the first call. In order to make it more readable call sc() upfront or use simple SCout if you don't need the Logger functionality.
from pypiscout.SCout_Logger import Logger as sc
sc().header("Simple SCout")
sc().debug("Some debug message:", "0xDEADBEEF")
Edit current settings
sc()(invVerbosity=0, actionWarning=None, actionError=lambda: sys.exit(-10))
sc().header("SCout Logger")
sc().debug("Some debug message: 0xDEADBEEF")
sc().info("An info message")
sc().wwarning("Weak warning (does not support actions)")
sc().warning("This is a warning without defined action")
sc().error("Here the error action is defined as sys.exit(-10)")
Example output:
Metadata
Release files for pypiscout 2.0.3
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 |
|---|---|---|---|---|
| pypiscout-2.0.3.tar.gz | 24.1 kB | Without provenance | Details for pypiscout-2.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pypiscout-2.0.3-py3-none-any.whl | Python 3 | none | any | Details for pypiscout-2.0.3-py3-none-any.whl |
Total release size: 32.4 kB
Release files / pypiscout-2.0.3.tar.gz
| Download URL | pypiscout-2.0.3.tar.gz |
|---|---|
| Size | 24.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a527a489cda6a0687e103e067bf88a5bfa08b4d2f5a6aa256b3632f195fffe8e
|
|
BLAKE2b-256 checksum How to use checksums |
2a1e0ad77fcbc5ee103832ee4ea8945843f16aea440873b1efd8303a78c13f7b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5
|
Release files / pypiscout-2.0.3-py3-none-any.whl
| Download URL | pypiscout-2.0.3-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
269b064d112b6a5042a5a5b5f212accbdbf4a77160baee2ff8aefec22f9d57e2
|
|
BLAKE2b-256 checksum How to use checksums |
55a9ad0e2b69c13f64b4994e4cf6ad9e620cc7fe5ad42bc14e87be81f09b31fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5
|
Security for pypiscout 2.0.3
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.