Overview
SecuredFiles is a Python library that provides a simple and secure way to work with encrypted and unencrypted files. It offers a set of classes that allow you to seamlessly lock and unlock files, making sure your sensitive data remains protected.
How to use
Installation
- Unix/ macOS :
python3 -m pip install --upgrade SecuredFiles
- Windows :
py -m pip install --upgrade SecuredFiles
Library Interface
SecuredFiles offers simple file management.
Declare the file path using SecuredFiles.File(path) and the library will automatically determine whether the file
is a .lck or not.
import SecuredFiles
file = SecuredFiles.File('your/file/path') # SecureFile or UnsecureFile
You can also directly declare the class of your file, but if you declare a file encrypted that is not, or decrypt a file that is, you risk encountering errors.
import SecuredFiles
secure = SecuredFiles.File.SecureFile('your/file/path.lck') # SecureFile
unsecure = SecuredFiles.File.UnsecureFile('your/file/path') # UnsecureFile
.lck files are encrypted files generated by the library, whose key is generated and stored on your computer in the
~/.keys/SecuredFilesKey.key file. File data is always available in clear text using the library as follows:
import SecuredFiles
file = SecuredFiles.File('your/file/path.lck') # SecureFile
print(file.data)
To convert a .lck file to a standard file, do:
import SecuredFiles
file = SecuredFiles.File('your/file/path.lck') # SecureFile
file = file.unlock() # UnsecureFile
To convert a standard file to a .lck file, do:
import SecuredFiles
file = SecuredFiles.File('your/file/path') # UnsecureFile
file = file.lock() # SecureFile
Modifying and Saving
Regardless of the chosen option, you can retrieve and modify the data using the .data attribute:
import SecuredFiles
file = SecuredFiles.File('your/file/path') # SecureFile or UnsecureFile
file.data = "some new data"
data = file.data
file.save()
Make sure to use .save() to push changes back to the file after modification.
Command Line Interface
This library also has a command-line interface.
- Unix/ macOS :
python3 -m SecuredFiles [options] <read | lock | unlock> <filepath>
- Windows :
py -m SecuredFiles [options] <read | lock | unlock> <filepath>
Options:
-h,--help: Display help message and exit.-v,--version: Display the version and exit.
Contributors
Library created by
License
This project is licensed under the GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007.
Metadata
Release files for SecuredFiles 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| securedfiles-1.1.0.tar.gz | 18.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| securedfiles-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.8 kB
Release files / securedfiles-1.1.0.tar.gz
| Download URL | securedfiles-1.1.0.tar.gz |
|---|---|
| Size | 18.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
64a427de95a50af1590581c70e253b79971820160340a8d49b9b59a6f86caaf2
|
|
BLAKE2b-256 checksum How to use checksums |
3bcfd8134bb514586f94b1e0ac747df4ae52ebafad23cef4ece69b89ec4601c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / securedfiles-1.1.0-py3-none-any.whl
| Download URL | securedfiles-1.1.0-py3-none-any.whl |
|---|---|
| Size | 19.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bf49264a96ccdc40a16d60e55721a0e4f72078fcb0da406a4b961abffe03f147
|
|
BLAKE2b-256 checksum How to use checksums |
3aee6add003a301cf15100d3199ab35cd4159daa4cd9e251920ab9e931c75b9d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|