A modern console logging module for Python but similar to JavaScript
Project description
consolex
If you're familiar with JavaScript and miss the console.log functionality in Python, consolex is perfect for you. It brings the same convenience and style, but with Python syntax!
consolex is a Python package that mimics the familiar JavaScript-style console logging in a modern and user-friendly way. With this package, you can easily print logs, warnings, errors, and success messages in the terminal using stylish icons and customizable options.
🚀 What's New in v2.0?
- ✅ New
primary()method - 🎀 New text colors
- ⚙️ Improved formatting options (
sep,end) - 🐛 Bug fixes and performance improvements
Features
- log(): Print general messages to the console.
- warn(): Print warning messages with a warning icon.
- error(): Print error messages with an error icon.
- success(): Print success messages with a success checkmark.
- primary(): Print primary messages with color.
All methods support custom separators, line endings, and variable numbers of arguments, similar to JavaScript's console.log.
Examples
from consolex import console
# Print a log message
console.log("This is a log message.")
# Print a warning message
console.warn("This is a warning message.")
# Print an error message
console.error("This is an error message.")
# Print a success message
console.success("This is a success message.")
# Print a primary message
console.primary("This is a primary message.")
Installation
You can easily install consolex via pip:
pip install consolex
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file consolex-2.0.tar.gz.
File metadata
- Download URL: consolex-2.0.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e6b5bb41c12b1178b6e00d96a90d3f2845f9a82b421a01cf1efc009a751fc12
|
|
| MD5 |
57afeb1403497540b750114fad456448
|
|
| BLAKE2b-256 |
ab7505e9cceb3552a9933821e08044840947ab0d871ba8c6c4ce08e068e78a1b
|
File details
Details for the file consolex-2.0-py3-none-any.whl.
File metadata
- Download URL: consolex-2.0-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c6d955e8df6529451b9bc1e3b7ed96e5785e3862363af9c11980ec18bc7f487
|
|
| MD5 |
077569efc8c218c8c0648f8448259117
|
|
| BLAKE2b-256 |
05f47367ef0966d713f89c6bb6a7adc6393d6cf1f7ad400a2b27b04276fc5ad5
|