{"id":29690326,"url":"https://github.com/joaopeuko/secured","last_synced_at":"2025-07-23T06:07:00.571Z","repository":{"id":236541122,"uuid":"786934607","full_name":"Joaopeuko/secured","owner":"Joaopeuko","description":"Secure your Python data with Secured. This tool protects sensitive information like API keys and database credentials, offering customizable settings for high confidentiality and integrity. Note: Provides a thin layer of protection.","archived":false,"fork":false,"pushed_at":"2025-01-02T09:05:13.000Z","size":124,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-02T10:22:34.623Z","etag":null,"topics":["configuration-management","environment-variables","security","security-tools"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Joaopeuko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-15T15:23:40.000Z","updated_at":"2025-01-02T09:05:10.000Z","dependencies_parsed_at":"2024-07-11T10:25:53.780Z","dependency_job_id":"59548adc-8931-4524-965b-affdacbe19d2","html_url":"https://github.com/Joaopeuko/secured","commit_stats":null,"previous_names":["joaopeuko/secured"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/Joaopeuko/secured","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Joaopeuko%2Fsecured","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Joaopeuko%2Fsecured/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Joaopeuko%2Fsecured/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Joaopeuko%2Fsecured/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Joaopeuko","download_url":"https://codeload.github.com/Joaopeuko/secured/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Joaopeuko%2Fsecured/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266626115,"owners_count":23958344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["configuration-management","environment-variables","security","security-tools"],"created_at":"2025-07-23T06:06:59.925Z","updated_at":"2025-07-23T06:07:00.555Z","avatar_url":"https://github.com/Joaopeuko.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![PyPI - Python Version](https://img.shields.io/pypi/pyversions/secured)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/secured)\n![PyPI](https://img.shields.io/pypi/v/secured)\n[![codecov](https://codecov.io/gh/Joaopeuko/secured/graph/badge.svg?token=W5MF118U50)](https://codecov.io/gh/Joaopeuko/secured)\n![PyPI - Wheel](https://img.shields.io/pypi/wheel/secured)\n![PyPI - License](https://img.shields.io/pypi/l/secured)\n\n# Secured\n\n- [Secured](#secured)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [Example 1: Basic Usage](#example-1-basic-usage)\n    - [Example 2: Custom Usage](#example-2-custom-usage)\n    - [Example 3: Config Usage](#example-3-config-usage)\n    - [Example 4: Compose](#example-4-compose)\n  - [Features](#features)\n\nSecure 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.\n\n## Installation\n\nTo install Secured, run the following command:\n\n```python\npip install secured\n```\n\n## Usage\n\nBelow are some examples on how to use Secured to protect your sensitive data:\n\n### Example 1: Basic Usage\n\n```python\nfrom secured import Secure\n\n# Protect a sensitive string\nDATABASE_URL = \"mysql://user:password@localhost/dbname\"\nsecure_database_url = Secure(DATABASE_URL, \"\u003cData Hidden\u003e\")\n\n# Usage in code\nprint(secure_database_url)  # Output: \u003cData Hidden\u003e\n```\n\n### Example 2: Custom Usage\n\n```python\nfrom secured import Secure\n\n# Protect an API key with a custom message\nAPI_KEY = \"12345-abcdef-67890-ghijk\"\nsecure_api_key = Secure(API_KEY, \"API Key Protected\")\n\n# Usage in code\nprint(secure_api_key)  # Output: API Key Protected\n```\n\n### Example 3: Config Usage\n\nThe `Secured` class allows you to securely read configuration files containing sensitive data. Here's how you can use it:\n\n```python\nfrom secured import Secured\n\n# Create a Secured object to read a YAML configuration file\nsecured = Secured('config.yaml', secure=True)\n\n# Access configuration attributes securely\nprint(secured.config.name)  # Using dot notation\nprint(secured.config[\"name\"])  # Using dictionary-like notation\n```\n\n### Example 4: Compose\n\n```python\nfrom secured import Secured\n\n# Define the custom secure message\nmessage = \"🔒 \u003cData Secured\u003e 🔒\"\n\n# Example secured object\nCONFIG_PATH = \"examples/config.yaml\"\nDATABASE_URL = \"mysql://{user}:{password}@localhost/dbname\"\nsecure = Secured(CONFIG_PATH, secure=True, message=message)\n\n# Usage in code\nsecure_database_url = secure.compose(DATABASE_URL, user=\"guest\", password=\"guest_password\")\nprint(secure_database_url)  # Output: 🔒 \u003cData Secured\u003e 🔒\nprint(secure_database_url.get_original()) # Careful! This will print the original data, do not use it.\nprint(secure_database_url == \"mysql://guest:guest_password@localhost/dbname\")  # Output: True\n```\n\n## Features\n\n- **Data Protection**: Helps prevent the accidental logging or display of sensitive information.\n- **Customizable Representations**: Set how your data is displayed when being secured.\n- **Ease of Use**: Integrate seamlessly into existing Python applications.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoaopeuko%2Fsecured","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoaopeuko%2Fsecured","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoaopeuko%2Fsecured/lists"}