kaviyesutil


Namekaviyesutil JSON
Version 2.0.1 PyPI version JSON
download
home_pagehttps://github.com/Kaviyes/kaviyesutil
SummaryA standard kaviyes utility for python thats ideal for small projects and prototypes.
upload_time2023-11-13 10:40:44
maintainer
docs_urlNone
authorKaviyes
requires_python>=3.10
licenseMIT
keywords utility toolkit
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [<img src="https://raw.githubusercontent.com/Kaviyes/kaviyesutil/main/Kaviyesutil.png" width="410"/>](https://github.com/Kaviyes/kaviyesutil)

![Python](https://img.shields.io/badge/Python-3776AB?style=for-the-badge&logo=python&logoColor=white) ![Windows](https://img.shields.io/badge/Windows-0078D6?style=for-the-badge&logo=windows&logoColor=white) ![Linux](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black) ![MacOS](https://img.shields.io/badge/mac%20os-000000?style=for-the-badge&logo=apple&logoColor=white)

![Open Issues](https://img.shields.io/github/issues/Kaviyes/kaviyesutil.svg) ![Closed Issues](https://img.shields.io/github/issues-closed/Kaviyes/kaviyesutil.svg) ![License](https://img.shields.io/github/license/Kaviyes/kaviyesutil.svg) ![VsCode](https://img.shields.io/badge/Made%20for-VSCode-1f425f.svg) 

A standard kaviyes utility for python thats ideal for small projects and prototypes.

## Installation
You can install and update using [pip](https://pip.pypa.io/en/stable/getting-started/)
```
pip install kaviyesutil -U
```

## Documentation

### FUNCTIONS

<br>

FUNCTION | DESCRIPTION
--------- | ------------
[`printc`](https://github.com/Kaviyes/kaviyesutil#printc) | Quick and easy way to customize your text
[`countdown`](https://github.com/Kaviyes/kaviyesutil#countdown) | A verbose countdown timer
[`cloakedLink`](https://github.com/Kaviyes/kaviyesutil#cloakedLink) | create a visually appealing links for terminals
[`resourcePath`](https://github.com/Kaviyes/kaviyesutil#resourcePath) | Get absolute path to resource, works for dev and for PyInstaller
[`generateCustomID`](https://github.com/Kaviyes/kaviyesutil#generateCustomID) | Generate own custom ID or use premade formats
[`prompt`](https://github.com/Kaviyes/kaviyesutil#prompt) | Prompts user with desired message
[`currentTime`](https://github.com/Kaviyes/kaviyesutil#currentTime) | A simplified version of datetime function
[`delay`](https://github.com/Kaviyes/kaviyesutil#delay) | a delay function / This function is from time.sleep()
[`decodeHex`](https://github.com/Kaviyes/kaviyesutil#decodeHex) | Decodes Hex into String
[`encodeHex`](https://github.com/Kaviyes/kaviyesutil#encodeHex) | Encodes String into Hex
[`terminal`](https://github.com/Kaviyes/kaviyesutil#terminal) | a quick access to terminal
[`cter`](https://github.com/Kaviyes/kaviyesutil#cter) | Clears the contents of the terminal screen

### EXAMPLES
### printc
```
printc('Hello Kaviyes!', 'red', 'magenta')
print(printc('Hello Kaviyes!', 'red', 'magenta', True))
    
printc('Hello Kaviyes!', 'red', 'magenta', 'bold', 'italic')
print(printc('Hello Kaviyes!', 'red', 'magenta', 'bold', 'italic', ReturnText='True'))
```

### countdown
```
countdown(10,'Timer: ' ,'Timer complete!')
```

### cloakedLink
```
cloakedLink('visit kaviyes on github!', 'https://github.com/Kaviyes', True)
print(cloakedLink('visit kaviyes on github!', 'https://github.com/Kaviyes'))
cloakedLink(printc('Visit Kaviyes on Github!', 'cyan', 'default', 'underlined', ReturnText=True), 'https://github.com/Kaviyes', Print=True)
```

### resourcePath
```
resourcePath("image.png") # For PyInstaller
```

### generateCustomID
```
generateCustomID('STD08') # 08 | 16 | 32

generateCustomID(Length="8", Type="standard") # does not include special characters
generateCustomID(Length="8", Type="all") # includes special characters
generateCustomID(Length="8", Type "digits")

generateCustomID('AA00aa$$') # custom one
# A = Uppercase letter A-Z
# a = Lowercase letter a-z
# $ = Custom Characters
# 0 = Digits 0-9

# NOTE: Using "Length" will override "Format"
```

### prompt
```
#default value / Waits until the user press enter
prompt()

#Pause until user press any key
prompt(Anykey=True)

#Add Desired message / Waits until the user press enter
prompt('Hello Kaviyes!')
```

### currentTime
```
#Using own format
currentTime('%H:%M:%S')

#Printing the results
time = currentTime('%H:%M:%S')
print(time)
or
print(currentTime('%H:%M:%S'))

#quick preset
currentTime(Format_24H=True) # its true by default
```

### delay
```
delay(1) # delays for 1 second

sleep(.25) # delays for 250 miliseconds
```

### decodeHex
```
x = 68656c6c6f20746865726521
decodeHex(x, reversed = True)

decodeHex(x, reversed = False)
```

### encodeHex
```
x = "hello there!"
encodeHex(x, reversed = True)

encodeHex(x, reversed = False)
```

### terminal
```
terminal('echo Hello Kaviyes!') #Outputs Hello Kaviyes! to terminal
```

### cter
```
cter() # will clear the terminal
cter("terminal cleared")
```

<br>

## Notes

Kaviyesutil version **2.0.0** is no longer compatible with older versions.
* This is a completely revamped version, and it is not compatible with older versions due to function changes. It is better to download the old version and use it locally if you want to update to the latest version.

Changes in the new version **2.0.0** - **2.0.1**:

**2.0.0**
* Renamed `FancyText` to `printc`.
* Removed `ConvertUnits` and `Today` functions.
* Improved function names.
* General bug fixes and improvements.

**2.0.1**
* Fixed print bug on `cloakedLink` function.
* Added feature on `cter` to leave message after the terminal is cleared.

<br>

Compatibilities:

 Python version: **3.10** minimum

IDE:
* Visual Studio Code (fully compatible)
* PyCharm & Visual Studio (function description is displayed in raw but still readable)
* Not tested on other IDEs yet

OS:
* Android (Termux)
* Windows (8.1 and later)
* Linux (Debian and others)
* macOS (10.15 Catalina and later)

Links:
* Found a problem [create an issue](https://github.com/Kaviyes/kaviyesutil/issues/new/choose) here!
* Create a [pull request](https://github.com/Kaviyes/kaviyesutil/compare) here!

<br>
<br>
<br>
<br>

<p align="center">
  <a href="https://github.com/Kaviyes/">
    <img src="https://raw.githubusercontent.com/Kaviyes/kaviyesutil/main/Kaviyes-Text.png" alt="KAVIYES" width="500"/>
  </a>
</p>

<br>

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Kaviyes/kaviyesutil",
    "name": "kaviyesutil",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "utility,toolkit",
    "author": "Kaviyes",
    "author_email": "kaviyeslabs@proton.me",
    "download_url": "https://files.pythonhosted.org/packages/a1/4c/446fa23a217e7c4f25ec7c3cf6ded781e2d0080c17bbca84ecd1ab88a801/kaviyesutil-2.0.1.tar.gz",
    "platform": null,
    "description": "[<img src=\"https://raw.githubusercontent.com/Kaviyes/kaviyesutil/main/Kaviyesutil.png\" width=\"410\"/>](https://github.com/Kaviyes/kaviyesutil)\r\n\r\n![Python](https://img.shields.io/badge/Python-3776AB?style=for-the-badge&logo=python&logoColor=white) ![Windows](https://img.shields.io/badge/Windows-0078D6?style=for-the-badge&logo=windows&logoColor=white) ![Linux](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black) ![MacOS](https://img.shields.io/badge/mac%20os-000000?style=for-the-badge&logo=apple&logoColor=white)\r\n\r\n![Open Issues](https://img.shields.io/github/issues/Kaviyes/kaviyesutil.svg) ![Closed Issues](https://img.shields.io/github/issues-closed/Kaviyes/kaviyesutil.svg) ![License](https://img.shields.io/github/license/Kaviyes/kaviyesutil.svg) ![VsCode](https://img.shields.io/badge/Made%20for-VSCode-1f425f.svg) \r\n\r\nA standard kaviyes utility for python thats ideal for small projects and prototypes.\r\n\r\n## Installation\r\nYou can install and update using [pip](https://pip.pypa.io/en/stable/getting-started/)\r\n```\r\npip install kaviyesutil -U\r\n```\r\n\r\n## Documentation\r\n\r\n### FUNCTIONS\r\n\r\n<br>\r\n\r\nFUNCTION | DESCRIPTION\r\n--------- | ------------\r\n[`printc`](https://github.com/Kaviyes/kaviyesutil#printc) | Quick and easy way to customize your text\r\n[`countdown`](https://github.com/Kaviyes/kaviyesutil#countdown) | A verbose countdown timer\r\n[`cloakedLink`](https://github.com/Kaviyes/kaviyesutil#cloakedLink) | create a visually appealing links for terminals\r\n[`resourcePath`](https://github.com/Kaviyes/kaviyesutil#resourcePath) | Get absolute path to resource, works for dev and for PyInstaller\r\n[`generateCustomID`](https://github.com/Kaviyes/kaviyesutil#generateCustomID) | Generate own custom ID or use premade formats\r\n[`prompt`](https://github.com/Kaviyes/kaviyesutil#prompt) | Prompts user with desired message\r\n[`currentTime`](https://github.com/Kaviyes/kaviyesutil#currentTime) | A simplified version of datetime function\r\n[`delay`](https://github.com/Kaviyes/kaviyesutil#delay) | a delay function / This function is from time.sleep()\r\n[`decodeHex`](https://github.com/Kaviyes/kaviyesutil#decodeHex) | Decodes Hex into String\r\n[`encodeHex`](https://github.com/Kaviyes/kaviyesutil#encodeHex) | Encodes String into Hex\r\n[`terminal`](https://github.com/Kaviyes/kaviyesutil#terminal) | a quick access to terminal\r\n[`cter`](https://github.com/Kaviyes/kaviyesutil#cter) | Clears the contents of the terminal screen\r\n\r\n### EXAMPLES\r\n### printc\r\n```\r\nprintc('Hello Kaviyes!', 'red', 'magenta')\r\nprint(printc('Hello Kaviyes!', 'red', 'magenta', True))\r\n    \r\nprintc('Hello Kaviyes!', 'red', 'magenta', 'bold', 'italic')\r\nprint(printc('Hello Kaviyes!', 'red', 'magenta', 'bold', 'italic', ReturnText='True'))\r\n```\r\n\r\n### countdown\r\n```\r\ncountdown(10,'Timer: ' ,'Timer complete!')\r\n```\r\n\r\n### cloakedLink\r\n```\r\ncloakedLink('visit kaviyes on github!', 'https://github.com/Kaviyes', True)\r\nprint(cloakedLink('visit kaviyes on github!', 'https://github.com/Kaviyes'))\r\ncloakedLink(printc('Visit Kaviyes on Github!', 'cyan', 'default', 'underlined', ReturnText=True), 'https://github.com/Kaviyes', Print=True)\r\n```\r\n\r\n### resourcePath\r\n```\r\nresourcePath(\"image.png\") # For PyInstaller\r\n```\r\n\r\n### generateCustomID\r\n```\r\ngenerateCustomID('STD08') # 08 | 16 | 32\r\n\r\ngenerateCustomID(Length=\"8\", Type=\"standard\") # does not include special characters\r\ngenerateCustomID(Length=\"8\", Type=\"all\") # includes special characters\r\ngenerateCustomID(Length=\"8\", Type \"digits\")\r\n\r\ngenerateCustomID('AA00aa$$') # custom one\r\n# A = Uppercase letter A-Z\r\n# a = Lowercase letter a-z\r\n# $ = Custom Characters\r\n# 0 = Digits 0-9\r\n\r\n# NOTE: Using \"Length\" will override \"Format\"\r\n```\r\n\r\n### prompt\r\n```\r\n#default value / Waits until the user press enter\r\nprompt()\r\n\r\n#Pause until user press any key\r\nprompt(Anykey=True)\r\n\r\n#Add Desired message / Waits until the user press enter\r\nprompt('Hello Kaviyes!')\r\n```\r\n\r\n### currentTime\r\n```\r\n#Using own format\r\ncurrentTime('%H:%M:%S')\r\n\r\n#Printing the results\r\ntime = currentTime('%H:%M:%S')\r\nprint(time)\r\nor\r\nprint(currentTime('%H:%M:%S'))\r\n\r\n#quick preset\r\ncurrentTime(Format_24H=True) # its true by default\r\n```\r\n\r\n### delay\r\n```\r\ndelay(1) # delays for 1 second\r\n\r\nsleep(.25) # delays for 250 miliseconds\r\n```\r\n\r\n### decodeHex\r\n```\r\nx = 68656c6c6f20746865726521\r\ndecodeHex(x, reversed = True)\r\n\r\ndecodeHex(x, reversed = False)\r\n```\r\n\r\n### encodeHex\r\n```\r\nx = \"hello there!\"\r\nencodeHex(x, reversed = True)\r\n\r\nencodeHex(x, reversed = False)\r\n```\r\n\r\n### terminal\r\n```\r\nterminal('echo Hello Kaviyes!') #Outputs Hello Kaviyes! to terminal\r\n```\r\n\r\n### cter\r\n```\r\ncter() # will clear the terminal\r\ncter(\"terminal cleared\")\r\n```\r\n\r\n<br>\r\n\r\n## Notes\r\n\r\nKaviyesutil version **2.0.0** is no longer compatible with older versions.\r\n* This is a completely revamped version, and it is not compatible with older versions due to function changes. It is better to download the old version and use it locally if you want to update to the latest version.\r\n\r\nChanges in the new version **2.0.0** - **2.0.1**:\r\n\r\n**2.0.0**\r\n* Renamed `FancyText` to `printc`.\r\n* Removed `ConvertUnits` and `Today` functions.\r\n* Improved function names.\r\n* General bug fixes and improvements.\r\n\r\n**2.0.1**\r\n* Fixed print bug on `cloakedLink` function.\r\n* Added feature on `cter` to leave message after the terminal is cleared.\r\n\r\n<br>\r\n\r\nCompatibilities:\r\n\r\n Python version: **3.10** minimum\r\n\r\nIDE:\r\n* Visual Studio Code (fully compatible)\r\n* PyCharm & Visual Studio (function description is displayed in raw but still readable)\r\n* Not tested on other IDEs yet\r\n\r\nOS:\r\n* Android (Termux)\r\n* Windows (8.1 and later)\r\n* Linux (Debian and others)\r\n* macOS (10.15 Catalina and later)\r\n\r\nLinks:\r\n* Found a problem [create an issue](https://github.com/Kaviyes/kaviyesutil/issues/new/choose) here!\r\n* Create a [pull request](https://github.com/Kaviyes/kaviyesutil/compare) here!\r\n\r\n<br>\r\n<br>\r\n<br>\r\n<br>\r\n\r\n<p align=\"center\">\r\n  <a href=\"https://github.com/Kaviyes/\">\r\n    <img src=\"https://raw.githubusercontent.com/Kaviyes/kaviyesutil/main/Kaviyes-Text.png\" alt=\"KAVIYES\" width=\"500\"/>\r\n  </a>\r\n</p>\r\n\r\n<br>\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A standard kaviyes utility for python thats ideal for small projects and prototypes.",
    "version": "2.0.1",
    "project_urls": {
        "Homepage": "https://github.com/Kaviyes/kaviyesutil"
    },
    "split_keywords": [
        "utility",
        "toolkit"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bb12d445058838cb3d85c1c276a3df4aabef76bd9553ae42b51ef686d23edc4e",
                "md5": "2e8c043a7ddfb4a2dde71df439ff0217",
                "sha256": "2a4274324733bf5a262a5741a0a18152bf34304c3b5d879b8ee344d02b3c3a3d"
            },
            "downloads": -1,
            "filename": "kaviyesutil-2.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2e8c043a7ddfb4a2dde71df439ff0217",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 11563,
            "upload_time": "2023-11-13T10:40:41",
            "upload_time_iso_8601": "2023-11-13T10:40:41.539958Z",
            "url": "https://files.pythonhosted.org/packages/bb/12/d445058838cb3d85c1c276a3df4aabef76bd9553ae42b51ef686d23edc4e/kaviyesutil-2.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a14c446fa23a217e7c4f25ec7c3cf6ded781e2d0080c17bbca84ecd1ab88a801",
                "md5": "4eb9578a6bb5e00e89d8413a391a0145",
                "sha256": "88ec9bb25ec4f863a0c832a8930d1b56f9d5fee38bdfff1912f9e4a38a7b56b3"
            },
            "downloads": -1,
            "filename": "kaviyesutil-2.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "4eb9578a6bb5e00e89d8413a391a0145",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 9278,
            "upload_time": "2023-11-13T10:40:44",
            "upload_time_iso_8601": "2023-11-13T10:40:44.345773Z",
            "url": "https://files.pythonhosted.org/packages/a1/4c/446fa23a217e7c4f25ec7c3cf6ded781e2d0080c17bbca84ecd1ab88a801/kaviyesutil-2.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-13 10:40:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Kaviyes",
    "github_project": "kaviyesutil",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "kaviyesutil"
}
        
Elapsed time: 0.14275s