Launch Week Day 5: Introducing Reachability for PHP.Learn More
Socket
Book a DemoSign in
Socket

bprinter

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bprinter

A powerful cross-platform terminal styling library

pipPyPI
Version
0.2.0
Maintainers
1

BPrinter | Принтер

PyPI version Python License

English | Русский

🌈 BPrinter - Powerful Cross-Platform Terminal Styling Library

BPrinter is a feature-rich library for terminal text styling that works seamlessly across Windows, macOS, and Linux.

📦 Installation

pip install bprinter

🚀 Quick Start

from bprinter import Color, Background, Style

# Simple color usage
print(Color.RED + "Red text" + Style.RESET)

# Combining styles
print(Color.BLUE + Background.WHITE + Style.BOLD + "Bold blue text on white background" + Style.RESET)

# Using context manager
with Style.color('red'):
    print("This text is red")
    print("And this one too")

✨ Features

  • 🎨 16 basic colors and 256 extended colors
  • 🖌 RGB color support
  • ✏️ Text styling (bold, italic, underline, etc.)
  • 🔤 ASCII art generation
  • 📝 Markdown-like text formatting
  • 🖥 Cross-platform compatibility
  • 🎯 Simple and intuitive API
  • 🛠 Extensible architecture

🎨 Advanced Usage

Logging with Styles

from bprinter import BPrinter

bp = BPrinter(show_time=True)

bp.success("Operation completed successfully!")
bp.error("An error occurred")
bp.warning("Warning: Low memory")
bp.info("Processing data...")
bp.debug("Debug information")

ASCII Art

from bprinter import ASCIIArtGenerator

# Create ASCII art
print(ASCIIArtGenerator.render("Hello!", color="red"))

# Preview different fonts
print(ASCIIArtGenerator.preview_fonts("ABC"))

Text Formatting

from bprinter import Printer

printer = Printer(enable_formatting=True)

printer("This is **bold** and _italic_ text")
printer("Use `code` and {red|colored text}")

📚 Documentation

For detailed documentation and examples, visit our GitHub repository.

🌈 BPrinter - Мощная кросс-платформенная библиотека для стилизации текста в терминале

BPrinter - это многофункциональная библиотека для стилизации текста в терминале, которая работает на Windows, macOS и Linux.

📦 Установка

pip install bprinter

🚀 Быстрый старт

from bprinter import Color, Background, Style

# Простое использование цветов
print(Color.RED + "Красный текст" + Style.RESET)

# Комбинирование стилей
print(Color.BLUE + Background.WHITE + Style.BOLD + "Жирный синий текст на белом фоне" + Style.RESET)

# Использование контекстного менеджера
with Style.color('red'):
    print("Этот текст красный")
    print("И этот тоже")

✨ Возможности

  • 🎨 16 базовых цветов и 256 расширенных цветов
  • 🖌 Поддержка RGB цветов
  • ✏️ Стилизация текста (жирный, курсив, подчеркивание и др.)
  • 🔤 Генерация ASCII арта
  • �� Форматирование текста в стиле Markdown
  • 🖥 Кросс-платформенная совместимость
  • 🎯 Простой и интуитивно понятный API
  • 🛠 Расширяемая архитектура

🎨 Продвинутое использование

Логирование со стилями

from bprinter import BPrinter

bp = BPrinter(show_time=True)

bp.success("Операция успешно завершена!")
bp.error("Произошла ошибка")
bp.warning("Внимание: Мало памяти")
bp.info("Обработка данных...")
bp.debug("Отладочная информация")

ASCII Арт

from bprinter import ASCIIArtGenerator

# Создание ASCII арта
print(ASCIIArtGenerator.render("Привет!", color="red"))

# Предпросмотр разных шрифтов
print(ASCIIArtGenerator.preview_fonts("АБВ"))

Форматирование текста

from bprinter import Printer

printer = Printer(enable_formatting=True)

printer("Это **жирный** и _курсивный_ текст")
printer("Используйте `код` и {red|цветной текст}")

📚 Документация

Подробная документация и примеры доступны в нашем GitHub репозитории.

📄 License | Лицензия

MIT License

Keywords

terminal cli ansi-colors text-formatting ascii-art cross-platform console terminal-colors styling markdown logging

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts