{"id":17150377,"url":"https://github.com/dlech/keepasspq","last_synced_at":"2025-06-14T23:40:23.593Z","repository":{"id":142620644,"uuid":"10491470","full_name":"dlech/KeePassPQ","owner":"dlech","description":"Experimental port of KeePass 2.x using Python and Qt (PyQt)","archived":false,"fork":false,"pushed_at":"2013-06-05T03:19:23.000Z","size":956,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-29T17:22:56.589Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dlech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-06-05T00:09:38.000Z","updated_at":"2021-11-07T20:39:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"5a6189dd-193f-43b6-ae09-a95f6985254a","html_url":"https://github.com/dlech/KeePassPQ","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlech%2FKeePassPQ","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlech%2FKeePassPQ/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlech%2FKeePassPQ/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlech%2FKeePassPQ/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dlech","download_url":"https://codeload.github.com/dlech/KeePassPQ/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245267566,"owners_count":20587459,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T21:35:30.551Z","updated_at":"2025-03-24T12:18:40.273Z","avatar_url":"https://github.com/dlech.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"KeePassPQ\n=========\n\nExperimental port of KeePass 2.x using Python and Qt (PyQt)\n\n\nAbout\n=====\n\n\"Its crazy but it just might work\"\n\nThere are people who will argue that this is not a good idea. They are probably\nright.\n\nSo, here's the deal. KeePass 2.x is technically cross platform - at least on the\ndesktop (Windows/Linux/Mac). The problem is that KeePass is written using the\nSystem.Windows.Forms library. Mono (used on Linux and Mac) has very poor support\nfor this library (very buggy and no one is fixing it). So, on Windows, KeePass\nis top notch, but leaves Linux and Mac users wanting something better.\n\nOne possible solution would be to rewrite KeePass using a user interface library\nthat has good cross platform support. For me, this would be Qt. It has the\nability to look \"native\" on Windows/Linux/Mac without any special coding. And\nmore importantly, it seems to be well supported and is open source.\n\nOK. Now we have a graphical tool kit, but there is a problem. Qt is written in\nC++ and KeePass 2.x is written in C#, so we need to find some bridge between the\ntwo languages. There have been a couple attempts at writing C# bindings for Qt.\nThe most recent is Qyoto. It creates C declarations for all of the C++ functions\nusing a tool called Smoke Generator and then creates C# code that P/Invokes the\nauto-generated C code which in turn call the Qt C++ code. It works decently, but\nit seems like too much overhead there is not much of a community supporting it.\nThere is also Cxxi aka CppSharp, which looks interesting, but is currently only\nbeing developed on Windows. It allows you to call C++ libraries directly from C#\nwithout having to go through the extra C bindings. This is probably the best\noption, but I have not explored it too much yet due to the immaturity of\nCxxi/CppSharp.\n\nWell. Looks like we aren't going to be using Qt in C# any time soon. So what\nabout calling C# from C++. Maybe it is possible, but I have yet to find a way\nthat doesn't involve modifying existing C# libraries to make them callable.\n\nSo what are we left with? Well, my crazy idea is to find a language that has\nsupport for both calling C++ (or existing Qt bindings) and the ability to call\nC# libraries. (I know. I keep saying C# when I mean 'managed' or 'Common\nLanguage Runtime'. Deal with it.) As it turns out, Python appears to have a very\nwidely used Qt bindings call PyQt. In fact, there is even an IDE (eric) that has\nbuilt-in support for PyQt. PyQt5 is still being developed, so we'll start with\nPyQt4. Python 3 on the other hand is looking good, so we will use Python 3.x\ninstead of Python 2.x. So far so good. It also turns out that there is a library\ncalled Python for .NET. This can be used to call C# libraries directly from\nPython. It is not widely used, but seems to have some active development going\non. There is also IronPython, which is an implementation of Python written in\nC#. This would be perfect, but it has two problems against it. It can't call \nCPython libraries, meaning it can't use PtQt and also, it only supports Python\n2.x and there has yet to be an effort to implement Python 3.x.\n\nSo here's what we have going on. The UI is written in Python. It uses PyQt so\nthat we can use Qt. It uses Python for .NET so that we can use KeePassLib rather\nthan rewriting the guts of KeePass. It is alot of dependencies (.NET or Mono,\nPython, Qt, PyQt and Python for .NET - although the last one can and probably\nshould be integrated into the final product) and interop between languages \n(that's the crazy part) but it really seems to be the best option I have found\nfor a cross-platform KeePass program.\n\n\nResources\n=========\n\nKeePass 2.x source code:\nhttps://github.com/dlech/keepass2\n\nQt:\nhttp://qt-project.org\n\nPython:\nhttp://python.org\n\nPyQt:\nhttp://www.riverbankcomputing.com/software/pyqt\n\nPython for .NET:\nhttps://github.com/dlech/pythonnet\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlech%2Fkeepasspq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdlech%2Fkeepasspq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlech%2Fkeepasspq/lists"}