Many file formats support encryption with a password. John the Ripper can crack these passwords with dictionary attack.
This article teaches you to obtain Jumbo version and compile it. Finally, you'll test your environment by cracking a ZIP archive password. A sample password protected ZIP file is provided with this article.
Access your Python dict with a dot
Using just built-in standard libraries
>>> sn = SimpleNamespace(**d)
Systems don't store original passwords, they store hashes. They look like this "f2477a144dff4f216ab81f2ac3e3207d". Hashing is a one way function, so you can't turn it back to password.
But you can make computer try every word in the dictionary, and tell if one matches. This article shows you how to do this with hashcat.