Coder Social home page Coder Social logo

kotnik / hvac Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hvac/hvac

0.0 2.0 0.0 675 KB

:lock: Python 2.7/3.X client for HashiCorp Vault

Home Page: https://hvac.network

License: Apache License 2.0

Makefile 0.06% Python 99.65% Shell 0.23% HCL 0.05%

hvac's Introduction

hvac

HashiCorp Vault API client for Python 2.7/3.x

Travis CI codecov Documentation Status PyPI version

Tested against Vault v0.1.2 and HEAD. Requires v0.1.2 or later.

Documentation

Documentation for this module is hosted on readthedocs.io.

Getting started

Installation

pip install hvac

or

pip install "hvac[parser]"

if you would like to be able to return parsed HCL data as a Python dict for methods that support it.

Initialize the client

import os

import hvac

# Using plaintext
client = hvac.Client()
client = hvac.Client(url='http://localhost:8200')
client = hvac.Client(url='http://localhost:8200', token=os.environ['VAULT_TOKEN'])

# Using TLS
client = hvac.Client(url='https://localhost:8200')

# Using TLS with client-side certificate authentication
client = hvac.Client(url='https://localhost:8200', cert=('path/to/cert.pem', 'path/to/key.pem'))

Read and write to secret backends

client.write('secret/foo', baz='bar', lease='1h')

print(client.read('secret/foo'))

client.delete('secret/foo')

Authenticate using token auth backend

# Token
client.token = 'MY_TOKEN'
assert client.is_authenticated() # => True

hvac's People

Contributors

ianunruh avatar jeffwecan avatar otakup0pe avatar ianwestcott avatar mwielgoszewski avatar mracter avatar ramiamar avatar nicr9 avatar seanmalloy avatar blarghmatey avatar crmullineravsec avatar cburroughs avatar zerosignal0 avatar lhdumittan avatar mtougeron-gpsw avatar ltm avatar jnaulty avatar bfeeser avatar myles-steinhauser-bose avatar cetex avatar pschmitt avatar rabraham avatar hobbeswalsh avatar seuf avatar visheyra avatar sijis avatar stevenmanton avatar ti-mo avatar yongtin avatar sfinke0 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.