{ "info": { "author": "Martin Becker", "author_email": "tuxberlin@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: X11 Applications :: Qt", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Topic :: Utilities" ], "description": "|Travis| |PyPI Package version| |PyPI Python version| |License|\n\npython-keyctl\n=============\n\nBasic management of keys in the Linux kernel keyring in Python. Also\ncomes with a small gui.\n\nTable of contents\n-----------------\n\n- `Description <#description>`__\n- `Requirements <#requirements>`__\n- `Installation <#installation>`__\n- `Usage <#usage>`__\n\n - `Module <#module>`__\n - `GUI <#gui>`__\n\n- `Development <#development>`__\n\n - `Warning <#warning>`__\n\n- `Similar projects <#similar-projects>`__\n- `License <#license>`__\n\nDescription\n-----------\n\nThis is a small library to make use of some functions of the kernel\nkeyring in Python. You can read, add and delete keys.\n\nIt simply uses the keyctl command (invoking it via subprocess), so this\nutil must be installed.\n\nAvailable functions:\n\n- **list** *(list all keys in keyring)*\n- **describe** *(retrieve key name/description)*\n- **read/pipe/print** *(retrieve key content)*\n- **update** *(modify key content)*\n- **add** *(add key)*\n- **revoke/unlink** *(delete key)*\n- **search/request** *(search for a key by name)*\n- **clear** *(remove all keys from keyring)*\n\nThere are many more functions with keys in the kernel keyring (e.g.\npermissions) that is needed for proper keymanagement. But for my usecase\nI just needed the given simple functionality.\n\nRequirements\n------------\n\nPython 2.7\n\n::\n\n $ sudo apt-get install python2.7\n $ python --version\n Python 2.7.3\n\npip\n\n::\n\n $ sudo apt-get install python-pip\n $ pip --version\n pip 9.0.1 from .... (python 2.7)\n\nThe 'keyctl' command\n\n::\n\n $ sudo apt-get install keyutils\n $ dpkg -s keyutils | grep Version\n Version: 1.5.2-2\n\nFor the GUI you also need:\n\nQt4\n\n::\n\n $ sudo apt-get install qt4-qmake libqt4-core libqt4-dev\n $ qmake-qt4 --version\n QMake version 2.01a\n Using Qt version 4.8.1 in /usr/lib/x86_64-linux-gnu\n\nPySide\n\n::\n\n $ sudo apt-get install python-qt4 python-pyside\n $ python -c \"import PySide; print PySide.__version__\"\n Version: 1.1.0\n\n| Virtualenv:\n| If you want to use this module in a virtualenv you either have to\n ``(venv)$ pip install pyside`` (which takes up to 40min to compile) or\n you can link your pyside distro package into your virtualenv like\n this:\n\n::\n\n $ cd myprojectfolder\n $ ln -s /usr/lib/python2.7/dist-packages/PySide/ venv/lib/python2.7/site-packages/\n\ntry it:\n\n::\n\n $ cd myprojectfolder\n $ source venv/bin/activate\n (venv)$ python -c \"import PySide; import os; print PySide.__version__, os.path.realpath(PySide.__path__[0])\"\n 1.1.0 /usr/lib/python2.7/dist-packages/PySide\n\nInstallation\n------------\n\n::\n\n $ pip install keyctl\n\nReady to use.\n\nUsage\n-----\n\nModule\n~~~~~~\n\nGet all keys:\n\n.. code:: python\n\n from keyctl import Key\n keylist = Key.list()\n for mykey in keylist:\n print mykey.id\n\nRead existing key:\n\n.. code:: python\n\n from keyctl import Key\n mykey = Key(123)\n print mykey.name\n print mykey.data\n print mykey.data_hex\n\nFind key by name:\n\n.. code:: python\n\n from keyctl import Key\n mykey = Key.search('test key')\n print mykey.id\n\nAdd key:\n\n.. code:: python\n\n from keyctl import Key\n mykey = Key.add('test key', 'test content')\n print mykey.id\n\nDelete key:\n\n.. code:: python\n\n from keyctl import Key\n mykey = Key(123)\n mykey.delete()\n\nUpdate key:\n\n.. code:: python\n\n from keyctl import Key\n mykey = Key(123)\n mykey.update('new content')\n\nGUI\n~~~\n\nTo open the GUI, run the installed command.\n\n::\n\n $ keyctlgui\n\nDevelopment\n-----------\n\nWarning\n~~~~~~~\n\nIf you run the integrated tests, your user keyring will be cleared.\nDon't do this when you have active keys e.g. for encryption.\n\nSimilar projects\n----------------\n\nSimilar projects you might want to checkout:\n\n- https://github.com/sassoftware/python-keyutils (more complete,\n available in debian repo)\n- https://github.com/jdukes/pykeyctl (more complete, direct library\n wrapper)\n\nLicense\n-------\n\n| GPL-3.0\n| see\n `LICENSE `__\n file\n\n.. |Travis| image:: https://img.shields.io/travis/tuxberlin/python-keyctl/master.svg\n :target: https://travis-ci.org/tuxberlin/python-keyctl\n.. |PyPI Package version| image:: https://img.shields.io/pypi/v/keyctl.svg\n :target: https://pypi.python.org/pypi/keyctl\n.. |PyPI Python version| image:: https://img.shields.io/pypi/pyversions/keyctl.svg\n :target: https://pypi.python.org/pypi/keyctl\n.. |License| image:: https://img.shields.io/github/license/tuxberlin/python-keyctl.svg\n :target: https://raw.githubusercontent.com/tuxberlin/python-keyctl/master/LICENSE\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tuxberlin/python-keyctl", "keywords": "", "license": "GPL-3.0", "maintainer": "", "maintainer_email": "", "name": "keyctl", "package_url": "https://pypi.org/project/keyctl/", "platform": "", "project_url": "https://pypi.org/project/keyctl/", "project_urls": { "Homepage": "https://github.com/tuxberlin/python-keyctl" }, "release_url": "https://pypi.org/project/keyctl/0.4/", "requires_dist": null, "requires_python": "", "summary": "Wrapper to use keyctl command in Python", "version": "0.4" }, "last_serial": 2683122, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "3b60555c7c9ab18703d18bfa1af883ef", "sha256": "dd5b86c49823e46fdee000b9b1a4504a436dc1c395bfb4940f1604049109ca9d" }, "downloads": -1, "filename": "keyctl-0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "3b60555c7c9ab18703d18bfa1af883ef", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 10416, "upload_time": "2017-03-04T18:01:42", "url": "https://files.pythonhosted.org/packages/20/50/6028fd7857793e4c87a20828314f7b6d2a7dd3da1a34bdef49091131e66e/keyctl-0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "32d483d9a6723ae3124f8ffe6fd39083", "sha256": "0824df3bbaa37d70b0b87a9fe0b7f3bf1f1f1456d71764e0cb7beb5758e08e27" }, "downloads": -1, "filename": "keyctl-0.1.tar.gz", "has_sig": false, "md5_digest": "32d483d9a6723ae3124f8ffe6fd39083", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6337, "upload_time": "2017-03-04T18:01:43", "url": "https://files.pythonhosted.org/packages/17/29/e8501561d0178bc4e5101f8a9b74208cbc1b10642d38c705b751a4ef6d96/keyctl-0.1.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "eec36699f8482533f15adc6d0bea62b9", "sha256": "16626409e5582339d5d493d75d6e0d0f547c094d378aea2390dfc01cb88c5c37" }, "downloads": -1, "filename": "keyctl-0.3-py2-none-any.whl", "has_sig": false, "md5_digest": "eec36699f8482533f15adc6d0bea62b9", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 10996, "upload_time": "2017-03-04T23:50:09", "url": "https://files.pythonhosted.org/packages/17/b7/64233e64bfa6967fb96aa450d5cc475667cefdd555ae4a91e0b5109d3fb3/keyctl-0.3-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7c6ad6b4e5d05074d98cbbaacac52a12", "sha256": "f7b45ff632525f2e41fcff3cbb2f097860956fb424c9c2fdb2c7818174b707b5" }, "downloads": -1, "filename": "keyctl-0.3.tar.gz", "has_sig": false, "md5_digest": "7c6ad6b4e5d05074d98cbbaacac52a12", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6785, "upload_time": "2017-03-04T23:50:10", "url": "https://files.pythonhosted.org/packages/07/42/08f2ea2f68b8d292f5f0d8b20c03f9ca2143d3c9c9d012e87df35427b088/keyctl-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "4365c239ae5df206a0496a208a2fac86", "sha256": "59daf4c22260a14c906961adb928c0aba21bfc8786f08cfaed0225b2e28adfa3" }, "downloads": -1, "filename": "keyctl-0.4-py2-none-any.whl", "has_sig": false, "md5_digest": "4365c239ae5df206a0496a208a2fac86", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 11552, "upload_time": "2017-03-05T01:21:17", "url": "https://files.pythonhosted.org/packages/6b/f4/ec3e18fdd9274ee178173a9506b495e7ad81b9c545edad10c819312eb51a/keyctl-0.4-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "55322f0fcb324fa40ab43de53769efe8", "sha256": "19f25b4383ca0e37aeb2c87c92f5bc30158d9a165a17266d5ad7936c2f867b65" }, "downloads": -1, "filename": "keyctl-0.4.tar.gz", "has_sig": false, "md5_digest": "55322f0fcb324fa40ab43de53769efe8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7083, "upload_time": "2017-03-05T01:21:19", "url": "https://files.pythonhosted.org/packages/c1/ec/b16359a5aab464e22d26550db92708b5bd1c464eb84560d7fcb19c3b7a37/keyctl-0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4365c239ae5df206a0496a208a2fac86", "sha256": "59daf4c22260a14c906961adb928c0aba21bfc8786f08cfaed0225b2e28adfa3" }, "downloads": -1, "filename": "keyctl-0.4-py2-none-any.whl", "has_sig": false, "md5_digest": "4365c239ae5df206a0496a208a2fac86", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 11552, "upload_time": "2017-03-05T01:21:17", "url": "https://files.pythonhosted.org/packages/6b/f4/ec3e18fdd9274ee178173a9506b495e7ad81b9c545edad10c819312eb51a/keyctl-0.4-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "55322f0fcb324fa40ab43de53769efe8", "sha256": "19f25b4383ca0e37aeb2c87c92f5bc30158d9a165a17266d5ad7936c2f867b65" }, "downloads": -1, "filename": "keyctl-0.4.tar.gz", "has_sig": false, "md5_digest": "55322f0fcb324fa40ab43de53769efe8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7083, "upload_time": "2017-03-05T01:21:19", "url": "https://files.pythonhosted.org/packages/c1/ec/b16359a5aab464e22d26550db92708b5bd1c464eb84560d7fcb19c3b7a37/keyctl-0.4.tar.gz" } ] }