{ "info": { "author": "Wattanit Hotrakool", "author_email": "wattanit@protonmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development" ], "description": "# Deprint - Declarative Python fancy print statement\n\nDeprint allows you to write a complex yet easy to understand print statement in Python, resulting in beautiful CLI interface on any ANSI/VT100 terminal emulators.\n\n## Installation\n\nInstall via pip\n\n```\npip install deprint\n```\n\n## Basic usage\n\nDeprint can be used in either the declarative style or the imperative (persistent) style.\n\n### Declarative style\n\nDeclarative syntax of Deprint only applies the style to the text only once with no effect to other print statements.\n```\nfrom deprint import deprint\n\ndp = deprint()\n\n# clear screen\ndp.clear()\n\n# print red text\ndp.colour('red').print('red text)\n\n# print bold text\ndp.style('bold').print('bold text')\n\n# print light_blue text on yellow background\ndp.colour('blue').bg('yellow').print('blue on yellow text')\n\n# print green underlined text on white background\ndp.style('underlined').colour('green').bg('white').print('underlined green text')\n```\n\n### Persistent style\n\nPersistent syntax of Deprint applies the style globally to the terminal session. All print statements (including Python's native print()) are affected by the persistent styling.\n\n```\nfrom deprint import deprint\n\ndp = deprint()\n\n# clear screen\ndp.clear()\n\n# print red text\ndp.setColour('red')\ndp.print('red text')\nprint('This text is also red')\n\n# print light_blue text on yellow background\ndp.setColour('light_blue')\ndp.setBackground('yellow')\ndp.print('blue on yellow text')\n\n# print green underlined text on white background\ndp.setColour('green')\ndp.setBackground('white')\ndp.setStyle('underlined')\ndp.print('underlined green text)\n\n# reset to default style\ndp.reset()\n```\n\n## API documentation\n\n### *class* deprint.deprint()\n\nPrint fancy terminal output.\n\n#### Methods\n\ndeprint.deprint.**clear**()\n\nClear entire terminal screen.\n\n---\n\ndeprint.deprint.**emptylines**(num=1)\n\nPrint *num* empty lines to the terminal.\n\n---\n\ndeprint.deprint.**reset**()\n\nReset all style to terminal's default.\n\n---\n\ndeprint.deprint.**print**(text)\n\nPrint *text* to the terminal with the applied style.\n\nThe print method will maintain the style if the style is set through the persistent methods, or reset to default if the style is set through the declarative methods.\n\n##### Declarative\n\ndeprint.deprint.**colour**(colour)\n\nApply colour to the printed text.\n\nColour can be either a number between 1 - 256 (8bit colour) or one of the following strings:\nblack, red, green, yellow, blue, magenta, cyan, light_grey,dark_grey, light_red, light_green, light_yellow, light_blue, light_magenta, light_cyan, white, default, reset.\n\n---\n\ndeprint.deprint.**bg**(colour)\n\nApply background colour to the printed text.\n\nColour can be either a number between 1 - 256 (8bit colour) or one of the following strings:\nblack, red, green, yellow, blue, magenta, cyan, light_grey,dark_grey, light_red, light_green, light_yellow, light_blue, light_magenta, light_cyan, white, default, reset.\n\n---\n\ndeprint.deprint.**style**(style)\n\nApply text style to the printed text.\n\nStyle can be on of the following stings: bold, dim, underlined, blink, inverse, hidden, default, reset.\n\n---\n\ndeprint.deprint.**hold**()\n\nPrevent the print statement to end with a new line.\n\n##### Persistent\n\ndeprint.deprint.**setColour**(colour)\n\nChange the colour of the terminal's printed text.\n\nColour can be either a number between 1 - 256 (8bit colour) or one of the following strings:\nblack, red, green, yellow, blue, magenta, cyan, light_grey,dark_grey, light_red, light_green, light_yellow, light_blue, light_magenta, light_cyan, white, default, reset.\n\n---\n\ndeprint.deprint.**setBackground**(colour)\n\nChange the colour of the terminal's printed text's background.\n\nColour can be either a number between 1 - 256 (8bit colour) or one of the following strings:\nblack, red, green, yellow, blue, magenta, cyan, light_grey,dark_grey, light_red, light_green, light_yellow, light_blue, light_magenta, light_cyan, white, default, reset.\n\n---\n\ndeprint.deprint.**setStyle**(style)\n\nChange the text style of the terminal's printed text.\n\nStyle can be on of the following stings: bold, dim, underlined, blink, inverse, hidden, default, reset.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/rorasa/deprint/archive/v_02.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/rorasa/deprint", "keywords": "declarative,print,fancy,color", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "deprint", "package_url": "https://pypi.org/project/deprint/", "platform": "", "project_url": "https://pypi.org/project/deprint/", "project_urls": { "Download": "https://github.com/rorasa/deprint/archive/v_02.tar.gz", "Homepage": "https://github.com/rorasa/deprint" }, "release_url": "https://pypi.org/project/deprint/0.2/", "requires_dist": null, "requires_python": ">=3", "summary": "Declarative Python fancy print statement", "version": "0.2" }, "last_serial": 5756233, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "c8f8749e5f2d97ada34f1fca4a1e2d60", "sha256": "4afca91134d90cfbb00254469d3739ea2196df2fe235d3c14095d775cc268c45" }, "downloads": -1, "filename": "deprint-0.2.tar.gz", "has_sig": false, "md5_digest": "c8f8749e5f2d97ada34f1fca4a1e2d60", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 4332, "upload_time": "2019-08-29T18:57:53", "url": "https://files.pythonhosted.org/packages/e2/eb/b29765b22cb5d1fa3a85e2d1dd0198f3a2d3e5b4bf02e9784added9f62c9/deprint-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c8f8749e5f2d97ada34f1fca4a1e2d60", "sha256": "4afca91134d90cfbb00254469d3739ea2196df2fe235d3c14095d775cc268c45" }, "downloads": -1, "filename": "deprint-0.2.tar.gz", "has_sig": false, "md5_digest": "c8f8749e5f2d97ada34f1fca4a1e2d60", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 4332, "upload_time": "2019-08-29T18:57:53", "url": "https://files.pythonhosted.org/packages/e2/eb/b29765b22cb5d1fa3a85e2d1dd0198f3a2d3e5b4bf02e9784added9f62c9/deprint-0.2.tar.gz" } ] }