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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file securedfiles-1.0.0.tar.gz.

File metadata

  • Download URL: securedfiles-1.0.0.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for securedfiles-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8e78460784f163593dc85566df37b4cd0cff1ab6222b37def858e559556c2b58
MD5 2fb514077ea2fb66af88c8fa0e05afbb
BLAKE2b-256 5712ac1c68908d903c29db62d82157f156eddf04c58b7a38709fde1c6cca8ce6

See more details on using hashes here.

File details

Details for the file securedfiles-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: securedfiles-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for securedfiles-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8fb3f1c47185ad10321d61fa14731fd3640467267957cd9c435fe5bcff2270e9
MD5 3c01fb46b4f2e4a2b604d243a2e8b93d
BLAKE2b-256 4cb7715bc3a1b3bc31fda58fb9d8c3ba018d8e7f10ffb67b58de21631307f060

See more details on using hashes here.

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