With the help of the library pyaescrypt this program can encrypt and decrypt your files. I also used Path from library pathlib to give the encrypted/decrypted file the filename of the original file.
Copy the file to be encrypted/decrypted to the folder files. If you need to encrypt the file, then comment out the code below #decrypt . If you need to decrypt the file, then comment out the code between # encrypt and #decrypt.