Skip to main content

Python package with various features!

Project description

~ Visits ~

~ Stats ~

🚨 dankware 🚨

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 = 0
def example():
    global a
    a += 1
    print(a)
    time.sleep(5)
        
multithread(example, 10) # func: example | threads: 10 | single: 50 seconds | multi: 5 seconds

image

from dankware import multithread
import time

new_list = [1, 2, 3, 4, 5]
sum = 0

def example(num):
    global sum
    sum += num
    time.sleep(5)

multithread(example, 10, new_list) # input_one: list
print(sum)

image

from dankware import multithread
import time

list1 = [1, 2, 3, 4, 5]
list2 = [5, 4, 3, 2, 1]

def example(num1, num2):
    print(num1 + num2)
    time.sleep(5)

multithread(example, 10, list1, list2) # input_one: list1 | input_two: list2

image

from dankware import multithread
import time

new_list = [1, 2, 3, 4, 5]

def example(num1, num2):
    print(num1 * num2)
    time.sleep(5)

multithread(example, 10, new_list, 5, progress_bar=False) # input_two: 5 | disabled progress bar

image

 


🚨 Export Registry Keys 🚨

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)
image image

 


🚨 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

image

🚨 Error Traceback 🚨

import sys
from dankware import err, clr
try: value = 1/0
except: print(clr(err(sys.exc_info()),2))
try: value = 1/0
except: print(clr(err(sys.exc_info(),"mini"),2))

image
image

 


🚨 Scraping 🚨

from dankware import github_downloads
# full url > https://api.github.com/repos/EssentialsX/Essentials/releases/latest
for url in github_downloads("EssentialsX/Essentials"): print(url)

image

from dankware import github_file_selector
# full url > https://api.github.com/repos/EssentialsX/Essentials/releases/latest
for url in github_file_selector("EssentialsX/Essentials", "remove", ('AntiBuild', 'Discord', 'GeoIP', 'Protect', 'XMPP')): print(url)

image

 


🚨 Generate Random IPs 🚨

from dankware import random_ip
print(random_ip())

image

 


🚨 GUI File / Path Selector 🚨

from dankware.tkinter import file_selector
path = file_selector() # opens file explorer to select a file
print(path)
from dankware.tkinter import folder_selector
path = folder_selector() # opens file explorer to select a folder
print(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)

image

 


🚨 Colour Special Characters 🚨

from dankware import clr
# default preset = 1
# default colour_one = white_bright
# default colour_two = red_bright
print(clr("\n  > Hey! Long time no see :)"))
#print(clr("\n  > Hey! Long time no see :)", colour_one = white_bright, colour_two = red_bright))

image

from dankware import clr, white, magenta
# default preset = 1
# colour_one = magenta
# colour_two = white
print(clr("\n  > Hey! Long time no see :)", colour_one = magenta, colour_two = white))

image

from dankware import clr
print(clr("\n  This is a string: True | This is an integer: False"))

image

from dankware import clr, green, magenta, white
# default colour_one = white_bright
# colour_two = green
print(clr(f"\n  > {magenta}Purple{white} thinks he's better than everyone else :(", colour_two=green))

image

from dankware import clr
# preset = 2
print(clr("\n  > Error in sector [7] redirecting... | INTEGRITY_CHECK: SUCCESS",2))

image

from dankware import clr
# preset = 3
print(clr("\n  > Is this a randomly coloured string: TRUE | As you can see it does not colour True/False",3))

image

from dankware import clr, white, white_normal, white_dim, red, red_normal, red_dim
# preset = 3
print(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)))

image

 


🚨 Banners 🚨

banner = '''

     888                   888                                             
     888                   888           s i r . d a n k ' s               
     888                   888                                             
 .d88888  8888b.  88888b.  888  888 888  888  888  8888b.  888d888 .d88b.  
d88" 888     "88b 888 "88b 888 .88P 888  888  888     "88b 888P"  d8P  Y8b 
888  888 .d888888 888  888 888888K  888  888  888 .d888888 888    88888888 
Y88b 888 888  888 888  888 888 "88b Y88b 888 d88P 888  888 888    Y8b.     
 "Y88888 "Y888888 888  888 888  888  "Y8888888P"  "Y888888 888     "Y8888  

'''

