Skip to main content

Package for integrating Hashicorp Vault with Dagster.

Project description

dagster-hashicorp logo

build codecov

dagster-hashicorp

A package for integrating Hashicorp Vault with Dagster.

Requirements

  • Dagster 0.14+

Installation

Use your favorite Python package manager to install the app from PyPI, e.g.

pip install dagster-hashicorp

Usage Notes

Vault

Auth method

  • Token
  • User / Password
  • Approle
  • Kubernetes

Example

from dagster import build_op_context, job, op
from dagster_hashicorp.vault import vault_resource


@op(required_resource_keys={"vault"})
def example_vault_op(context):
    # Read
    secret_data = context.resources.vault.read_secret(
        secret_path="secret/data/foo/bar"
    )
    context.log.debug(f'Secret: {secret_data}')

    # Write
    context.resources.vault.create_or_update_secret(
        secret_path="secret/data/foo/bar", {'bar': 'foo'}
    )


@job(resource_defs={"vault": vault_resource})
def example_job():
    example_vault_op()


example_job.execute_in_process(
    run_config={
        "resources": {
            "vault": {
                "config": {
                    "url": "vault-host:8200",
                    "auth_type": {"token": {"token": "s.your-token"}},
                }
            }
        }
    }
)

# OR use environment variables

example_job.execute_in_process(
    run_config={
        "resources": {
            "vault": {
                "config": {
                    "url": "vault-host:8200",
                    "auth_type": {"token": {"token": {"env": "VAULT_TOKEN"}}},
                }
            }
        }
    }
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dagster-hashicorp-0.1.0.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dagster_hashicorp-0.1.0-py2.py3-none-any.whl (7.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file dagster-hashicorp-0.1.0.tar.gz.

File metadata

  • Download URL: dagster-hashicorp-0.1.0.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for dagster-hashicorp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f34d7c571735313b4cc7dcd8be9a4faa64dd6bf1d68fe1d761620973febe6678
MD5 fd9d063fae0b180b3f0a680e841f954b
BLAKE2b-256 70443fc1593af0b97d111fe6a34641b23ef7bc1e2b6061384cd4f5de4ad11afe

See more details on using hashes here.

File details

Details for the file dagster_hashicorp-0.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for dagster_hashicorp-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 59e2243594b83db3b919b2217ef0d693a0357e717a1a0885740e8e8b2e81213e
MD5 d37ce06282d18bcbfa850134f44181f9
BLAKE2b-256 78ea7b053b00e24c993cf9641e392a9532e7f6c8422baed16fa7cb7eb4402d20

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page