{ "info": { "author": "Peter Odding", "author_email": "peter@peterodding.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Systems Administration", "Topic :: Terminals", "Topic :: Utilities" ], "description": "linux-utils: Linux system administration tools for Python\n=========================================================\n\n.. image:: https://travis-ci.org/xolox/python-linux-utils.svg?branch=master\n :target: https://travis-ci.org/xolox/python-linux-utils\n\n.. image:: https://coveralls.io/repos/xolox/python-linux-utils/badge.svg?branch=master\n :target: https://coveralls.io/r/xolox/python-linux-utils?branch=master\n\nThe Python package `linux-utils` provides utility functions that make it easy\nto script system administration tasks on Linux_ systems in Python. The\nfollowing functionality is currently implemented:\n\n- Parsing of the `/etc/fstab`_ and `/etc/crypttab`_ configuration files.\n- A basic Python API for cryptsetup_ and a Python implementation of\n cryptdisks_start_ and cryptdisks_stop_ (with a command line interface).\n\nThe package is currently tested on cPython 2.6, 2.7, 3.4, 3.5, 3.6 and PyPy\n(2.7) on Ubuntu Linux (using `Travis CI`_).\n\n.. contents::\n :local:\n\nInstallation\n------------\n\nThe `linux-utils` package is available on PyPI_ which means installation should\nbe as simple as:\n\n.. code-block:: sh\n\n $ pip install linux-utils\n\nThere's actually a multitude of ways to install Python packages (e.g. the `per\nuser site-packages directory`_, `virtual environments`_ or just installing\nsystem wide) and I have no intention of getting into that discussion here, so\nif this intimidates you then read up on your options before returning to these\ninstructions ;-).\n\nUsage\n-----\n\nFor details about the Python API please refer to the API documentation\navailable on `Read the Docs`_. The Python implementation of cryptdisks_start_\nand cryptdisks_stop_ is available on the command line as the following two\nprograms:\n\n.. contents::\n :local:\n\nAs the names imply these programs are not functional equivalents of their\n\"official\" counterparts, because they only support LUKS encryption and a small\nsubset of the available encryption options.\n\ncryptdisks-start-fallback\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. A DRY solution to avoid duplication of the `cryptdisks-start-fallback --help' text:\n..\n.. [[[cog\n.. import cog\n.. from humanfriendly.text import dedent\n.. from humanfriendly.usage import render_usage\n.. from linux_utils.cli import cryptdisks_start_cli\n.. cog.out(\"\\n\" + render_usage(dedent(cryptdisks_start_cli.__doc__)) + \"\\n\")\n.. ]]]\n\n**Usage:** `cryptdisks-start-fallback NAME`\n\nReads /etc/crypttab and unlocks the encrypted filesystem with the given NAME.\n\nThis program emulates the functionality of Debian's cryptdisks_start program,\nbut it only supports LUKS encryption and a small subset of the available\nencryption options.\n\n.. [[[end]]]\n\ncryptdisks-stop-fallback\n~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. A DRY solution to avoid duplication of the `cryptdisks-stop-fallback --help' text:\n..\n.. [[[cog\n.. import cog\n.. from humanfriendly.text import dedent\n.. from humanfriendly.usage import render_usage\n.. from linux_utils.cli import cryptdisks_stop_cli\n.. cog.out(\"\\n\" + render_usage(dedent(cryptdisks_stop_cli.__doc__)) + \"\\n\")\n.. ]]]\n\n**Usage:** `cryptdisks-stop-fallback NAME`\n\nReads /etc/crypttab and locks the encrypted filesystem with the given NAME.\n\nThis program emulates the functionality of Debian's cryptdisks_stop program,\nbut it only supports LUKS encryption and a small subset of the available\nencryption options.\n\n.. [[[end]]]\n\nHistory\n-------\n\nBack in 2015 I wrote some Python code to parse the Linux configuration files\n`/etc/fstab`_ and `/etc/crypttab`_ for use in crypto-drive-manager_. Fast\nforward to 2017 and I found myself wanting to use the same functionality\nin rsync-system-backup_. Three options presented themselves to me:\n\n1. **Copy/paste the relevant code.** Having to maintain the same code in\n multiple places causes lower quality code because having to duplicate the\n effort of writing documentation, developing tests and fixing bugs is a very\n demotivating endeavor.\n\n In fact sometime in 2016 I *did* copy/paste parts of this code into a\n project at work, because I needed similar functionality there. Of course\n since then the two implementations have started diverging :-p.\n\n2. **Make crypto-drive-manager a dependency of rsync-system-backup.** Although\n this approach is less ugly than copy/pasting the code, it still isn't\n exactly elegant because the two projects have nothing to do with each other\n apart from working with LUKS encrypted disks on Linux.\n\n3. **Extract the functionality into a new package.** In my opinion this is\n clearly the most elegant approach, unfortunately it also requires the most\n work from me :-). On the plus side I'm publishing the new package with a\n test suite which means less untested code remains in crypto-drive-manager_\n (which doesn't have a test suite at the time of writing).\n\nWhile extracting the code I shortly considered integrating the functionality\ninto debuntu-tools_, however the `/etc/fstab`_ and `/etc/crypttab`_ parsing\nisn't specific to Debian or Ubuntu at all and debuntu-tools_ has several\ndependencies that aren't relevant to Linux configuration file parsing.\n\nSince then it has become clear that this was a good choice (not merging the\nfunctionality into debuntu-tools_) because the package now provides a Python\nimplementation of cryptdisks_start_ and cryptdisks_stop_, which is mostly\nuseful on Linux systems that *aren't* based on Debian :-).\n\nContact\n-------\n\nThe latest version of `linux-utils` is available on PyPI_ and GitHub_. The\ndocumentation is available on `Read the Docs`_ and includes a changelog_. For\nbug reports please create an issue on GitHub_. If you have questions,\nsuggestions, etc. feel free to send me an e-mail at `peter@peterodding.com`_.\n\nLicense\n-------\n\nThis software is licensed under the `MIT license`_.\n\n\u00a9 2018 Peter Odding.\n\n.. _/etc/crypttab: https://manpages.debian.org/crypttab\n.. _/etc/fstab: https://manpages.debian.org/fstab\n.. _changelog: https://linux-utils.readthedocs.org/en/latest/changelog.html\n.. _cryptdisks_start: https://manpages.debian.org/cryptdisks_start\n.. _cryptdisks_stop: https://manpages.debian.org/cryptdisks_stop\n.. _crypto-drive-manager: https://pypi.python.org/pypi/crypto-drive-manager\n.. _cryptsetup: https://manpages.debian.org/cryptsetup\n.. _debuntu-tools: https://pypi.python.org/pypi/debuntu-tools\n.. _GitHub: https://github.com/xolox/python-linux-utils\n.. _Linux: https://en.wikipedia.org/wiki/Linux\n.. _MIT license: http://en.wikipedia.org/wiki/MIT_License\n.. _per user site-packages directory: https://www.python.org/dev/peps/pep-0370/\n.. _peter@peterodding.com: peter@peterodding.com\n.. _PyPI: https://pypi.python.org/pypi/linux-utils\n.. _Python Package Index: https://pypi.python.org/pypi/linux-utils\n.. _Python: https://www.python.org/\n.. _Read the Docs: https://linux-utils.readthedocs.io/en/latest/\n.. _rsync-system-backup: https://pypi.python.org/pypi/rsync-system-backup\n.. _Travis CI: https://travis-ci.org/xolox/python-linux-utils/builds\n.. _virtual environments: http://docs.python-guide.org/en/latest/dev/virtualenvs/\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://linux-utils.readthedocs.io", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "linux-utils", "package_url": "https://pypi.org/project/linux-utils/", "platform": "", "project_url": "https://pypi.org/project/linux-utils/", "project_urls": { "Homepage": "https://linux-utils.readthedocs.io" }, "release_url": "https://pypi.org/project/linux-utils/0.6/", "requires_dist": [ "coloredlogs (>=7.0)", "executor (>=16.0.1)", "humanfriendly (>=3.6)", "property-manager (>=2.3)", "six (>=1.10.0)" ], "requires_python": "", "summary": "Linux system administration tools for Python", "version": "0.6" }, "last_serial": 4027728, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "f6f65297cd32c316354c35a573254246", "sha256": "bbb9af802ffb22d3110487dffa7bdbd4c4e36f8c08c35182351e4bcfd281bf30" }, "downloads": -1, "filename": "linux_utils-0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f6f65297cd32c316354c35a573254246", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 14360, "upload_time": "2017-06-21T04:32:57", "url": "https://files.pythonhosted.org/packages/23/2f/2713c6733f4e221b860d0932c3ea101f051a0ca80a2ca68a2cf7a5d6ffeb/linux_utils-0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ca6c53f6c69679eca73a8cc9fba2e661", "sha256": "0fbb9b6c89bed3898ac945dd2bd1734e04cbd721956b76855be5786fa6813371" }, "downloads": -1, "filename": "linux-utils-0.1.tar.gz", "has_sig": false, "md5_digest": "ca6c53f6c69679eca73a8cc9fba2e661", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10094, "upload_time": "2017-06-21T04:32:42", "url": "https://files.pythonhosted.org/packages/18/cf/28dd0fd18aa28a8d91e4bbe96b9e906877261d41506f6b5b4e62c50fb970/linux-utils-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "08fd39bbafaa68d05f6cd3cf760783df", "sha256": "b75fab0439d9d9bfd2b8767324a73c400136024baea7c7bd7d8af029c03cf747" }, "downloads": -1, "filename": "linux_utils-0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "08fd39bbafaa68d05f6cd3cf760783df", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 19184, "upload_time": "2017-06-21T12:12:29", "url": "https://files.pythonhosted.org/packages/f6/b2/0b0bfc71a2f3f99838c2555263d2cb135ab53eb427dbfc7695d0bca3ddb8/linux_utils-0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bfabc6e18fc634f768baccb3ed0d1d9f", "sha256": "b984ddb9705e6e4cefa0043a38eef45932b87eb3e8932a751c9f8d0846839eef" }, "downloads": -1, "filename": "linux-utils-0.2.tar.gz", "has_sig": false, "md5_digest": "bfabc6e18fc634f768baccb3ed0d1d9f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13886, "upload_time": "2017-06-21T12:12:30", "url": "https://files.pythonhosted.org/packages/df/c6/0cae2fe8e1afab0c7f991b4128edf1952f1ba3d20841e1421211667ed616/linux-utils-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "f628bf8e22c4f6eaea04ccb4f6a456e0", "sha256": "d4dce56e1a1bb66cf6addd3b27c9b11d4746e060d26e6e149f64e7cfefbf596d" }, "downloads": -1, "filename": "linux_utils-0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f628bf8e22c4f6eaea04ccb4f6a456e0", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 20129, "upload_time": "2017-06-21T13:54:53", "url": "https://files.pythonhosted.org/packages/ff/0c/bba222bd3addd272d62d998de4096771bf637a116f3348a9463733d7a3da/linux_utils-0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6f134081eb1ab5660789a601d80076f7", "sha256": "73c3c16588534b1bbb0a53d07ea95a755575d44422b15cb5f8e5234c830c5148" }, "downloads": -1, "filename": "linux-utils-0.3.tar.gz", "has_sig": false, "md5_digest": "6f134081eb1ab5660789a601d80076f7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14640, "upload_time": "2017-06-21T13:54:55", "url": "https://files.pythonhosted.org/packages/cb/65/818fb3938dafb75aba26446da33a57eff0a3b6de1c08e21ae5be27a43dd0/linux-utils-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "f4761e3b8d57644503f0c2e2ca7353d2", "sha256": "3bf66e6c0a00fb4536bbe57e734f322ab73bdcbfdd5bae48190804d8c6d31a08" }, "downloads": -1, "filename": "linux_utils-0.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f4761e3b8d57644503f0c2e2ca7353d2", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 22000, "upload_time": "2017-06-22T13:52:19", "url": "https://files.pythonhosted.org/packages/32/32/1875136bf7281f7b25bedbb65156c7ff7802e2f519e79cc72e3225ac7a9a/linux_utils-0.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "572c7c21b33e4f717e64cd9941fa7317", "sha256": "af018b967455eb2c834e189a41433e6fe8deb245677d4a1c634ecb327ea5988e" }, "downloads": -1, "filename": "linux-utils-0.4.tar.gz", "has_sig": false, "md5_digest": "572c7c21b33e4f717e64cd9941fa7317", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15526, "upload_time": "2017-06-22T13:52:23", "url": "https://files.pythonhosted.org/packages/3e/08/a660772e98d26da729b5772c763131764a3c8ff6f9a14c05e9c93be5ca6a/linux-utils-0.4.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "d57e78e7d442e46c7305f1d712a0eef3", "sha256": "2cc5cb35c9a84d298960e888b978cda5caf3575a0f44f4352b54547344e0f4f7" }, "downloads": -1, "filename": "linux_utils-0.4.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d57e78e7d442e46c7305f1d712a0eef3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 22096, "upload_time": "2017-06-23T11:16:41", "url": "https://files.pythonhosted.org/packages/af/a7/c4944fd153b5d6b566dbfbf3c8004db3aade77acc1691418620679b6d892/linux_utils-0.4.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b9dd66bab8e8aae3c32e26f1d2e2849c", "sha256": "893f0f2f2b50876610d2a475e9dbc0b55effb535465dbdcccb59260118a04c37" }, "downloads": -1, "filename": "linux-utils-0.4.1.tar.gz", "has_sig": false, "md5_digest": "b9dd66bab8e8aae3c32e26f1d2e2849c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15589, "upload_time": "2017-06-23T11:16:45", "url": "https://files.pythonhosted.org/packages/45/57/eb14905a25292978effcd0784b9e675f1305e9442ef134e1c48d06f37e50/linux-utils-0.4.1.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "e84f609a685f96e8efc4c004e45d2257", "sha256": "ca9f10608fb1e40e3dde5968683086619e089a5b1da19bd18c4576550b230be5" }, "downloads": -1, "filename": "linux_utils-0.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e84f609a685f96e8efc4c004e45d2257", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 26206, "upload_time": "2017-06-24T13:26:14", "url": "https://files.pythonhosted.org/packages/ff/f6/c65fdf8f67d6d3df2a5d1238eac3f173bcdc923d26ccc0afec487c855f46/linux_utils-0.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2fddb3bef3ca51bde4ae015e864f520e", "sha256": "9d9e98f348de135f7dcca65923b556f43c7d580d3a8de44531faa7054ddf0e83" }, "downloads": -1, "filename": "linux-utils-0.5.tar.gz", "has_sig": false, "md5_digest": "2fddb3bef3ca51bde4ae015e864f520e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18847, "upload_time": "2017-06-24T13:26:17", "url": "https://files.pythonhosted.org/packages/01/d0/89b9abc142cb74b6dc3db862e4287aae2c372445f5b0347040540b9b7e1f/linux-utils-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "0b297c18e4acc2c2c043d803ef28df70", "sha256": "c76795ca31fd2e3c35904ac01c13e3d9aea71fefb3a49557f13aca4e4a101fab" }, "downloads": -1, "filename": "linux_utils-0.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0b297c18e4acc2c2c043d803ef28df70", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 23587, "upload_time": "2018-07-03T20:03:09", "url": "https://files.pythonhosted.org/packages/f9/89/131265bbe839dadbc42a950ce1d272c458aadc2cde0eb72283a5331694c6/linux_utils-0.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ea63f51c0dd558fdbf198511d388fdaf", "sha256": "1fdbb1239560dd7015925edb0a0b16d324453a239a653b18a05aee34dae5262a" }, "downloads": -1, "filename": "linux-utils-0.6.tar.gz", "has_sig": false, "md5_digest": "ea63f51c0dd558fdbf198511d388fdaf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22716, "upload_time": "2018-07-03T20:03:10", "url": "https://files.pythonhosted.org/packages/3f/39/672d7d9b5bcd190bd1b59b0b20889d12a10247c7beee37a2207f84d1214c/linux-utils-0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0b297c18e4acc2c2c043d803ef28df70", "sha256": "c76795ca31fd2e3c35904ac01c13e3d9aea71fefb3a49557f13aca4e4a101fab" }, "downloads": -1, "filename": "linux_utils-0.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0b297c18e4acc2c2c043d803ef28df70", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 23587, "upload_time": "2018-07-03T20:03:09", "url": "https://files.pythonhosted.org/packages/f9/89/131265bbe839dadbc42a950ce1d272c458aadc2cde0eb72283a5331694c6/linux_utils-0.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ea63f51c0dd558fdbf198511d388fdaf", "sha256": "1fdbb1239560dd7015925edb0a0b16d324453a239a653b18a05aee34dae5262a" }, "downloads": -1, "filename": "linux-utils-0.6.tar.gz", "has_sig": false, "md5_digest": "ea63f51c0dd558fdbf198511d388fdaf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22716, "upload_time": "2018-07-03T20:03:10", "url": "https://files.pythonhosted.org/packages/3f/39/672d7d9b5bcd190bd1b59b0b20889d12a10247c7beee37a2207f84d1214c/linux-utils-0.6.tar.gz" } ] }