This project was created primarily for educational and learning purposes.
While it is well-structured and could technically be used in production, it is not intended for commercialization.
The main goal is to explore and demonstrate best practices, patterns, and technologies in software development.
- Clone the repository
- Go to the repository folder and execute:
python -m venv venv - Execute in Windows:
venv\Scripts\activate - Execute in Linux/Mac:
source venv/bin/activate - Execute:
pip install -r requirements.txt - Execute:
pip install -r requirements.dev.txt - Execute:
pip install -r requirements.test.txt - Use
python app.pyorpython -m srcto execute the program
- Once you're inside the virtual environment, let's install the hooks specified in the pre-commit. Execute:
pre-commit install - Now every time you try to commit, the pre-commit lint will run. If you want to do it manually, you can run the command:
pre-commit run --all-files
Lockscript is a desktop application built with Python and Tkinter that lets you encrypt and decrypt text files directly from a graphical interface — no terminal knowledge required.
How it works:
The user selects a text file using the built-in file importer. Once a file is loaded, two actions are available: Encrypt and Decrypt. Encryption applies a Caesar-style character shift (+1) to every character in the file, transforming readable text into an unreadable form. Decryption reverses that process (-1), restoring the original content — as long as the file was previously encrypted with this same application.
Key characteristics:
- File-based: works directly on
.txtfiles stored on disk. The encrypted output overwrites (or is saved alongside) the original file. - No external dependencies for core logic: the encryption engine is self-contained and requires no third-party cryptography libraries.
- Error-aware UI: invalid file paths, unsupported formats, or missing selections trigger descriptive dialog popups rather than silent failures, making the experience beginner-friendly.
- Environment-aware: supports
development,production, andtestingconfigurations via a.envfile, enabling clean separation between runtime contexts. - Distributable: the app can be packaged into a standalone executable (
.exeon Windows, binary on Linux/Mac) using PyInstaller, so end users do not need Python installed.
Intended use:
Lockscript is designed as a lightweight, educational tool to demonstrate how a full Python desktop application can be structured — covering UI, service layer, error handling, configuration management, testing, linting, and build pipelines — all within a single cohesive project.
- Python >= 3.11
- Tkinter
python-dotenv==1.0.1
pre-commit==4.3.0
pip-audit==2.7.3
ruff==0.11.12
pytest==8.4.2
pytest-env==1.1.5
pytest-cov==4.1.0
pytest-timeout==2.3.1
pytest-xdist==3.5.0
pyinstaller==6.16.0
https://www.diegolibonati.com.ar/#/project/lockscript
- Go to the repository folder
- Execute:
python -m venv venv - Execute in Windows:
venv\Scripts\activate - Execute in Linux/Mac:
source venv/bin/activate - Execute:
pip install -r requirements.txt - Execute:
pip install -r requirements.test.txt - Execute:
pytest --log-cli-level=INFO
You can generate a standalone executable (.exe on Windows, or binary on Linux/Mac) using PyInstaller.
- Go to the repository folder
- Activate your virtual environment:
venv\Scripts\activate - Install build dependencies:
pip install -r requirements.build.txt - Create the executable:
pyinstaller app.spec
Alternatively, you can run the helper script: build.bat
- Go to the repository folder
- Activate your virtual environment:
source venv/bin/activate - Install build dependencies:
pip install -r requirements.build.txt - Create the executable:
pyinstaller app.spec
Alternatively, you can run the helper script: ./build.sh
You can check your dependencies for known vulnerabilities using pip-audit.
- Go to the repository folder
- Activate your virtual environment
- Execute:
pip install -r requirements.dev.txt - Execute:
pip-audit -r requirements.txt
ENVIRONMENT: Defines the application environment. Acceptsdevelopment,production, ortesting.
ENVIRONMENT=development
None at the moment.