Skip to main content

Use Keepass passwords in your bundlewrap repo

Project description

Use secrets from keepass in your BundleWrap repo.

Installation

pip install bundlewrap-keepass

Setup

Create .bw_keepass.cfg in your home. It should contain two lines: First line should contain a path to your keepass file, second line may contain your password.

If you're not comfortable putting your password into a plain-text file, you may also use BW_KEEPASS_PASSWORD in your environment variables.

You may also set BW_KEEPASS_FILE in your environment to overwrite the location of your keepass file. Please note that if you set the file path in your environment, you must also set the password.

Usage

All function calls accept lists or strings as their arguments. If you need to traverse into subdirectories in your keepass file, you have to use | as separator when not using lists.

For example, if you want to access the Password for 'mysite', which is located inside the directory 'bundlewrap', you can use either one of these:

bwkeepass.password('bundlewrap|mysite')
bwkeepass.password(['bundlewrap', 'mysite'])

Example nodes.py:

import bwkeepass as keepass

nodes = {
    'somenode': {
        'metadata': {
            'my_secret': keepass.password('my_identifier'),
        },
    },
}

Available Fields/Methods are:

  • bwkeepass.password() for passwords
  • bwkeepass.username() for usernames
  • bwkeepass.url() for urls
  • bwkeepass.notes() for notes

Note: This will insert a proxy object into your metadata, the actual secret is not retrieved until you convert it to a string (e.g. by inserting it in a template or calling str() explicitly).


© 2021 Franziska Kunsmann

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

bundlewrap-keepass-0.1.0.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

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

bundlewrap_keepass-0.1.0-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file bundlewrap-keepass-0.1.0.tar.gz.

File metadata

  • Download URL: bundlewrap-keepass-0.1.0.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for bundlewrap-keepass-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3f8d55b48f1522a4a9d485deedfcca0c11a69979832d19bbbf5a95d60df9202e
MD5 6c73f5b6147f5c9a864cdd4176b5f3c6
BLAKE2b-256 87db8c0e132de992d7a80aea586685575ee9ebcc4563c763c63238471243a1ed

See more details on using hashes here.

File details

Details for the file bundlewrap_keepass-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: bundlewrap_keepass-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for bundlewrap_keepass-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b2d2fe46c327fa5d0785c31647e2cdbbf45b0191ebffe897865b1fda72508c82
MD5 00d198f4009e93889f28a22b59356bb7
BLAKE2b-256 fcd1381f2a016739732cdb96098b6f924f3e9fc1f1c486f02b0323391282412a

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