Skip to main content

Customized colorful logging in Python

Project description

CyPrint

CyPrint is a Python package for customized colorful logging.

Installation

You can install CyPrint using pip:

pip install cyprint

Usage

from cyprint import cyprint, cypb

cyprint('info信息', "INFO")
cyprint('警告信息', "WARNING")
cyprint('成功信息', "SUCCESS")
cyprint('错误信息', "ERROR")
cyprint('debug信息', "DEBUG")

# Create a progress bar
total_events = 100  # Replace with your total number of events
for i in range(total_events):
    cypb(i, total_events, cyname="Progress")
    # Your processing code here...

Customizing Log Messages

You can also create custom log messages by specifying the log level:

cyprint('Custom message', 'debug')

Progress Bar

The cypb function generates a progress bar:

from cyprint import cypb

total_events = 100  # Replace with your total number of events
for i in range(total_events):
    cypb(i, total_events, cyname="Progress")
    # Your processing code here...

Contributing

We welcome contributions! If you'd like to contribute to CyPrint, please fork the repository and 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

cyprint-1.1.1.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

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

cyprint-1.1.1-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file cyprint-1.1.1.tar.gz.

File metadata

  • Download URL: cyprint-1.1.1.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.7

File hashes

Hashes for cyprint-1.1.1.tar.gz
Algorithm Hash digest
SHA256 4f15b823d26d38dbaff0d4a674cbaa9bb485fbab9c841de49564b8e837532c19
MD5 1b14717bdbb33745cd4e0c165aede426
BLAKE2b-256 6cab9d3f151dd6cf4bc39eb6a508fe44e2146d018e19ea028fb40c14130bfb48

See more details on using hashes here.

File details

Details for the file cyprint-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: cyprint-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.7

File hashes

Hashes for cyprint-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9f26198155adfd71d0d0fc39e9bee78ec8a977aa49131733c94efca565cadc28
MD5 47e7fbe84f3406761f239f3287bfab2d
BLAKE2b-256 78048f9f4f4990d3bac3726d797ce176c8b07658b0d6311a7aaf4f1bd9d85c65

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