{ "info": { "author": "Miko\u0142aj Biel", "author_email": "biel.mikolaj@openmailbox.org", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Software Development :: User Interfaces" ], "description": "python-aui\n==========\n\n**aui** is an abstraction layer over user interfaces in Python. It aims to wrap popular ui libraries so that they have common API.\n\nWrite code once and import different backend to render the application using different UI library.\n\nAvailable backends:\n\n- `aui_tk `_\n\nInstallation\n=============\n.. code-block:: bash\n\n pip install aui\n\nSample application\n===================\n.. code-block:: python\n\n import aui_tk\n from aui import App\n from aui.widgets import (\n Button,\n Input,\n Label,\n Horizontal as H,\n Vertical as V\n )\n\n user_output = Label('output')\n user_input = Input()\n\n def set_output(value):\n user_output.text = value\n\n ui = V( H( Button('submit', onclick=lambda _button: set_output(user_input.value))\n , user_input\n )\n , user_output\n )\n App(ui, title=\"Sample application\").run()\n\n\nHow to use\n==========\n\nImport a backend, create an ``App`` with ``ui`` and ``run`` it! ``ui`` is just a widget (or nested widgets):\n\n.. code-block:: python\n\n from aui import App\n from aui.widgets import Label\n import aui_tk\n\n App(Label('hi!')).run()\n\n\nAPI\n~~~\n\n`aui.App(ui, title)`\n^^^^^^^^^^^^^^^^^^^^\n\n- **ui** ``Widget``\n a widget to be used as the user interface\n- **title** ``str``\n an application title\n\nmethods:\n\n- **run()** ``-> void``\n runs the application\n\n\nWidgets:\n========\n\nAll the widgets can be imported from ``aui.widgets``.\n\n\nUI elements\n~~~~~~~~~~~\n\n`aui.widgets.Button(text, onclick)`\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nRepresents button\n\n- **text** ``str``\n button text\n- **onclick** ``function: Button -> void`` (default: ``None``)\n function invoked after pressing the button\n\nadditional attributes:\n\n- **wide**\n using once makes the button wide\n \n\n`aui.widgets.Checkbox(text, selected, onchange)`\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nRepresents checkbox\n\n- **text** ``str``\n checkbox text\n- **selected** ``boolean`` (default: ``False``)\n whether the checkbox is selected on init\n- **onchange** ``function: Checkbox -> void`` (default: ``None``)\n function invoked after toggling the checkbox\n\n\n`aui.widgets.Input(value, onenter)`\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nRepresents single line input field\n\n- **value** ``str`` (default: ``\"\"``)\n default value\n- **onenter** ``function: Input -> void`` (default: ``None``)\n function called after the return key is pressed\n\nadditional attributes:\n\n- **wide**\n using once makes the input wide\n\n\n`aui.widgets.Label(text)`\n^^^^^^^^^^^^^^^^^^^^^^^^^\nRepresents label\n\n- **text** ``str``\n label text\n\n\n`aui.widgets.Text(text)`\n^^^^^^^^^^^^^^^^^^^^^^^^\nRepresents multiline input field\n\n- **text** ``str`` (default: ``\"\"``)\n widget text\n\n\nContainers\n~~~~~~~~~~\n\n\n`aui.widgets.Horizontal(*children)`\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nRepresents horizontal container\n\n- **\\*children** ``[Widget]``\n widgets to be displayed horizontally\n\nmethods:\n\n- **append(Widget)** ``Widget -> void``\n appends given widget to the container\n\n`aui.widgets.Vertical(*children)`\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nRepresents vertical container\n\n- **\\*children** ``[Widget]``\n widgets to be displayed vertically\n\nmethods:\n\n- **append(Widget)** ``Widget -> void``\n appends given widget to the container\n\nConvention\n==========\n\nUI code (containers' content) should be indented as follows:\n\n.. code-block:: python\n\n H( Button('button#1')\n , Label('label#1')\n , H( V( Checkbox('checkbox#1')\n , Button('button#2')\n )\n , Text()\n , Input()\n )\n )\n\n\nHow to contribute\n=================\n\n#. Implement more backends (``urwind``, ``ncurses``, ``qt``, ``wxwidgets``, ``gtk``, ``cocoa``)\n#. Discuss the API\n#. Spread the word! ;)", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/klausweiss/python-aui", "keywords": null, "license": null, "maintainer": null, "maintainer_email": null, "name": "aui", "package_url": "https://pypi.org/project/aui/", "platform": null, "project_url": "https://pypi.org/project/aui/", "project_urls": { "Homepage": "https://github.com/klausweiss/python-aui" }, "release_url": "https://pypi.org/project/aui/0.1.1/", "requires_dist": null, "requires_python": ">=3", "summary": "An abstraction layer over UI libraries in Python", "version": "0.1.1" }, "last_serial": 2907091, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "5356af6c1a18b99e31fdd9b8d5ee7aea", "sha256": "9d3b4aaff18c6d3aa850632880a65936d9a86e5dc2d200001c0875374ce635f2" }, "downloads": -1, "filename": "aui-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "5356af6c1a18b99e31fdd9b8d5ee7aea", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 7473, "upload_time": "2017-05-29T11:02:37", "url": "https://files.pythonhosted.org/packages/6e/2b/190858a87e672994363de1cb6303278aa978b6d080da2fa5e0cee94bd43b/aui-0.1-py3-none-any.whl" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "a286e429761f455b2a6269c7c1d6143a", "sha256": "83349475ad192adb33e58d368d22b32ee7d6f8d81e4ba4d7516219cd176406a4" }, "downloads": -1, "filename": "aui-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "a286e429761f455b2a6269c7c1d6143a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 7532, "upload_time": "2017-05-29T17:40:18", "url": "https://files.pythonhosted.org/packages/22/5b/b28087900412628526c001f81bf3e236e5295e7c172cbcc70e7433a619ff/aui-0.1.1-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a286e429761f455b2a6269c7c1d6143a", "sha256": "83349475ad192adb33e58d368d22b32ee7d6f8d81e4ba4d7516219cd176406a4" }, "downloads": -1, "filename": "aui-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "a286e429761f455b2a6269c7c1d6143a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 7532, "upload_time": "2017-05-29T17:40:18", "url": "https://files.pythonhosted.org/packages/22/5b/b28087900412628526c001f81bf3e236e5295e7c172cbcc70e7433a619ff/aui-0.1.1-py3-none-any.whl" } ] }