Skip to content

Commit

Permalink
Improve read for config
Browse files Browse the repository at this point in the history
  • Loading branch information
Joaopeuko committed May 5, 2024
1 parent 9832386 commit a76ec72
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- [Usage](#usage)
- [Example 1: Basic Usage](#example-1-basic-usage)
- [Example 2: Custom Usage](#example-2-custom-usage)
- [Example 3: Config Usage](#example-3-config-usage)
- [Features](#features)

Secure your Python data structures and secrets with Secured. This package provides a straightforward solution for obscuring sensitive data in applications. It's specifically designed for developers who need to protect API keys, database credentials, and other critical configuration details from accidental exposure. Featuring customizable security measures, our tool allows you to control how sensitive information is represented and managed securely. It's ideal for projects that demand high data confidentiality and integrity. Please note that this provides a thin layer of protection.
Expand Down Expand Up @@ -54,6 +55,21 @@ secure_api_key = Secure(API_KEY, "API Key Protected")
print(secure_api_key) # Output: API Key Protected
```

### Example 3: Config Usage

The `Secured` class allows you to securely read configuration files containing sensitive data. Here's how you can use it:

```python
from secured.secured import Secured

# Create a Secured object to read a YAML configuration file
secured = Secured('config.yaml', secure=True)

# Access configuration attributes securely
print(secured.config.name) # Using dot notation
print(secured.config["name"]) # Using dictionary-like notation
```

## Features

- **Data Protection**: Helps prevent the accidental logging or display of sensitive information.
Expand Down

0 comments on commit a76ec72

Please sign in to comment.