Skip to main content

Python's library for protect your files.

Project description

SecuredFiles

PyPI Version License

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.

Installation

You can install SecuredFiles using pip:

pip install SecuredFiles

Usage

Automatic Selection

You can use SecuredFiles in different ways, depending on your needs:

Option 1: Automatic File Selection

Run the following command to automatically handle file locking and unlocking:

python -m SecuredFiles your_file_name

This command will intelligently determine whether to unlock or lock the file based on its current state.

Manual Selection

You can also manually select how to interact with your files in your code:

Option 1: General Usage

import SecuredFiles

file = SecuredFiles.File('path_to_your_file')

The File class will decide whether to lock or unlock the file based on its current state.

Option 2: Secure File Usage

import SecuredFiles

secure_file = SecuredFiles.File.SecureFile('path_to_your_file')

This will open the file as a secure (.lck) file, minimizing the chances of errors.

Option 3: Unsecure File Usage

import SecuredFiles

unsecure_file = SecuredFiles.File.UnsecureFile('path_to_your_file')

This will open the file as an unsecure file without decryption.

Modifying and Saving

Regardless of the chosen option, you can retrieve and modify the data using the .data attribute:

file.data = "some new data"
data = file.data

Make sure to use .save() to push changes back to the file after modification.

Locking and Unlocking

For SecureFile, use .unlock() to unlock the file (which will transform the .lck file and delete it).

For UnsecureFile, use .lock() to lock the file (which will transform the file and delete the non-.lck file).

Both operations will prompt a pop-up asking for confirmation if a file with the same name already exists.

License

This project is licensed under the GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

securedfiles-1.0.0.tar.gz (15.8 kB view hashes)

Uploaded Source

Built Distribution

securedfiles-1.0.0-py3-none-any.whl (16.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page