Skip to main content

A simple logging library

Project description

Bojan Library

BojanConsole is a Python library designed to enhance console logging with various message types and color-coded outputs. It also includes a simple progress bar implementation.

Installation

To install BojanConsole, simply clone the repository:

git clone https://github.com/daniilgrydin/bojan.git

Usage

BojanConsole Class

Initialization

from bojan import BojanConsole

console = BojanConsole(printing=True)

Logging Messages

  • Info Message:

    console.log_plain("This is an info message.")
    
  • Debug Message:

    console.debug("This is a debug message.")
    
  • Error Message:

    console.error("This is an error message.")
    
  • Success Message:

    console.success("This is a success message.")
    
  • Warning Message:

    console.warning("This is a warning message.")
    

Printing Dictionaries

sample_dict = {"key1": "value1", "key2": {"subkey1": "subvalue1"}}
console.dictionary(sample_dict)

Saving Logs

console.save("logfile.txt")

ProgressBar Class

Initialization

from bojan import ProgressBar

progress_bar = ProgressBar(total=100)

Updating and Printing Progress

progress_bar.update(50)
progress_bar.print()

License

This project is licensed under the MIT License.

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

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

bojan-0.0.4.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

bojan-0.0.4-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file bojan-0.0.4.tar.gz.

File metadata

  • Download URL: bojan-0.0.4.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for bojan-0.0.4.tar.gz
Algorithm Hash digest
SHA256 881a20ba47e0b3ed40c4cbf3bb1996c3440b177779c914b3fc93d727e5daf827
MD5 1a3b8ec6f32baae19520ac283b040071
BLAKE2b-256 0825d3666f14431a8915fb5480dddf38568f033057bc3930fe31151ad46884f2

See more details on using hashes here.

File details

Details for the file bojan-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: bojan-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for bojan-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2a5ab13a10a5b0134e935f449b3b3b739de22d9145ae2636e19b353c1c601114
MD5 7830ceb79e3af13e2dc7f2e05c0f9198
BLAKE2b-256 b5ec6288bfaa877fdc97b2fbc9b132821dd59eaf55488452bc8bc344ac10b2d1

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