Python module with various features! Install with the below command!
pip install dankware
pip install dankware[extras]
Update to the latest version with the below command!
pip install --upgrade dankware
🚨 Multithreading 🚨
from dankware import multithread
import time
a = 0defexample():
global a
a += 1print(a)
time.sleep(5)
multithread(example, 10) # func: example | threads: 10 | single: 50 seconds | multi: 5 seconds
from dankware import multithread
import time
new_list = [1, 2, 3, 4, 5]
sum = 0defexample(num):
globalsumsum += num
time.sleep(5)
multithread(example, 10, new_list) # input_one: listprint(sum)
import os
from dankware import export_registry_keys
# [NOTE]: this function requires admin privileges!
export_path = "D:\\export.reg"
registry_root = r'HKEY_CURRENT_USER'
registry_path = r'Software\Google\Chrome\PreferenceMACs'#export_path = os.path.join(os.environ['USERPROFILE'], 'Desktop', 'export.reg')
export_registry_keys(registry_root, registry_path, recursive=True, export_path=export_path)
🚨 Splash Screen 🚨
from dankware.pillow import splash_screen
#from dankware import hide_window, show_window# Supports: GIFs / PNGs / JPGs / BMPs / ICOs# hide_window()
splash_screen("D:\\splash.gif", duration=5) # runs on main thread# show_window()
from dankware.pillow import splash_screen
from concurrent.futures import ThreadPoolExecutor
ThreadPoolExecutor(1).submit(splash_screen, "splash.png", 5)
# runs on separate thread
🚨 Error Traceback 🚨
import sys
from dankware import err, clr
try: value = 1/0except: print(clr(err(sys.exc_info()),2))
try: value = 1/0except: print(clr(err(sys.exc_info(),"mini"),2))
🚨 Scraping 🚨
from dankware import github_downloads
# full url > https://api.github.com/repos/EssentialsX/Essentials/releases/latestfor url in github_downloads("EssentialsX/Essentials"): print(url)
from dankware import github_file_selector
# full url > https://api.github.com/repos/EssentialsX/Essentials/releases/latestfor url in github_file_selector("EssentialsX/Essentials", "remove", ('AntiBuild', 'Discord', 'GeoIP', 'Protect', 'XMPP')): print(url)
🚨 Generate Random IPs 🚨
from dankware import random_ip
print(random_ip())
🚨 GUI File / Path Selector 🚨
from dankware.tkinter import file_selector
path = file_selector() # opens file explorer to select a fileprint(path)
from dankware.tkinter import folder_selector
path = folder_selector() # opens file explorer to select a folderprint(path)
🚨 Path Extractor 🚨
import os
from dankware import get_path
if os.name == 'nt': # extracts path from registry
locations = ("AppData", "Desktop", "Documents", "Favorites", "Local AppData", "Pictures", "Videos", "Music")
elif os.name == 'posix':
locations = ("Desktop", "Documents", "Downloads", "Pictures", "Videos", "Music")
for location in locations:
path = get_path(location)
print(path)
🚨 Colour Special Characters 🚨
from dankware import clr
# default preset = 1# default colour_one = white_bright# default colour_two = red_brightprint(clr("\n > Hey! Long time no see :)"))
#print(clr("\n > Hey! Long time no see :)", colour_one = white_bright, colour_two = red_bright))
from dankware import clr, white, magenta
# default preset = 1# colour_one = magenta# colour_two = whiteprint(clr("\n > Hey! Long time no see :)", colour_one = magenta, colour_two = white))
from dankware import clr
print(clr("\n This is a string: True | This is an integer: False"))
from dankware import clr, green, magenta, white
# default colour_one = white_bright# colour_two = greenprint(clr(f"\n > {magenta}Purple{white} thinks he's better than everyone else :(", colour_two=green))
from dankware import clr
# preset = 2print(clr("\n > Error in sector [7] redirecting... | INTEGRITY_CHECK: SUCCESS",2))
from dankware import clr
# preset = 3print(clr("\n > Is this a randomly coloured string: TRUE | As you can see it does not colour True/False",3))
from dankware import clr, white, white_normal, white_dim, red, red_normal, red_dim
# preset = 3print(clr("\n > This is a randomly coloured string based on the input colours!",3,colours=(white_bright, white_normal, white_dim, red_bright, red_normal, red_dim)))
We found that dankware demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.