{ "info": { "author": "Mike Malinowski", "author_email": "mike@twisted.space", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "# Overview\n\n\nLaunchpad represents a small factory and a distinct abstract for defining\nactionable items. This is particularly useful when creating libraries of\ntools or processes which need to be exposed and invokable.\n\nEach action contains general details such as name, description etc as well\nas some richer functionality to invoke the action or for the action to expose\nfurther sub-actions or properties.\n\nAs the LaunchPad class is just a factory its population is dynamic based\nupon the paths your feed it (or expose through the LAUNCHPAD_PLUGIN_PATHS\nvariable).\n\nAn example of use might be...\n\n```python\nimport launchpad\n\n# -- Instance launchpad, this gives access to all the\n# -- actions\nlp = launchpad.LaunchPad('/usr/my_actions')\n\n# -- We can cycle over all the actions\nfor action in lp.identifiers():\n print(action)\n\n # -- We can get an action and run it\n lp.request(action).run()\n\n# -- We can access actions direclty too\naction = lp.request('My Action Name')\naction.run()\n```\n\n# Installation\n\nIf you use pip, you can simply run ```pip install launchpad```. That will \npull down the required dependencies (scribble & factories) automatically.\n\nNote: If you install ```launchpanel``` this module will be pulled down\nautomatically as a dependency. Therefore you only need to pull down this\nmodule explicitly if you do not plan to utilise the launchpanel ui.\n\n# The Abstract\n\nTo define an action you must implement a Launch Action. The process of \nimplementing an action is just a case of creating a python file and inheriting\nfrom the LaunchAction object, like this:\n\n```python\nimport launchpad\n\n# ------------------------------------------------------------------------------\nclass MyAction(launchpad):\n Name = ''\n Description = __doc__\n Icon = ''\n Groups = []\n\n @classmethod\n def run(cls):\n pass\n\n @classmethod\n def actions(cls):\n return dict()\n\n @classmethod\n def properties(cls):\n return dict()\n\n @classmethod\n def viability(cls):\n return cls.VALID\n\n```\n\nThe properties are very much about giving descriptive information about your\naction. Description, Icon and Groups are all optional and can be left out\nentirely if desired - but Name must always be filled in.\n\n__run()__ is where you perform the default action for this action.\n\n__actions()__ allows you to return a dictionary of key value pairs where the\nkey is the action label and the value is the function/callable. This allows\nyou to give your action variations or extended behaviour which is accessible\nin a consistent way.\n\n__viability()__ is the mechanism to give an indiciation as to whether your \naction is valid within the current environment. For example, if your action\nrelies on paths existing, or environment variables being set, you can run those\ntests there are return the Action Viability (VALID, INVALID, DISABLED).\n\n__properties()__ is a mechanism for storing blind data. It should always return\na dictionary but there is not formal structure for that dictionary. This is\nimplemented to give you the oppotunity to store tool specific data within the \naction depending upon your needs.\n\n\n# Credits & Collaboration\n\nThis module was inspired by some excellent collaborative projects with a \nfantastic tech-artist called __Toby Harrison-Banfield__.\n\nI am always open to collaboration, so if you spot bugs lets me know, or if\nyou would like to contribute or get involved just shout!\n\n\n# Compatibility\n\nLaunchpad has been tested under Python 2.7 and Python 3.7 on Windows and Ubuntu.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mikemalinowski/launchpad", "keywords": "launch launchpad pad action actions", "license": "", "maintainer": "", "maintainer_email": "", "name": "launchpad", "package_url": "https://pypi.org/project/launchpad/", "platform": "", "project_url": "https://pypi.org/project/launchpad/", "project_urls": { "Homepage": "https://github.com/mikemalinowski/launchpad" }, "release_url": "https://pypi.org/project/launchpad/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "Launchpad represents a small factory and a distinct abstract for defining actionable items", "version": "1.0.0" }, "last_serial": 5006443, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "4c45ca8959569edbb4020e82a2e60ee4", "sha256": "f871b2161db3aac779a7881bade17f1213710b790b7dea23f1f3c1762235172c" }, "downloads": -1, "filename": "launchpad-0.0.1.tar.gz", "has_sig": false, "md5_digest": "4c45ca8959569edbb4020e82a2e60ee4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1064, "upload_time": "2019-03-22T14:50:12", "url": "https://files.pythonhosted.org/packages/06/8c/93c545c75fcdbe488cbb8bd492d43c84e56384db0b9567897462df863bfe/launchpad-0.0.1.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "e7bf14d1c81b1133b9538f3733c598cc", "sha256": "03ae1dc74b7e3387615708182875018f64de58dcc57e9765a28f17be1c0a4d87" }, "downloads": -1, "filename": "launchpad-1.0.0.tar.gz", "has_sig": false, "md5_digest": "e7bf14d1c81b1133b9538f3733c598cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4368, "upload_time": "2019-03-30T08:49:09", "url": "https://files.pythonhosted.org/packages/6c/ec/3f5a3271ff80a4846ef87828637acec078868c064a341be72d9e7362ee81/launchpad-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e7bf14d1c81b1133b9538f3733c598cc", "sha256": "03ae1dc74b7e3387615708182875018f64de58dcc57e9765a28f17be1c0a4d87" }, "downloads": -1, "filename": "launchpad-1.0.0.tar.gz", "has_sig": false, "md5_digest": "e7bf14d1c81b1133b9538f3733c598cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4368, "upload_time": "2019-03-30T08:49:09", "url": "https://files.pythonhosted.org/packages/6c/ec/3f5a3271ff80a4846ef87828637acec078868c064a341be72d9e7362ee81/launchpad-1.0.0.tar.gz" } ] }