vault_secrets


Namevault_secrets JSON
Version 1.0.4 PyPI version JSON
download
home_pagehttps://gitlab.com/fer1035_python/modules/pypi-vault_secrets
SummaryMake API calls to Vault Secrets to retrieve secrets.
upload_time2024-02-09 10:02:53
maintainer
docs_urlNone
authorAhmad Ferdaus Abd Razak
requires_python>=3.9,<4.0
licenseGPL-2.0-only
keywords hashicorp vault secrets
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            =================
**vault_secrets**
=================

Overview
--------

Make API calls to Vault Secrets to retrieve secrets.

Prerequisites
-------------

Required:

- Python **requests** module
- Secrets Vault Organization ID
- Secrets Vault Project ID
- Secrets Vault Application Name
- Secrets Vault Organization Client ID
- Secrets Vault Organization Client Secret

Optional:

- Secret Name (to return the latest value of a specific secret)

Organization and Project IDs can be retrieved using the *vlt* CLI:
https://developer.hashicorp.com/vault/tutorials/hcp-vault-secrets-get-started/hcp-vault-secrets-retrieve-secret

Usage
-----

Installation:

.. code-block:: BASH

    pip3 install vault_secrets
    python3 -m pip install vault_secrets

Execution:

In Python3, to get all secrets in an application:

.. code-block:: PYTHON

   import vault_secrets

   # Get access token.
   token = vault_secrets.get_token(
      ORGANIZATION_CLIENT_ID,
      ORGANIZATION_CLIENT_SECRET
   )

   # Get secrets.
   secrets = vault_secrets.get_secrets(
      token,
      ORGANICATION_ID,
      PROJECT_ID,
      APPLICATION_NAME
   )

In Bash, to get a specific secret value:

.. code-block:: BASH

   secret_value="$(python3 </path/to/>vault_secrets -o ORGANICATION_ID -p PROJECT_ID -a APPLICATION_NAME -c ORGANIZATION_CLIENT_ID -s ORGANIZATION_CLIENT_SECRET -n SECRET_NAME)"

            

Raw data

            {
    "_id": null,
    "home_page": "https://gitlab.com/fer1035_python/modules/pypi-vault_secrets",
    "name": "vault_secrets",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9,<4.0",
    "maintainer_email": "",
    "keywords": "HashiCorp,Vault,Secrets",
    "author": "Ahmad Ferdaus Abd Razak",
    "author_email": "fer1035@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/bf/6a/3f03bd009203260025bbaf5ab33411dd6faa684db8467e3b12151667fcdd/vault_secrets-1.0.4.tar.gz",
    "platform": null,
    "description": "=================\n**vault_secrets**\n=================\n\nOverview\n--------\n\nMake API calls to Vault Secrets to retrieve secrets.\n\nPrerequisites\n-------------\n\nRequired:\n\n- Python **requests** module\n- Secrets Vault Organization ID\n- Secrets Vault Project ID\n- Secrets Vault Application Name\n- Secrets Vault Organization Client ID\n- Secrets Vault Organization Client Secret\n\nOptional:\n\n- Secret Name (to return the latest value of a specific secret)\n\nOrganization and Project IDs can be retrieved using the *vlt* CLI:\nhttps://developer.hashicorp.com/vault/tutorials/hcp-vault-secrets-get-started/hcp-vault-secrets-retrieve-secret\n\nUsage\n-----\n\nInstallation:\n\n.. code-block:: BASH\n\n    pip3 install vault_secrets\n    python3 -m pip install vault_secrets\n\nExecution:\n\nIn Python3, to get all secrets in an application:\n\n.. code-block:: PYTHON\n\n   import vault_secrets\n\n   # Get access token.\n   token = vault_secrets.get_token(\n      ORGANIZATION_CLIENT_ID,\n      ORGANIZATION_CLIENT_SECRET\n   )\n\n   # Get secrets.\n   secrets = vault_secrets.get_secrets(\n      token,\n      ORGANICATION_ID,\n      PROJECT_ID,\n      APPLICATION_NAME\n   )\n\nIn Bash, to get a specific secret value:\n\n.. code-block:: BASH\n\n   secret_value=\"$(python3 </path/to/>vault_secrets -o ORGANICATION_ID -p PROJECT_ID -a APPLICATION_NAME -c ORGANIZATION_CLIENT_ID -s ORGANIZATION_CLIENT_SECRET -n SECRET_NAME)\"\n",
    "bugtrack_url": null,
    "license": "GPL-2.0-only",
    "summary": "Make API calls to Vault Secrets to retrieve secrets.",
    "version": "1.0.4",
    "project_urls": {
        "Homepage": "https://gitlab.com/fer1035_python/modules/pypi-vault_secrets",
        "Repository": "https://gitlab.com/fer1035_python/modules/pypi-vault_secrets"
    },
    "split_keywords": [
        "hashicorp",
        "vault",
        "secrets"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bc5145e353b53905b7f04b25df0ccec98f873730708fb3344b2c170a89c202de",
                "md5": "55115c92110e2de87f5ef57c1df096b6",
                "sha256": "4639fe819d095712d0a905b718f1848808e79016d0211c5091e01e29a6493271"
            },
            "downloads": -1,
            "filename": "vault_secrets-1.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "55115c92110e2de87f5ef57c1df096b6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<4.0",
            "size": 3519,
            "upload_time": "2024-02-09T10:02:51",
            "upload_time_iso_8601": "2024-02-09T10:02:51.362343Z",
            "url": "https://files.pythonhosted.org/packages/bc/51/45e353b53905b7f04b25df0ccec98f873730708fb3344b2c170a89c202de/vault_secrets-1.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bf6a3f03bd009203260025bbaf5ab33411dd6faa684db8467e3b12151667fcdd",
                "md5": "01138a5a1d02eea7472a0641b2b27b0a",
                "sha256": "4ffae87f9f172351abeeed28e6cefbb8c80eb976662bcab798d1d5b15064fd03"
            },
            "downloads": -1,
            "filename": "vault_secrets-1.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "01138a5a1d02eea7472a0641b2b27b0a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<4.0",
            "size": 2512,
            "upload_time": "2024-02-09T10:02:53",
            "upload_time_iso_8601": "2024-02-09T10:02:53.252600Z",
            "url": "https://files.pythonhosted.org/packages/bf/6a/3f03bd009203260025bbaf5ab33411dd6faa684db8467e3b12151667fcdd/vault_secrets-1.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-09 10:02:53",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "fer1035_python",
    "gitlab_project": "modules",
    "lcname": "vault_secrets"
}
        
Elapsed time: 0.16877s