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.2.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.2-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cyprint-1.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 3f73532345dc191f6a6f30fcd3817ff414c1927a59668a4cd50fa34dbefe7981
MD5 346e28332af7a6591a90f8f5909987c6
BLAKE2b-256 9cfe5bf72d919d827d1523e82ddb84ce1a50280da4737f9a0079ad882222a789

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cyprint-1.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 428a47f5dfd82cf2e363569b21a7cd191a567025a0dca95157a0ab669ab81e59
MD5 f75b1c934891b2fbb0a30950852a7705
BLAKE2b-256 98e03be8e93691b22d20c3ffa8b5d5fc9691f93f8b563d2044eddf1187caf4f8

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