{"id":13415578,"url":"https://github.com/candidco/confidential","last_synced_at":"2026-03-06T00:03:10.462Z","repository":{"id":41809531,"uuid":"206614053","full_name":"candidco/confidential","owner":"candidco","description":"🤫 Easily manage configs and secrets in your Python projects (with CLI support)","archived":false,"fork":false,"pushed_at":"2024-05-02T16:58:26.000Z","size":188,"stargazers_count":73,"open_issues_count":2,"forks_count":7,"subscribers_count":24,"default_branch":"master","last_synced_at":"2024-07-31T21:54:07.141Z","etag":null,"topics":["aws-secrets-manager","aws-ssm-parameter-store","cli","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/candidco.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":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-05T16:52:56.000Z","updated_at":"2024-06-24T20:50:53.000Z","dependencies_parsed_at":"2024-05-01T21:33:57.128Z","dependency_job_id":"6686fe74-6595-4924-8582-3e91616ed7bb","html_url":"https://github.com/candidco/confidential","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/candidco/confidential","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/candidco%2Fconfidential","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/candidco%2Fconfidential/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/candidco%2Fconfidential/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/candidco%2Fconfidential/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/candidco","download_url":"https://codeload.github.com/candidco/confidential/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/candidco%2Fconfidential/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30156253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T22:39:40.138Z","status":"ssl_error","status_checked_at":"2026-03-05T22:39:24.771Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["aws-secrets-manager","aws-ssm-parameter-store","cli","python"],"created_at":"2024-07-30T21:00:50.458Z","updated_at":"2026-03-06T00:03:10.416Z","avatar_url":"https://github.com/candidco.png","language":"Python","funding_links":[],"categories":["Third-Party Packages"],"sub_categories":["Configuration"],"readme":"![confidential](https://user-images.githubusercontent.com/1169974/64377143-c7f36680-cff7-11e9-9616-e6c4b8b897b2.png)\n\n![badge](https://action-badges.now.sh/candidco/confidential?action=pytest)\n\n## Installation\n\n```\npip install confidential\n```\n\n## How does it work?\n\nConfidential manages secrets for your project, using AWS Secrets Manager and SSM Parameter Store.\n\nFirst, store a secret in AWS Secrets Manager. Then, create a secrets file, say `my_secrets.json`. A value will be decrypted if the word `secret` precedes it, like the `database` value below:\n\n```json\n{\n  \"database\": \"secret:database_details\",\n  \"environment\": \"production\",\n  \"debug_mode\": false\n}\n```\n\nSimilarly, SSM Parameters can be referenced by providing a parameter key, e.g.: `\"ssm:some_ssm_parameter_key\"`.\n \nYou can decrypt this file either in Python, or directly using the CLI. Ensure [AWS CLI](https://aws.amazon.com/cli/) is set up, then run:\n\n```bash\nconfidential my_secrets.json\n```\n\nwhich outputs the file with decrypted values\n```json\n{\n  \"database\": {\n    \"url\": \"https://example.com\",\n    \"username\": \"admin\",\n    \"password\": \"p@55w0rd\",\n    \"port\": 5678\n  },\n  \"environment\": \"production\",\n  \"debug_mode\": false\n}\n```\n\n![image](https://user-images.githubusercontent.com/1169974/64388843-64286800-d00e-11e9-8fa2-7935b3d4f1ca.png)\n\n\n## Can I use it in my Python projects?\n\nYes, simply import and instantiate `SecretsManager`, like so:\n\n`settings.py`\n```python\nfrom confidential import SecretsManager\n\n\nsecrets = SecretManager(\n    secrets_file=\".secrets/production.json\",\n    secrets_file_default=\".secrets/defaults.json\",  # Overridable defaults you can use in common environments\n    region_name=\"us-east-1\",\n)\n\nDATABASES = {\n    'default': secrets[\"database\"]\n}\n```\n\nIf `export_env_variables` is set to `True`, each secret will also be exported as an environment variable, with the uppercase key as the variable name, e.g.:\n\n```python\nfrom confidential import SecretsManager\nimport os\n\nsecrets = SecretManager(\n    secrets_file=\".secrets/production.json\",\n    secrets_file_default=\".secrets/defaults.json\",  # Overridable defaults you can use in common environments\n    region_name=\"us-east-1\",\n    export_env_variables=True,  # Optionally, export secrets as environment variables. Default is False.\n)\n\n# If the key of a secret is `api_key`, then the following is true:\nassert secrets[\"api_key\"] == os.environ.get(\"API_KEY\")\n```\n\nTrying to access an inexisting key returns `None`. On previous versions, it would throw an exception.\n\n# Testing\n\nFirst, install all dependencies:\n\n```bash\npoetry install\n```\n\nThen run the tests\n```bash\npoetry run pytest\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcandidco%2Fconfidential","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcandidco%2Fconfidential","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcandidco%2Fconfidential/lists"}