{ "info": { "author": "Beno\u00eet Bryon", "author_email": "benoit@marmelune.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 1 - Planning", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 2.7" ], "description": "###\nxal\n###\n\n`xal` is a Python library which provides\nan **high-level API to interact with system resources** (files, commands, ...)\nand **low-level execution** via third-parties (stdlib, Fabric, Salt, ...).\n\nThe concept is you open a session in system, then you run commands within the\nsession:\n\n* session is specific, it holds the execution context, it knows the low-level\n implementation.\n\n* commands use a generic API. You could run the same commands in another\n session.\n\n.. tip::\n\n \"xal\" is the acronym of \"eXecution Abstraction Layer\".\n\n\n*******\nExample\n*******\n\nLet's initialize a session on local system:\n\n>>> import xal\n>>> local_session = xal.LocalSession()\n\nIn this session, we can manage files:\n\n>>> path = local_session.path('hello-xal.txt')\n>>> path.exists()\nFalse\n>>> written = path.open('w').write(u'Hello world!')\n>>> path.exists()\nTrue\n>>> print path.open().read()\nHello world!\n>>> path.unlink()\n>>> path.exists()\nFalse\n\nWe can also execute sh commands:\n\n>>> result = local_session.sh.run(u\"echo 'Goodbye!'\")\n>>> print result.stdout\nGoodbye!\n\n\nNow let's make a function that does the same. It takes the session as input\nargument:\n\n>>> def hello(session):\n... path = session.path('hello-xal.txt')\n... path.open('w').write(u\"Hello world!\")\n... print path.open().read()\n... path.unlink()\n... print session.sh.run(u\"echo 'Goodbye!'\").stdout\n\nOf course, we can run it in local session:\n\n>>> hello(local_session)\nHello world!\nGoodbye!\n\n\nWhat's nice is that we can reuse the same function in another session. Let's\ncreate a remote SSH session using Fabric...\n\n>>> remote_session = xal.FabricSession(host='localhost')\n\n... then just run the same function with this remote session:\n\n>>> hello(remote_session)\nHello world!\nGoodbye!\n\n\n\n***********\nMotivations\n***********\n\n`xal` ideas are:\n\n* Python users (including sysadmins and devops) have a consistent and unified\n API to write scripts that perform operations on system.\n\n* such scripts are portable, i.e. they can be executed in various environments.\n Whatever the operating system, whatever the protocol to connect to and\n communicate with the system...\n\n* Python community can share libraries that are compatible with tools such as\n Fabric, zc.buildout, Salt, Ansible...\n\n* it is easier to switch from one tool to another: reconfigure the session,\n don't change the scripts. Develop scripts locally, test them remotely via\n Fabric, distribute them using Salt... or vice-versa.\n\n\n****************\nProject's status\n****************\n\n**Today**: `xal` is a proof-of-concept. It focuses on sample implementation of\nbasic features such as managing files and directories, or executing sh\ncommands. The idea is that, as a Python user, you can give it a try and, if you\nlike it, use it for simple tasks.\n\n**Tomorrow**, depending on feedback from community, `xal` may improve or be\ndeprecated. As `xal`'s author, I would like the following things to happen:\n\n* increased stability and performances for current features.\n* more execution contexts (i.e. sessions): Salt, Fabric as sudoer, ...\n* more resources: users, system packages, ...\n* better API, preferrably built as PEPs. Just as `xal`'s proof of concept tries\n to mimic ``pathlib``, there could be a PEP related to every resource. Sh\n commands (a.k.a. replacement for subprocess) are an epic example.\n\nAs `xal`'s author, I can't do it alone. If you'd like to help:\n\n* **provide feedback**. Do you like `xal`? What do you dislike in `xal`? Your\n feedback matters!\n* join the project on Github.\n\n\n**********\nRessources\n**********\n\n* Documentation: https://xal.readthedocs.org\n* PyPI: https://pypi.python.org/pypi/xal\n* Code repository: https://github.com/benoitbryon/xal\n* Bugtracker: https://github.com/benoitbryon/xal/issues\n* Continuous integration: https://travis-ci.org/benoitbryon/xal", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://xal.readthedocs.org/", "keywords": "shell path subprocess fabric", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "xal", "package_url": "https://pypi.org/project/xal/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/xal/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://xal.readthedocs.org/" }, "release_url": "https://pypi.org/project/xal/0.3/", "requires_dist": null, "requires_python": null, "summary": "Execution abstraction layer for high-level system scripts.", "version": "0.3" }, "last_serial": 1644879, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "dc03a43161bc067410022aef4680fe69", "sha256": "8c5ff22b6eade4bb566d70334ab9ab5c61ae11f852c219d00a78a0d750098684" }, "downloads": -1, "filename": "xal-0.1.zip", "has_sig": false, "md5_digest": "dc03a43161bc067410022aef4680fe69", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17648, "upload_time": "2013-07-06T13:48:25", "url": "https://files.pythonhosted.org/packages/03/df/bdbfd4ea886f1dbeaa0c5be6886320f4cf6c2f6071a20fa2a133c9a2de51/xal-0.1.zip" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "79b33e9bda4a5b9fb4ce141a55a4dc99", "sha256": "81757297de8dddd9859040a454399e466b8e31b8e20032f1b8eba87872f4a128" }, "downloads": -1, "filename": "xal-0.2.tar.gz", "has_sig": false, "md5_digest": "79b33e9bda4a5b9fb4ce141a55a4dc99", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16932, "upload_time": "2015-07-20T22:16:04", "url": "https://files.pythonhosted.org/packages/d7/a4/87582af0ffa9c1826173c69dcec2f9d453d79d0c234d2156777fdd6b7bf3/xal-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "2e4b76c0db28cf5ba7a9e9ab7e0a23cc", "sha256": "a1f2d03ba4bdba7f44e43dfd4eb0a25abd8d813c3312d0939d543fb0b128d0e2" }, "downloads": -1, "filename": "xal-0.3.tar.gz", "has_sig": false, "md5_digest": "2e4b76c0db28cf5ba7a9e9ab7e0a23cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17070, "upload_time": "2015-07-22T12:02:46", "url": "https://files.pythonhosted.org/packages/0a/3d/76e588aa243fac447a244cc1813ec7e198a894c56c019fe8b90065a0a5eb/xal-0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2e4b76c0db28cf5ba7a9e9ab7e0a23cc", "sha256": "a1f2d03ba4bdba7f44e43dfd4eb0a25abd8d813c3312d0939d543fb0b128d0e2" }, "downloads": -1, "filename": "xal-0.3.tar.gz", "has_sig": false, "md5_digest": "2e4b76c0db28cf5ba7a9e9ab7e0a23cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17070, "upload_time": "2015-07-22T12:02:46", "url": "https://files.pythonhosted.org/packages/0a/3d/76e588aa243fac447a244cc1813ec7e198a894c56c019fe8b90065a0a5eb/xal-0.3.tar.gz" } ] }