Skip to main content

utility package designed to detect sensitive

Project description

Sensitive Data Guard Utility

Overview

This repository contains a utility package designed to detect sensitive information or secrets in a given text content. The utility takes a text file as input, either specified by path or content as a string, and returns true or false based on the detection of any sensitive information. Usage

To use the utility, follow these steps:

Install the package:

pip install sensitive_data_guard

Import the detector in your Python script or application:

from sensitive_data_guard import detect_info

Use the detector with a file path or content string:

    result = detect_info("path/to/your/file.txt")
    print(result)  # True if sensitive information is found, False otherwise

Configuration

The detection is based on known patterns configured in the config.yaml file included in the utility package. Example patterns include strings starting with SECRET_, ending with _KEY, _PASSWORD, and more. Users can customize patterns in the configuration file. Testing

Ensure the utility works as expected by running test cases using pytest. Install pytest first if not already installed:

pip install pytest

Run tests:

pytest

Code Hygiene

The code follows the Black formatting style, and pre-commit hooks are set up to ensure code hygiene. Install pre-commit:

pip install pre-commit

Set up pre-commit hooks:

pre-commit install

This ensures that code formatting is checked before every commit. Building and Releasing Build the Package Locally

To build the package locally, use the following command:

python setup.py sdist bdist_wheel

This creates the distribution package in the dist directory.

Release to PyPI

To release the package to the PyPI repository, use twine. Install twine if not already installed:

pip install twine

Upload the distribution package to PyPI:

twine upload dist/*

Automate Release with GitHub Actions

The repository is set up with GitHub Actions to automate the release process. Whenever a pull request is merged into the main branch, a new package version is created and released on PyPI.

Contribution

Feel free to contribute to this project by submitting issues or pull requests. Your feedback and contributions are highly appreciated!

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

pkgLavanya-0.1.14.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pkgLavanya-0.1.14-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file pkgLavanya-0.1.14.tar.gz.

File metadata

  • Download URL: pkgLavanya-0.1.14.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.5

File hashes

Hashes for pkgLavanya-0.1.14.tar.gz
Algorithm Hash digest
SHA256 63c407fbea04ef5f5a7a85e4b4db0ad5a303611ff1a27149332598b23031c0d7
MD5 9f022f39f1dd1824138a81e38c0ce654
BLAKE2b-256 a7c0f36c14d9c157c5f0fc35428d7f4ab31b1ecb13e3a9dda76c83b1fdafcf74

See more details on using hashes here.

File details

Details for the file pkgLavanya-0.1.14-py3-none-any.whl.

File metadata

  • Download URL: pkgLavanya-0.1.14-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.5

File hashes

Hashes for pkgLavanya-0.1.14-py3-none-any.whl
Algorithm Hash digest
SHA256 84b94d7538bc9d51b12e4f244a0c572f07477e0b85cc8f0242158358fe57b059
MD5 79d45cbcad5d2c3d721c484866ad3d4a
BLAKE2b-256 a440c328909bee4273c049a0abaeb86fcdf4f1f18b9069cc1f2e24d1de9cf268

See more details on using hashes here.

Supported by

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