Skip to main content

Consoler

A terminal printer that's totally tailored to how I like terminal printouts. If this happens to also be how you like terminal printouts, this package may well be for you too.

Installing

poetry add consoler or pip install consoler

Usage

from consoler import console
console.log("This is a log level print out")
console.info("This is an info level print out")
console.warn("This is a warning level print out")

try:
    1 / 0
except Exception as e:
    console.error("Oh no!", e)

Settings

Using with Django you set a few things in the Django settings to affect behaviour of conoler.

DEBUG = True

If DEBUG is True consoler will print to stdout, otherwise it will send the output to loguru.

CONSOLE_LOG_LEVEL = 'LOG'

You can set a log level for which message you want to reach the screen. Available levels are...

LOG
INFO
SUCCESS
TEMPLATE
WARN
ERROR

CONSOLE_PATH_PREFIX = ''

When developing in a docker container or VM, the start of consoler's file paths might not quite match your local filesystem. Set a prefix here to prepend to the output's path string. This is super useful if you use https://github.com/dandavison/iterm2-dwim to make file paths clickable in iTerm.

Changelog

0.1.5

  • Remove the hard dependency on loguru, it still works with it, but this way we don't need to keep this package up to date with loguru releases.
  • Slightly modernise the code a little.

Metadata

Release files for consoler 0.1.7

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

Source distribution (sdist)

Source distribution for consoler 0.1.7
File Size Uploaded Provenance
consoler-0.1.7.tar.gz 5.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for consoler 0.1.7
File Interpreter ABI Platform
consoler-0.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 12.1 kB

Release files / consoler-0.1.7.tar.gz

Download URL consoler-0.1.7.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
93e8859af775e082ea696bc43aac5d6a607a3aa1955b4e188fafa425970228bf
BLAKE2b-256 checksum
How to use checksums
7c6a5df3be755bbe1bb2e8f7c50e862344da17649925909fec714b324e5729b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.9.19 Darwin/23.3.0

Release files / consoler-0.1.7-py3-none-any.whl

Download URL consoler-0.1.7-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3efcd1ee2de2d03724654b5856d1c8a5d74e3657f548dd3fda4b7335b63a9f2f
BLAKE2b-256 checksum
How to use checksums
c912d3e248c38851c4f06011978258d82ead34bbe903ba21809b32f09dd5aa13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.9.19 Darwin/23.3.0

Security for consoler 0.1.7

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.

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