Skip to main content

Cross-platform python library, smart printer for console applications.

Project description

smartprinter v0.4.1

Cross-platform python library, smart printer for console applications.


Platform GitHub release (latest by date) GitHub top language GitHub GitHub stars GitHub forks PyPI PyPI - Downloads PyPI Downloads PyPI - Format


smartprinter - Cross-platform python library, smart printer for console applications.

Has several different objects for displaying to the console or generating a string:

  • Normal output.
  • Output with the ability to change the line color .
  • Displaying a message inside the pager, with the ability to scroll up and down, exit the pager, and print the message after being shown in a pager.
  • output with the ability to print a message in the center of the console, regardless of changes in its width, indented before and after the message, indented with the specified characters.

⚠️ Disclaimer

By using this software, you agree to the full disclaimer terms.

Summary: Software provided "AS IS" without warranty. You assume all risks.

Full legal disclaimer: See DISCLAIMER.md


Help

Install and use:

  • pip install -r requirements.txt
  • for tests: pip install requirements/requirements-dev.txt
  • for test coverage: pytest --cov --cov-report=html

Use:

  • pip3 install smartprinter
from smartprinter.printers import Printer, PrintersFactory

printer = Printer()
printer.base.echo('Text')
printer.click.echo('Text', show=True, color='green')
printer.smart.echo('Text', show=True, char='*')
printer.pager.echo('Text', show=True)

def_printer = PrintersFactory.get_base()
click_printer = PrintersFactory.get_click()
smart_printer = PrintersFactory.get_smart()
pager = PrintersFactory.get_pager()

or

from smartprinter.printers import Printer

printer = Printer()
Printer.base.echo('Text')
Printer.click.echo('Text', show=True, color='green')
Printer.smart.echo('Text', show=True, char='*')
Printer.pager.echo('Text', show=True)

Coverage

logo


License

BSD 3-Clause License

Copyright (©) 2026, Alexander Suvorov

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

smartprinter-0.4.1.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

smartprinter-0.4.1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file smartprinter-0.4.1.tar.gz.

File metadata

  • Download URL: smartprinter-0.4.1.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for smartprinter-0.4.1.tar.gz
Algorithm Hash digest
SHA256 8b4488a526ff3c4cae10862a09aab3634cc2c7ef4d0e332330f9d42ee46c55af
MD5 d1287b14364a6d1d0b312972164abd0f
BLAKE2b-256 4b6066949fbcb56a42eae58e2728a0d9514f057875da3d1255f15481b985fd4f

See more details on using hashes here.

File details

Details for the file smartprinter-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: smartprinter-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for smartprinter-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5860ec9cbd63e216f87d29b38b7037cbb4106db09c12ac79721f6cd16f74c1ef
MD5 fea934327995b72046980ca88b95c489
BLAKE2b-256 57b686ef85964e6a98792ff7cc999f280c7ce63388c8915720720e8e06f9daf9

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