A python module for small things; so you don't have to reinvent the wheel
A python module; when you don't want to reinvent the wheel. Mainly for beginners for Python. Vanadium contains many different functions that beginners would search for, such as how to send an email or download something or a webpage from the internet. All of this is accessible easily, and enables threading inside the vanadium module.
If your version is outdated and is missing features, read:
Update 0.0.2 is currently being fixed. Minor builds will be released. To install,
pip install vanadium==0.0.2.x
Python 3.6 is supported. Only tested on Windows.
To install vanadium, you need pip; which is most likely already installed along with Python.
- Open Command prompt (search 'cmd')
pip install vanadium
There are a variety of modules you'll need to install if
pip doesn't install them.
First of all, you'll need to import vanadium. As the name is long, you can do:
import vanadium as vdm
If the module imports normally without errors, you're ready to use it.
Here is a full list and explanation of each function and class.
Hashes supported in the module:
- 5 sha256 sha224 ripemd160 blake2b blake2s sha512
- blake2b [needs key and digest_size]
- blake2s [needs key and digest size]
Use vdm.genCode instead. Supports characters, sizes and lengths.
Possibility of deprecation
Generates a number code with 5 letters, and a
- in between. This will repeat for your length. Example:
>>> print(vdm.generate(3).code) 1778-6851-8069
Deprecation Notice: This feature has been removed since 0.0.2. Use dm.getoutput(command, isShell=True) nstead. Gets the output of a command, like in subprocess. There will not be a console and to get the output, use .command. Example:
output = vdm.get_output('net view').command very long output
__Deprecation Notice: Replaced with vdm.vwindow() instead.__ Gets the current foreground/active window. Name of the window is saved to .command. Example:
>>> foreground = vdm.getforeground().window ''*Python 3.6.5 Shell*'
by is optional. It joins a list and converts it to a string. String is at .string. Example:
>>> list = ['hello', 'there'] >>> print(vdm.joinlist(list).string) 'hello there'
Gets the windows version the user is running. Takes time to intiate. Example:
>>> ver = vdm.winver() >>> ver.osname Microsoft Windows 8.1 >>> ver.version 6.3.9600 N/A Build 9600
More features could be supported in future versions.
Read the license file
Forces a Blue Screen Of Death. Requires elevation and user confirmation through a dialog. Use for experimental purposes
vdm.unzip(file_path, extract_to, extension, pw=None [Optional])
Unzips a file. Currently supports .zip and .rar. Extract_to should be the directory it will extract to.
Enter the extension of the file, either
.rar. If the rar file requires a password, you can add the extra argument
vdm.unzip('documents.rar', 'stuff/documents/', '.rar', pw='SuperSecretPassword321')
vdm.notify(title, content, icon=None, duration=5)
Creates a notification. Looks best in Windows 10. title is the title of the notification. Content is the body. If you would like to specify an icon to go with it, enter the path of it in
icon=. To set the duration of the notification, add
vdm.notify('Reminder', 'Take cat out of freezer', icon='C:/Meow.ico', duration=4)
vdm.sequence(expression, length, string=True)
Generates a sequence based on the expression. You need to choose a length (integer). If you want it to generate in integers, add the extra argument
n as the term. Example:
>>> vdm.sequence('4n + 4', 10, string=False` [8, 12, 16, 20, 24, 28, 32, 36, 40, 44]
Gets the current position of the mouse. Quite simple. Example:
Doing this manually can be hard, finding the handler by searching through countless windows. This will simplify it and require just a window name. This will bring a window to the front (foreground/active window). Example:
vdm.bringWindow('Python 3.6.5 Shell')
Created for the vdm.elevate() command. Can be used, though.
True if the user is admin. Returns
False if not. Example:
if vdm.isAdmin(): print("Hello Admin!") else: print("ew where's the admin")
Created for the vdm.elevate() command. Cannot be used. If you want to elevate your program, use vdm.elevate() Runs as admin
Elevates the program to administrator privileges. Uses a UAC Prompt so the user needs to enter their password. If you want, here's an example:
Adds or removes a file attribute. For args, use this format:
+ to Set an attribute
- to clear an attribute
S System ffile
vdm.fileattrib('myfile.png', '+H') #This will hide the file vdm.fileattrib('myfile.png', '-R') #This will remove the "Read only" attribute vdm.fileattrib('*.*', '+H') #Hides all files with all extensions.
To apply this to a bunch of files, use a list.
Returns the python version. It would look something like
"Python 3.6.5". Example:
>>> if vdm.pyversion() == 'Python 3.6.5': ... print("Supported by Vanadium") ... else: ... print("Not supported by Vanadium :(") ... Supported by Vanadium
Gets the output of a command, default is shell. No console windows opening, and it's quick.
command must be string. Example:
users = vdm.getoutput('net user')
vdm.genCode(size=5, length=3, chars=None, sep='-')
Optionally, you can just use
vdm.genCode(), but you can customize it.
size is the amount of characters. Length is the amount of
of groups of characters. You can specify which characters to use in
chars=, and a seperator. Default characters is
string.ascii_uppercase + string.digits. Example:
>>> vdm.genCode() 'H0BO1-ORDTK-Q9XQG' >>> vdm.genCode(size=3, length=5, chars=string.ascii_uppercase + string.digits, sep=' ') 'AG3 R3C M7Q VIS 0VB'
vdm.hashfile(file_path, hash, key=None, digest_size=None)
Gets the hash of a file. Multiple hashes are supported. See the top for the list. digest_size is the length of the ciphered text.
vdm.hashfile('pewpew.exe', 'blake2b', key='souperpassword', digest_size=12)
vdm.hash(string, hash, key=None, digest_size=None)
Gets the hash of a string. Multiple hashes are supported. See the top for the list. digest_size is the length of the ciphered text.
vdm.hash('fbiopenup', 'blake2s', key='closedown', digest_size=16)
Uses threading to download a file without waiting. Example:
Downloads a file from the internet, but waits until completed. Example:
vdm.cfile(file_path, body=None, modify_type='w')
Creates an empty file. If you want to create a file with text, enter the Body in string. Example:
vdm.email(username, password, recipient, subject, body)
Sends an email from the account you enter to the recipient, and uses the subject and body. Only gmail (google) is supported. No other information will be sent anywhere without you specifying, and the variables are not used anywhere except the email function. The only purpose is to simplify the process of sending emails and condense it from 7 lines to one. Example:
vdm.email('firstname.lastname@example.org', 'MyPassword123', 'email@example.com', 'Subject', 'Hello sendto!')
Deprecation Notice: This feature has been deprecated since 0.0.2. Use vdm.pyversion() instead.
If the person is running Python 3 (At the moment this seems quite useless, so in a future update it will differentiate between different python versions such as 3.6 and 3.7) it will return
print("Running python 3")
Encodes a plaintext string depending on the key. This is a somewhat secure way of storing passwords but there are better algorithms which will be added in a future update, if not existing. Example:
password = vdm.encode('Password123', 'key321')
Decodes an encoded string based on the key. The key must be correct. Example:
vdm.decode('wrnDnsOVw6XCicOkwpLDnsOYwpbDjMOnw51Aw5zDp8Oiw4bDpA==', 'very true')
Hashes are not supported here :(
Must be the absolute file path. This will compare 2 files very quickly and will return
True if they are exactly the same. Example:
if vdm.comparefile('notavirus.exe', 'virus.exe'): print("o noes")
Quite simple; gets the file path of the file that it is executing on. Exactly the same as
__file__ except it doesn't use it. This will be compatible with frozen programs (compiling programs to exe with py2exe, pyinstaller, cx_freeze) and that's basically the use.
print("You are running from " + vdm.filepath()) #The last part will print the file path including the file, in string
vdm.writetofile(file_path, body, modify_type [optional])
Write a line, or multiple lines to an existing file, with enough permissions. You must specify what to type in the second argument, and if you want you can choose to append ('a') or overwrite ('w').
Append: Add on
Overwrite: Remove everything from the file and write new information
vdm.writetofile('Todolist.txt', 'Put cat in the freezer', 'a') #Appending
vdm.writetofile('highscore.stats', '604', 'w') #Overwriting
Reload a module if, for example, the code was changed. Make sure you do not add strings, and just type the normal module name. Example:
Get the mean/average of a list of integers. You can optionally create a list if it is easier for you to understand. Examples:
list = [1, 2, 3, 5,] #Creating a list to be used average = vdm.average(list)
average = vdm.average([1, 2, 3, 5])
To prevent adding more arguments to other functions within the vanadium module to keep it simple, there is, instead, a new function which can just do it for you.
sfunction will call a function without waiting. This uses threading, and so you should be a bit careful with this. Functions should be in strings, and you shouldn't add the
vdm. when using this. Example:
vdm.sfunction('average', [1, 2, 3, 4, 5, 6, 7, 10])
The first argument is
average, which is
vdm.average(). The second argument is a list of numbers that will be used. See the one above for more information on
This probably wont be very useful inside programs but it could be -- it's more of just getting stuff. This will get the Python Library File, where all the modules are kept. Example:
>> print(vanadium.libfile()) C:/Users/USERNAME/AppData/Local/Programs/Python/Python36-32/lib/
Just a quick note: Please read the
LICENSE file. Do not use this for malicious purposes.
Can delete a file or files. To delete a file, just specify a file path, like this:
To delete a bunch of files, create a list with all the file paths/names in them, like this:
files = ['passwords.txt', 'creditcards.txt', 'highschoolpicture.png'] vdm.delfile(files)
vdm.delfile(['passwords.txt', 'creditcards.txt', 'highschoolpicture.png'])
If you would like to securely delete files so they can't be recovered, you can add the extra argument
secure=True. This is irreversible.
True if the user is an admin. Returns
False if otherwise. Example:
if vdm.isadmin(): print("You can use this program.") else: print("You are not an administrator.")
- Fixed updates on PyPi
- Changed getforeground() to vwindow()
- Added functions to vwindow
- Added winver(). Gets the windows OS Name and Version
- Added bsod() | Please read the license, forces a Blue Screen of Death with user permission
- Added unzip. Unzips a file, .rar and .zip supported only
- Added notify. Uses toast to create a notification. Looks better on Windows 10
- Added sequence. Generates a sequence based on a equation. Doesn't support powers
- Added mousepos. Returns the mouse position.
- Added bringWindow. Brings a window to foreground, without specifying handlers and stuff.
- Added isAdmin. This is for the elevate() command.
- Added runAsAdmin. This is for the elevate() command.
- Added elevate. Elevates the permissions of the running program with UAC Prompt. Supports IDLE too.
- Updated delfile. Added secure deletion to completely get rid of files, but takes long.
- Added fileattrib. Changes the attributes of files.
- Added pyversion. Successor to python3(). Gets the exact python version.
- Updated getoutput. Changed from class to function, and gets output. Extra argument "isShell=True"
- Added genCode. Successor to generate, although generate is still available. Generates a code with a custom simze, custom length and custom characters. If chars are not specified, it will generate numbers and letters.
- Updated hash file. Supports multiple hashes, includes argument for key and digest size.
- Added hash. Hashes a string, supports multiple hashes, includes arguments for key and digest size.
- Updated get_output. Faster and simpler, and supports shell.
- Rewritten isAdmin() to support runAsAdmin(), to help with elevate(). Use
- Issues templates and suggestions. Please contribute to Vanadium :D
- Added basically everything
Todo [Updated only on GitHub]
- Add power support for sequence
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size vanadium-0.0.2.4-py3-none-any.whl (14.4 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size vanadium-0.0.2.4.tar.gz (18.6 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for vanadium-0.0.2.4-py3-none-any.whl