Skip to main content

Library of Eclectic Experiments by Tenchi

Project description

LEET

Library of Eclectic Experiments by Tenchi

Random modules that I made and use in several project and are too small to get their own package. A util library of sorts.


Contents

Logging

Module that provides a fancy-looking theme for Python loggers.

(TODO: Screenshot)

To enable, import leet.logging from anywhere (maybe the main __init__.py of your project). You will then have a global logger log function that you can use from anywhere:

log.info("Hello")
log.warn("World")

Progress bars

Also provides a progress bar (from WoLpH/python-progressbar) that fits in the theme:

from time import sleep
from leet.logging import ProgressBar

for i in ProgressBar(range(10)):
    sleep(1)
    log.info("Working on %d..." % i)

Images

Also supports outputing images via imgcat if using iTerm2 (support for other tools pending):

log.warn("Image is too big:", extras={"img": "path/to/image.png"})

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

2xh-leet-0.1.1.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

2xh_leet-0.1.1-py3-none-any.whl (4.0 kB view hashes)

Uploaded Python 3

Supported by

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