Simple python module to colour text
Project description
Python Niram
This is a simple module to get coloured text in linux, max , and also in android termux (not supported in windows CMD)
Installation
Using pypi
You can install Niram using pypi. Execute..
python3 -m pip install Niram
Using setup.py
You can install Niram module by source code. Download source code from Link is not available. Checkout Github instead
Download the zip file and unzip the file.(Use unzip
command) Then execute setup.py install.
cd Niram-1.0.4
python3 setup.py install
Usage
from Niram import Colours
obj = Colours() # Create a object
# Print using print() method
obj.print("Your Text Goes here",110) # 110 is the colour code
obj.print(["Hi","How are you?","Checkout niram"],[22,119,220],seperator="\n") # print multiple text with multiple colours
# Get formatted string using colour() method
txt = obj.colour(273,"Your text goes here") # returns the string representing the coloured text
print(txt) # Print the formatte text
txt2 = obj.format(["Example","Formatting"],[80,51],seperator=", ",end=" - Niram") # Gives foramted string with multiple colors
print(txt2)
This will return the formated text here colour_code is a number of the colour get it by executing
python3 -m Niram -c
This will list out all colours and responsible number Second argument is your text and third argument "second" is the background colour or any other colour you need
Available Colors
Requirements
This module don't need any additional requirements
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
Built Distribution
File details
Details for the file Niram-1.0.5.tar.gz
.
File metadata
- Download URL: Niram-1.0.5.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bef3f0d7a89bf96d5c108a6e53ad9b8fae9894025dbc0dc83607b94c2e60437 |
|
MD5 | 175a8f6271e4b677595727bb5d10b69d |
|
BLAKE2b-256 | 232a0ac1d58068d7b6ecc99d2fca9465976601f9e42ec5667fe2ca049705785a |
File details
Details for the file Niram-1.0.5-py3-none-any.whl
.
File metadata
- Download URL: Niram-1.0.5-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f153078d88466b3e61f0f3bd50edefbe3ad5811ba26269b7735daea8dadbc38 |
|
MD5 | 844ca63caf88b80b2d616bf3c891ee64 |
|
BLAKE2b-256 | 1b850bed5b46f93dd430cbe7d259a83480a5dde2c76f577deddd879544ab50ab |