Skip to main content

KeePass command line application

Project description

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

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

kpclibpy-1.1.8.tar.gz (407.3 kB view details)

Uploaded Source

Built Distribution

kpclibpy-1.1.8-py3-none-any.whl (400.4 kB view details)

Uploaded Python 3

File details

Details for the file kpclibpy-1.1.8.tar.gz.

File metadata

  • Download URL: kpclibpy-1.1.8.tar.gz
  • Upload date:
  • Size: 407.3 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for kpclibpy-1.1.8.tar.gz
Algorithm Hash digest
SHA256 50764f8a2672b6281f0a5f2b3ee55dcc7f292f4cc4983d7369cb49ed4cf052c0
MD5 8ebcdd1722beb69de3c729399ceff64b
BLAKE2b-256 4c39992b1c4ac1985e45f2b2eac37efb62d36badab838867c05aaca563cddef5

See more details on using hashes here.

File details

Details for the file kpclibpy-1.1.8-py3-none-any.whl.

File metadata

  • Download URL: kpclibpy-1.1.8-py3-none-any.whl
  • Upload date:
  • Size: 400.4 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for kpclibpy-1.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 74a687ad9830e28797512ddc1b1f212a72461dd53733269ebb0887d4d11852f8
MD5 b7ef8d77931214a76d32787c16bc7f2e
BLAKE2b-256 cc4e7f1c389693f968ff7515c4b57ef7b04f3d638d6389fd021f484acbe46eeb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page