diff --git a/README.md b/README.md index 7802f1e..f2eda1e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ +![PyPI - Downloads](https://img.shields.io/pypi/dm/secured) +![PyPI](https://img.shields.io/pypi/v/secured) +![PyPI - Wheel](https://img.shields.io/pypi/wheel/secured) +![PyPI - License](https://img.shields.io/pypi/l/secured) + # Secured - [Secured](#secured) diff --git a/examples/examples.py b/examples/examples.py index 82a7b55..4dd288b 100644 --- a/examples/examples.py +++ b/examples/examples.py @@ -10,3 +10,4 @@ ad['password'] = 'my_secret' print((ad.password)) print((ad['password'])) +print(ad.password == "my_secret") diff --git a/secured/secure.py b/secured/secure.py index 907da94..d65c092 100644 --- a/secured/secure.py +++ b/secured/secure.py @@ -1,23 +1,8 @@ +from typing import Union -class Secure(str): - """ - A class for securing sensitive data. - - This class is designed to add a thin layer of protection by obscuring sensitive data, such as database URLs or API keys, - in order to prevent accidental exposure in logs or debug output. The representation of the secured data can be customized - with a specific message. - - Attributes: - message: Custom message to represent the secured data when printed or logged. - Example: - >>> DATABASE_URL = "your_actual_database_url" - >>> sensitive_data = Secure(DATABASE_URL, "