Skip to main content

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.

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

Installation

You can easily install consolex via pip:

pip install consolex

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

consolex-0.2.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

consolex-0.2-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file consolex-0.2.tar.gz.

File metadata

  • Download URL: consolex-0.2.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

Hashes for consolex-0.2.tar.gz
Algorithm Hash digest
SHA256 77b2bb838e19dbe9b2a19762420fba876c6aed12200a531923458d53d194419e
MD5 35b661654960f0850df06e41825adfef
BLAKE2b-256 40e3966d7560b707c2870ef198661f223284d57682bd37126437d5f8b142aa34

See more details on using hashes here.

File details

Details for the file consolex-0.2-py3-none-any.whl.

File metadata

  • Download URL: consolex-0.2-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

Hashes for consolex-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e202f12a496b873884801b69df6d4ef4f1f6458c986723a1512264aa447e30cd
MD5 3109b44e9ae2e9436c8812ac93fa59cb
BLAKE2b-256 0d4670eae8b38aba3d09d01bad9d16d88cff9cb980a631e48622fea5699c8195

See more details on using hashes here.

Supported by

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