معرفی شرکت ها


display-session-2.0.1


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

Convenient formatting, coloring, and utility for user-facing print statements.
ویژگی مقدار
سیستم عامل -
نام فایل display-session-2.0.1
نام display-session
نسخه کتابخانه 2.0.1
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Nicholas Lawrence
ایمیل نویسنده nickclawrence@gmail.com
آدرس صفحه اصلی http://github.com/kdggavkc/display-session/
آدرس اینترنتی https://pypi.org/project/display-session/
مجوز MIT
====================================================================================== ``display-session``: Convenient formatting, coloring and utility for print statements. ====================================================================================== **display-session** is an MIT licensed Python package that provides easy ANSI formatting and utility to Python's built in print statement. This project stemmed from wanting better looking, more informative, and more engaging command line interfaces. There are three functions intended to be user-facing: 1. header - print provided message with all other space as the provided justify_char. Serves as easy way to communicate seperate sections within logs. 2. alert - simple print statement that maps numeric arg (-1, 0, 1) to bad, neutral, good. Serves as easy way to communicate sentiment of message. 3. report - most complicated print statement. proceeds all messages with bylines, and if provided will run all provided functions at print time. intended to serve as a sort of heads-up-display for the command line. See example below. Simple comparison and examples:: >>>print('This is how the builtin print function works') This is how the builtin print function works Simplest compelling usecase for display_session:: >>>from display_session import DisplaySession >>>display = DisplaySession('This is a byline') >>>display.report('The byline proceeds any text input here') # hard to show with markdown, but byline is also separately ANSI colored. This is a byline : The byline proceeds any text input here More complicated examples:: >>>import datetime as dt >>>import psutil >>>from display_session import DisplaySession >>>user = 'John' >>>display = DisplaySession(byline='P R O G R A M - {}'.format(user), byline_action=[dt.datetime.now, psutil.cpu_percent] ) >>>display.report('User successfully logged in') P R O G R A M - John // 2018-09-19 21:55:29.115387 // 9.1: User successfully logged in. >>>display.report('User successfully logged out') P R O G R A M - John // 2018-09-19 21:56:14.560489 // 7.8: User successfully logged out. Other capabilities:: >>># lets signify to our users that we are entering a new section >>>display.header('BEGINNING LEVEL 2', align='right') ______________________________________________________________________ BEGINNING LEVEL 2 >>># lets communicate by leveraging ANSI colors - our second arg maps to them in the method. >>>display.alert('This message is good, so it should have a green color', 1) This message is good, so it should have a green color >>> >>>display.alert('This message is bad, so it should have a red color', -1) This message is bad, so it should have a red color


نیازمندی

مقدار نام
>=0.4.0 colorama


نحوه نصب


نصب پکیج whl display-session-2.0.1:

    pip install display-session-2.0.1.whl


نصب پکیج tar.gz display-session-2.0.1:

    pip install display-session-2.0.1.tar.gz