Python client for KeePassHTTP to interact with KeePass's credentials
Project description
KeePassHTTP
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
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
inKeePass
password istest
- set
TEST_WITH_KEEPASS
environment variable - run test normally
Coverage
To run tests with coverage:
pip install pytest-cov
pytest --cov
Project details
Release history Release notifications | RSS feed
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.0.tar.gz
(5.3 kB
view hashes)
Built Distribution
Close
Hashes for keepasshttp-1.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0039772f76cb30cd666b6262ccc277319e1e1adb4342fc79de97c168c84bf4ab |
|
MD5 | 6e498a4d9a16d43ba4a1506df78ac6f1 |
|
BLAKE2b-256 | 2b86b4bbaf8fd086a5158dd363a503685b5888aee752d5974109cb8e4aaa8a86 |