Skip to main content

Python client for KeePassHTTP to interact with KeePass's credentials

Project description

KeePassHTTP

pypi python_versions license travis codecov.io

Python client for KeePassHTTP to interact with KeePass's credentials.

Install

pip install keepasshttp

Usage

import keepasshttp

# get single credential
credential = keepasshttp.get("my_credential_name_or_url")
print(credential.login)
print(credential.password)

# find all credentials's name
credentials = keepasshttp.list()

# fetch all partiall matching credentials
credentials = keepasshttp.search("my_credential_name_or_url")

# create a new keepasshttp entry
keepasshttp.create("login", "password", "url")

# update a keepasshttp entry
credential.password = "new password"
# or
keepasshttp.update("login", "password", "url", "uuid")

Configuration

This module will write to ~/.python_keepass_http to save allowed AES key. To change this path, instanciate KeePassHTTP with a different file.

from keepasshttp import KeePassHTTP
kph = KeePassHTTP('./keepass_key')

Testing

You can simply run the tests using:

python -m unittest discover

KeePassHTTP calls are mocked, to run the tests against a real server, you need to:

  • open tests/test_database.kdbx in KeePass password is test
  • set TEST_WITH_KEEPASS environment variable
  • run test normally

Coverage

To run tests with coverage:

pip install pytest-cov
pytest --cov

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

keepasshttp-1.0.1.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

keepasshttp-1.0.1-py2.py3-none-any.whl (6.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file keepasshttp-1.0.1.tar.gz.

File metadata

  • Download URL: keepasshttp-1.0.1.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.19.1 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.3

File hashes

Hashes for keepasshttp-1.0.1.tar.gz
Algorithm Hash digest
SHA256 080c33ba3cc1d9ca622449f2e898997e60cb3d22da9a84044030a71935aacf97
MD5 ad292cc62252395936920badd04a404e
BLAKE2b-256 3522fd0cbe09fd16f38db9d29ea4cf6ce337bc9febeead02a50c96efa60d53a3

See more details on using hashes here.

File details

Details for the file keepasshttp-1.0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: keepasshttp-1.0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.19.1 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.3

File hashes

Hashes for keepasshttp-1.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4f460e6f1fc86f85956d1f0cc64974b6c6416ddca385030ce30a614d17872d08
MD5 6eb6bf764dba4ebed033d45bd1dc0053
BLAKE2b-256 96ca606fd32d6aafab567086147f1381b1e79c791b5003c0174600bdf8c97c17

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