keepassdb is a python library for reading and writing KeePass 1.x database files. (This is the format also used by KeePassX.)
This library is designed to be simple and easy-to-use, support modern versions of Python (2.x and 3.x), and provide a full set of reading and writing functionality.
The package is avialable on PyPI to be installed using easy_install or pip:
shell$ easy_install keepassdb
Using these tools, the PyCrypto 2.6+ dependency will be downloaded and installed automatically from PyPI.
For more traditional installation, you can download and install the package manually:
shell$ tar xvf ~/Downloads/keepassdb-x.x.x.tar.gz
shell$ cd keepassdb-x.x.x
shell$ python setup.py install
Of course, by itself this package doesn’t do much; it’s a library. So it is more likely that you will list this package as a dependency in your own install_requires directive in setup.py.
Example code to get you started reading & writing keepass files.
In-depth reference guide for developing software with keepassdb.