Skip to content

afif-dev/py-file-folder-encrypt-cli

Repository files navigation

Py File & Folder Encrypt CLI App

Encrypt & decrypt file or folder

CLI app included in distribution folder (dist/py-encrypt-cli.exe)

Basic Usage

  1. Help
py-encrypt-cli -h
  1. Generate file "filekey.key" with key (required)
py-encrypt-cli -gk true
  1. Encrypt file from ./csv-files-sample folder
py-encrypt-cli "../csv-files-sample/timezone.csv" -pt file -et encrypt
  • App generate new encrypted file: ../csv-files-sample/timezone_5cocx5L9XKJ47g.csv
  1. Decrypt file
py-encrypt-cli "../csv-files-sample/timezone_5cocx5L9XKJ47g.csv" -pt file -et decrypt
  1. Encrypt folder ./csv-files-sample
py-encrypt-cli "../csv-files-sample" -pt folder -et encrypt
  • App generate new encrypted zip file: ../csv-files-sample_MVWiuJ7UvCEYTg.zip
  1. Decrypt folder (zip file)
py-encrypt-cli "../csv-files-sample_MVWiuJ7UvCEYTg.zip" -pt folder -et decrypt

Setup for Local Development

  1. Creating a virtual environment
py -m venv venv
  1. Activate the environment
.\venv\Scripts\activate
  1. Install all of the packages using requirements.txt
pip install -r requirements.txt
  1. Run cli application
py py-encrypt-cli.py -h
  1. Generate file "filekey.key" with key (required)
py py-encrypt-cli.py -gk true
  1. Build cli output (more refer to : https://pyinstaller.org/en/stable/usage.html)
pyinstaller py-encrypt-cli.spec
  1. Export a list of all installed packages (Optional)
pip freeze > requirements.txt
  1. Leaving the environment
deactivate

Reference Links