♦️ Colourize Banner (random) ♦️

from dankware import clr
# preset = 4
print(clr(banner,4))

image

♦️ Align Banner (console center) ♦️

from dankware import align
print(align(banner)) # also works with single text line (even coloured)

image

♦️ Align Coloured Banner ♦️

from dankware import align, clr
print(clr(align(banner),4)) # OR (preferably not) print(align(clr(banner,4)))

image

 


🚨 Gradient Reworked [ Originally By @venaxyt ] 🚨

from dankware import fade
banner = '''

                              888 d8b                   888    
       v e n a x y t ' s      888 Y8P                   888    
                              888                       888    
 .d88b.  888d888 8888b.   .d88888 888  .d88b.  88888b.  888888 
d88P"88b 888P"      "88b d88" 888 888 d8P  Y8b 888 "88b 888    
888  888 888    .d888888 888  888 888 88888888 888  888 888    
Y88b 888 888    888  888 Y88b 888 888 Y8b.     888  888 Y88b.  
 "Y88888 888    "Y888888  "Y88888 888  "Y8888  888  888  "Y888 
     888                                                       
Y8b d88P                                                       
 "Y88P"                                                        


'''

♦️ Black To White ♦️

print(fade(banner, "black2white"))
print(fade(banner, "black2white-v"))

image image

♦️ Yellow To Red ♦️

print(fade(banner, "yellow2red"))
print(fade(banner, "yellow2red-v"))

image image

♦️ Green To Yellow ♦️

print(fade(banner, "green2yellow"))
print(fade(banner, "green2yellow-v"))

image image

♦️ Green To Cyan ♦️

print(fade(banner, "green2cyan"))
print(fade(banner, "green2cyan-v"))

image image

♦️ Blue To Cyan ♦️

print(fade(banner, "blue2cyan"))
print(fade(banner, "blue2cyan-v"))

image image

♦️ Blue To Pink ♦️

print(fade(banner, "blue2pink"))
print(fade(banner, "blue2pink-v"))

image image

♦️ Pink To Red ♦️

print(fade(banner, "pink2red"))
print(fade(banner, "pink2red-v"))

image image

♦️ Random ♦️

print(fade(banner, "random"))

image

 


🚨 Also check out 🚨

image

 


🚨 Wallpapers 🚨

♦️ Style 1 ♦️


image


♦️ Style 2 ♦️


image


♦️ Style 3 ♦️


image


♦️ Style 4 ♦️


image


 


🚨 Stats 🚨


image


🚨 Star History 🚨

Star History Chart

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dankware-3.6.4.tar.gz (34.2 kB view details)

Uploaded Source

Built Distribution

dankware-3.6.4-py3-none-any.whl (32.3 kB view details)

Uploaded Python 3

File details

Details for the file dankware-3.6.4.tar.gz.

File metadata

  • Download URL: dankware-3.6.4.tar.gz
  • Upload date:
  • Size: 34.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for dankware-3.6.4.tar.gz
Algorithm Hash digest
SHA256 ba9d606c7e1f6af636e1c587b6dd2a7e1a10089977148ab6d9e00279d79fcfc1
MD5 2bce5c384f8b818c27c0aa94596966cd
BLAKE2b-256 272f2d61b952199d1f90bc8bd7d806911e7820fd7b3cf21db59c0e8c1ee56acb

See more details on using hashes here.

File details

Details for the file dankware-3.6.4-py3-none-any.whl.

File metadata

  • Download URL: dankware-3.6.4-py3-none-any.whl
  • Upload date:
  • Size: 32.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for dankware-3.6.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8b8189eae19b010c1d1a0ce3b067ac61a0f4db6aff738f5451f2963ddf2eb78f
MD5 e7ef82b299c2978bb4b889650aad96e9
BLAKE2b-256 5661ea54547a2063da2b549921631d7d34750bbba8c983a1e96052653893567b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page