Skip to main content

Cross-platform smart printer for console applications

Project description

smartprinter v0.3.2


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


Short Description:

smartprinter - Cross-platform smart printer for console applications.


Author and developer: Alexander Suvorov

smartlegiondev@gmail.com


Supported:

  • Linux: All.
  • Windows: 7/8/10.
  • Termux (Android).

Images:

logo


What's new?

smartprinter v0.3.2


Description:

smartprinter - Cross-platform 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.

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)


Disclaimer of liability:

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Information:

--------------------------------------------------------
Licensed under the terms of the BSD 3-Clause License
(see LICENSE for details).
Copyright © 2026, Alexander Suvorov
All rights reserved.
--------------------------------------------------------

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.3.2.tar.gz (5.3 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.3.2-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for smartprinter-0.3.2.tar.gz
Algorithm Hash digest
SHA256 109f6ac959e0a36a72746fdf2b4f7727cbd6741ec0ce125e545ccaac8ace69d0
MD5 04c08af460ebd778a7b57101d44fd99f
BLAKE2b-256 12620e05c384db805a15c549929622661e08e63de8d3a13d4f59b54c84087ff8

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for smartprinter-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 21b8396ea7b033ca079e20fadee5a833145ef52f5d161e14ba28af1934b28a73
MD5 259a385a5e6a37888b47869159cd8e9d
BLAKE2b-256 add67553bb34e50820d60a9ab130cf9288f55d2af05c0c2a2d139ed3015f3c19

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