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.12.tar.gz (5.0 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.12-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bojan-0.0.12.tar.gz
  • Upload date:
  • Size: 5.0 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.12.tar.gz
Algorithm Hash digest
SHA256 0446cfdfee12fa78b572a5739cdbb73d1b6c25be8703d3f035f967650129b00f
MD5 b54643042bed03c78910549ea91239c5
BLAKE2b-256 9cf706ce22ac790b422617ce88c28bde8f4235a62d02973e9fd1d66cf9001aca

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bojan-0.0.12-py3-none-any.whl
  • Upload date:
  • Size: 5.1 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.12-py3-none-any.whl
Algorithm Hash digest
SHA256 01cc565dd87f87041db9566373b0dd04f8909ecac972e37646b4cada5773d43f
MD5 b38b2f4780842a18d8d933177c42bfdd
BLAKE2b-256 5852bcf97f47412e0dbdaecc94be97473e3e083452b483be2350f922141c5b8d

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