loadcredential


Nameloadcredential JSON
Version 1.3 PyPI version JSON
download
home_pageNone
SummaryA simple package to read credentials generated by systemd's LoadCredential, with a fallback on environment variables.
upload_time2024-10-30 16:38:51
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseMIT License Copyright (c) 2024 Tom Hubrecht Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords systemd credentials environment secrets
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # loadcredential

This is a simple python package for interfacing with systemd's `LoadCredential` mechanism.
It allows reading secrets from the credentials directory, with a fallback on environment variables if needed.

# Usage

## Basic usage

```python
from loadcredential import Credentials

credentials = Credentials()

secret1 = credentials["SECRET_1"]
```

# Changes

## v1.1 (2024-05-10)

- Added `credentials.get(key, default=None)` which returns a default value and does not raise an error when the key is absent
- Added `credentials.get_json(key, default = None)` which treats the imported secret as json data

## v1.0 (2024-05-09)

Initial version

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "loadcredential",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "systemd, credentials, environment, secrets",
    "author": null,
    "author_email": "Tom Hubrecht <pypi@mail.hubrecht.ovh>",
    "download_url": "https://files.pythonhosted.org/packages/03/30/91b8c259d2f384f7491f9565f1ced3629227daa2230555f4817609faaa99/loadcredential-1.3.tar.gz",
    "platform": null,
    "description": "# loadcredential\n\nThis is a simple python package for interfacing with systemd's `LoadCredential` mechanism.\nIt allows reading secrets from the credentials directory, with a fallback on environment variables if needed.\n\n# Usage\n\n## Basic usage\n\n```python\nfrom loadcredential import Credentials\n\ncredentials = Credentials()\n\nsecret1 = credentials[\"SECRET_1\"]\n```\n\n# Changes\n\n## v1.1 (2024-05-10)\n\n- Added `credentials.get(key, default=None)` which returns a default value and does not raise an error when the key is absent\n- Added `credentials.get_json(key, default = None)` which treats the imported secret as json data\n\n## v1.0 (2024-05-09)\n\nInitial version\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 Tom Hubrecht  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "A simple package to read credentials generated by systemd's LoadCredential, with a fallback on environment variables.",
    "version": "1.3",
    "project_urls": {
        "Homepage": "https://github.com/Tom-Hubrecht/loadcredential",
        "Issues": "https://github.com/Tom-Hubrecht/loadcredential/issues",
        "Repository": "https://github.com/Tom-Hubrecht/loadcredential"
    },
    "split_keywords": [
        "systemd",
        " credentials",
        " environment",
        " secrets"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "80a5630dde382b5c54b2bac50bf65b20aa98169252726ef5e22f5dfb018ac038",
                "md5": "1886d0529b081806ec86abd5abc8bd40",
                "sha256": "0980e332db85c93808dade21da18c008b2191f1ac90fe8f04365e9c4c8ddb3c0"
            },
            "downloads": -1,
            "filename": "loadcredential-1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1886d0529b081806ec86abd5abc8bd40",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 4340,
            "upload_time": "2024-10-30T16:38:49",
            "upload_time_iso_8601": "2024-10-30T16:38:49.409856Z",
            "url": "https://files.pythonhosted.org/packages/80/a5/630dde382b5c54b2bac50bf65b20aa98169252726ef5e22f5dfb018ac038/loadcredential-1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "033091b8c259d2f384f7491f9565f1ced3629227daa2230555f4817609faaa99",
                "md5": "3bc4618b234d1bdc1fa00f81045607f8",
                "sha256": "2b0061b5dea739177f5cf675fb07546b4689909886291713c78ed9ffabf0f25c"
            },
            "downloads": -1,
            "filename": "loadcredential-1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "3bc4618b234d1bdc1fa00f81045607f8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3386,
            "upload_time": "2024-10-30T16:38:51",
            "upload_time_iso_8601": "2024-10-30T16:38:51.383244Z",
            "url": "https://files.pythonhosted.org/packages/03/30/91b8c259d2f384f7491f9565f1ced3629227daa2230555f4817609faaa99/loadcredential-1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-30 16:38:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Tom-Hubrecht",
    "github_project": "loadcredential",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "loadcredential"
}
        
Elapsed time: 0.42215s