Skip to main content

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")

If using MyPy (or if you don't like monkeypatching) you can import the logger explicitly in each module as needed:

from leet.logging import log
log.info("Explicit import")

Progress bars

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

from time import sleep
from leet.logging import log_progress

for i in log_progress.debug(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"})

Release files for 2xh-leet 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for 2xh-leet 1.0.1
File Size Uploaded
2xh-leet-1.0.1.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for 2xh-leet 1.0.1
File Interpreter ABI Platform
2xh_leet-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.3 kB

Release files / 2xh-leet-1.0.1.tar.gz

Download URL 2xh-leet-1.0.1.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
0079cbdf0f7e34caaf07cbd53b11751a95f22aa28f0cca05d0e814137eb8cc63
BLAKE2b-256 checksum
How to use checksums
08bbfdfd468425f7376fb43f5be6e4d69432deef2b4aa726e897049b9450fd2b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.7 CPython/3.9.6 Darwin/19.6.0

Release files / 2xh_leet-1.0.1-py3-none-any.whl

Download URL 2xh_leet-1.0.1-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b1f21fc1726a59d62578eb5926b10bfe49e5c1fa697959bbad8e677f230a0365
BLAKE2b-256 checksum
How to use checksums
ee70ba9c871127fc22479dde5efd3fb0f4cd75d20afa4959958507936dc7df18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.7 CPython/3.9.6 Darwin/19.6.0

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page