Skip to main content

KeePass command line application

KPCLibPy is a KeePass command application written in Python.

The original KeePass by Dominik Reichl is a .NET application written in C#. KeePassLib is part of KeePass which can be built as a library to support the major functions of KeePass. However, at the moment, KeePassLib is still built for .NET framework which can run on Windows only. I modified KeePassLib and extended it as a .NET Standard library - KPCLib. KPCLib stands for KeePass Portable Class Library at the time when I started the work. Portable Class Library (PCL) is replaced by .NET Standard Library nowadays.

KPCLibPy is just a Python wrapper of KPCLib using Python.NET. In this perspective, KPCLibPy is fully compatible to the original KeePass, since the majority of code is the same as KeePass.

In order to save the development effort and have a nice user interface, the Python library python-nubia from Facebook is used as the framework to support command line interface.

Key Features

  • Full compatible with the original KeePass

  • .NET Standard 2.0 support with KPCLib

  • Cross platform support with .NET Standard and .NET core

  • Nice user interface with python-nubia

  • Interactive mode that offers fish-style auto-completion

Installation

As a developer, you can use KPCLibPy from GitHub directly.

git clone https://github.com/shugaoye/KPCLibPy.git
cd KPCLibPy
pip install -r requirements.txt
cd src
python3 ./nubia_main.py

For normal user, KPCLibPy can be installed using pip.

$ pip install kpclibpy
$ keepass

image01

Docker image

A Dockr image - docker-mono can be used on Linux or Windows 10 (WSL).

Configuration

The default location for database files is at $HOME/.kpclibdb (or %USERPROFILE%.kpclibdb on Windows). To change the default location, a configuration file kpclibpy.ini can be created in the folder $HOME/.kpclibdb. .. code:

[DEFAULT]
homepath = {your data path}

Issues

On Windows platform, you may get the below error message:

Unhandled exception in event loop:
File "c:\users\kpclibpy\appdata\local\programs\python\python38-32\lib\asyncio\proactor_events.py", line 768, in _loop_self_reading
    f.result()  # may raise
File "c:\users\kpclibpy\appdata\local\programs\python\python38-32\lib\asyncio\windows_events.py", line 808, in _poll
    value = callback(transferred, key, ov)
File "c:\users\kpclibpy\appdata\local\programs\python\python38-32\lib\asyncio\windows_events.py", line 457, in finish_recv
    raise ConnectionResetError(*exc.args)

Exception [WinError 995] The I/O operation has been aborted because of either a thread exit or an application request
Press ENTER to continue...

This is an issue of prompt-toolkit. You can change prompt-toolkit to version 2.x.

pip install -U prompt-toolkit~=2.0

Metadata

Release files for kpclibpy 1.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kpclibpy 1.1.8
File Size Uploaded Provenance
kpclibpy-1.1.8.tar.gz 407.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for kpclibpy 1.1.8
File Interpreter ABI Platform
kpclibpy-1.1.8-py3-none-any.whl Python 3 none any Details

Total release size: 807.7 kB

Release files / kpclibpy-1.1.8.tar.gz

Download URL kpclibpy-1.1.8.tar.gz
Size 407.3 kB
Tags Source
SHA-256 checksum
How to use checksums
50764f8a2672b6281f0a5f2b3ee55dcc7f292f4cc4983d7369cb49ed4cf052c0
BLAKE2b-256 checksum
How to use checksums
4c39992b1c4ac1985e45f2b2eac37efb62d36badab838867c05aaca563cddef5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5

Release files / kpclibpy-1.1.8-py3-none-any.whl

Download URL kpclibpy-1.1.8-py3-none-any.whl
Size 400.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
74a687ad9830e28797512ddc1b1f212a72461dd53733269ebb0887d4d11852f8
BLAKE2b-256 checksum
How to use checksums
cc4e7f1c389693f968ff7515c4b57ef7b04f3d638d6389fd021f484acbe46eeb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5

Security for kpclibpy 1.1.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page