# termstyles
termstyles is a simple terminal coloring module. Using termstyles you can write colored output to the terminal.
## Installation
Use the package manager [pip](https://pip.pypa.io/en/stable/) to install termstyles.
Windows
```bash
pip install termstyles
```
Linux/MacOS
```bash
python3 -m pip install termstyles
```
## Usage
```python
import termstyles
# print out in color
print(color.ForeStyles.green + 'Your text')
# or
print(termstyles.attach('Your text', attr=termstyles.ForeStyles.yellow))
# reset text color to default
print(color.ForeStyles.default)
# outputting the background in color
print(color.BackStyles.white + 'Your text')
# or
print(termstyles.attach('Your text', attr=termstyles.ForeStyles.red))
# change text style
print(color.Styles.bold + 'Your text')
# or
print(termstyles.attach('Your text', attr=termstyles.TextStyles.blink))
# randomization
random = termstyles.random(only=(termstyles.ForeStyles, termstyles.BackStyles))
print(random + 'Your text')
# or
print(color.attach('Your text', attr=random))
```
Raw data
{
"_id": null,
"home_page": "",
"name": "termstyles",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "python,color,termstyles,terminal,console",
"author": "N0NL0C4L",
"author_email": "<n0nl0c4l@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/96/60/b9a7d759df1964b2207f53645e1e8ada6fb3fe10597455d2f94bbf0138fb/termstyles-0.0.2.tar.gz",
"platform": null,
"description": "\n# termstyles\n\ntermstyles is a simple terminal coloring module. Using termstyles you can write colored output to the terminal.\n\n## Installation\n\nUse the package manager [pip](https://pip.pypa.io/en/stable/) to install termstyles.\n\nWindows\n```bash\npip install termstyles\n```\nLinux/MacOS\n```bash\npython3 -m pip install termstyles\n```\n## Usage\n\n```python\nimport termstyles\n\n# print out in color\nprint(color.ForeStyles.green + 'Your text')\n# or\nprint(termstyles.attach('Your text', attr=termstyles.ForeStyles.yellow))\n\n# reset text color to default\nprint(color.ForeStyles.default)\n\n# outputting the background in color\nprint(color.BackStyles.white + 'Your text')\n# or\nprint(termstyles.attach('Your text', attr=termstyles.ForeStyles.red))\n\n# change text style\nprint(color.Styles.bold + 'Your text')\n# or\nprint(termstyles.attach('Your text', attr=termstyles.TextStyles.blink))\n\n# randomization\nrandom = termstyles.random(only=(termstyles.ForeStyles, termstyles.BackStyles))\nprint(random + 'Your text')\n# or\nprint(color.attach('Your text', attr=random))\n```\n",
"bugtrack_url": null,
"license": "",
"summary": "Simple terminal coloring module",
"version": "0.0.2",
"project_urls": null,
"split_keywords": [
"python",
"color",
"termstyles",
"terminal",
"console"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f202a098f47c640963cf7ec29892be024ae28422245d91c2e682198bada81ee3",
"md5": "ef07021d6499b8238f6bc4d57b239c89",
"sha256": "be6d00cac08f06e810277e76b300eff00a261e60f31740f13e4ab7b0f8bbca03"
},
"downloads": -1,
"filename": "termstyles-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ef07021d6499b8238f6bc4d57b239c89",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 2427,
"upload_time": "2023-12-10T12:54:22",
"upload_time_iso_8601": "2023-12-10T12:54:22.161711Z",
"url": "https://files.pythonhosted.org/packages/f2/02/a098f47c640963cf7ec29892be024ae28422245d91c2e682198bada81ee3/termstyles-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9660b9a7d759df1964b2207f53645e1e8ada6fb3fe10597455d2f94bbf0138fb",
"md5": "5399690288ec49e8b893cb31ff0abc0d",
"sha256": "d89a6ee4e2b730502b943b35ce0046e446e1ed1ad9c0852f9dd03d1b19a46695"
},
"downloads": -1,
"filename": "termstyles-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "5399690288ec49e8b893cb31ff0abc0d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 2260,
"upload_time": "2023-12-10T12:54:24",
"upload_time_iso_8601": "2023-12-10T12:54:24.026840Z",
"url": "https://files.pythonhosted.org/packages/96/60/b9a7d759df1964b2207f53645e1e8ada6fb3fe10597455d2f94bbf0138fb/termstyles-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-10 12:54:24",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "termstyles"
}