{ "info": { "author": "peppicus", "author_email": "homepeppicus@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Build Tools" ], "description": "A smartClient wrapper\n=====================\n\nto use (with caution), suppose that you are using bottle and beaker::\n\nfrom smartClient import SessionManager\n\n\n@app.route('/')\ndef root():\n # get the client session\n clientSession = request.environ.get('beaker.session')\n\n # get the session manager\n sm = SessionManager(clientSession, clientInfo=clientInfo)\n\n # get the HTML page\n page = sm.getPage()\n\n # clear session\n page.clearSession()\n\n # build the page\n page.addComponent(getLoginPage(page))\n\n # build the response body\n response.body = page.getMainPage()\n\n # update the client sesssion\n page.updateSession()\n clientSession.save()\n\n return response\n\n\n\nfrom smartClient import VerticalLayout, HorizontalLayout, KeyboardManager, ReplyClick, ActionUrl, Validator\nfrom smartClient import Label, DateField, EditField, CheckBox, RadioGroup, SelectField, PasswordField, Button, Link\nfrom smartClient import TextArea, Header, Spacer, RichEditor, ListGrid, DataSource, FileUpload, Window, ViewLoader\nfrom smartClient import SectionStack, MainMenu, MenuLink, HTMLPane, Canvas\n\n\ndef getLoginPage(page):\n login = Label()\n login.setProperty('contents','login')\n login.setProperty('height',40)\n\n user = EditField()\n user.setProperty('title','user','fields')\n user.setProperty('value','','fields')\n user.setProperty('autoFocus','true')\n user.setProperty('autoFocus','true','fields')\n user.transformValue = 'function(form, item, value, oldValue) {return value.toUpperCase()}'\n\n password = PasswordField()\n password.setProperty('title','password','fields')\n password.setProperty('value','','fields')\n\n v = Validator()\n v.setCondition(\"return value == 'xxx';\")\n password.addValidator(v)\n\n spacer = Spacer()\n spacer.setProperty('width', '*')\n spacer0 = Spacer()\n spacer0.setProperty('width', '*')\n spacer1 = Spacer()\n spacer1.setProperty('width', '5%')\n spacer2 = Spacer()\n spacer2.setProperty('height', '5%')\n\n actionURL = ActionUrl()\n actionURL.setEvent('click')\n actionURL.setOperation('verifyPassword')\n strObj = '{\"object\":\"User\"}'\n actionURL.setObject(strObj)\n actionURL.setParams('{\"user\":%s.getValue(\"%s\"),\"password\":%s.getValue(\"%s\")}', user, user, password, password)\n check = Button(actionUrl=actionURL)\n check.setProperty('title', 'login')\n check.setProperty('width', 100)\n check.setProperty('height', 40)\n #check.setProperty('saveOnEnter', 'true')\n keyboardManager = page.keyboardManager\n keyboardManager.addEventList2Component(check, ['%s.setFocus(true);', '%s.click();'])\n\n\n v1 = VerticalLayout()\n h0 = HorizontalLayout()\n h1 = HorizontalLayout()\n v1.setProperty('width', 400)\n v1.setProperty('membersMargin', 5)\n v1.setProperty('layoutMargin', 20)\n\n\n v1.addComponent(spacer2)\n v1.addComponent(login)\n v1.addComponent(user)\n v1.addComponent(password)\n #v1.addComponent(spacer2)\n v1.addComponent(h1)\n\n h1.addComponent(spacer)\n h1.addComponent(check)\n\n h0.addComponent(spacer0)\n h0.addComponent(v1)\n h0.addComponent(spacer1)\n\n return h0", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/peppicus/pysmartclient.git", "keywords": "web gui interface ajax web2.0 smartclient isomorphic", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "pysmartclient", "package_url": "https://pypi.org/project/pysmartclient/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pysmartclient/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/peppicus/pysmartclient.git" }, "release_url": "https://pypi.org/project/pysmartclient/0.9.6/", "requires_dist": null, "requires_python": null, "summary": "A smartClient wrapper", "version": "0.9.6" }, "last_serial": 2903387, "releases": { "0.9.4": [ { "comment_text": "", "digests": { "md5": "6f90cc01e17c5ea1978880d9c518aafa", "sha256": "de52c28c6a5cd3cdb8b2bc61e875cbf73b1b0d42e41e5d5f57c04d151e09675b" }, "downloads": -1, "filename": "pysmartclient-0.9.4.tar.gz", "has_sig": false, "md5_digest": "6f90cc01e17c5ea1978880d9c518aafa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14561233, "upload_time": "2016-09-24T06:41:08", "url": "https://files.pythonhosted.org/packages/44/fe/370ed51edbdebb91f0a2915db6540754fae98f9c1dd503d23feca6009fad/pysmartclient-0.9.4.tar.gz" } ], "0.9.6": [ { "comment_text": "", "digests": { "md5": "5c66428abe6e3e570378fe8f83b8efc0", "sha256": "0632f0890a2f771f231443bad391777d59e6d7e502861729c495fea49c5e0c49" }, "downloads": -1, "filename": "pysmartclient-0.9.6.tar.gz", "has_sig": false, "md5_digest": "5c66428abe6e3e570378fe8f83b8efc0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14712937, "upload_time": "2017-05-27T14:38:18", "url": "https://files.pythonhosted.org/packages/e4/73/6ef9a82fd917009c980bae2e78ef778fb6346d7b9ea0d9570a03544e9be0/pysmartclient-0.9.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5c66428abe6e3e570378fe8f83b8efc0", "sha256": "0632f0890a2f771f231443bad391777d59e6d7e502861729c495fea49c5e0c49" }, "downloads": -1, "filename": "pysmartclient-0.9.6.tar.gz", "has_sig": false, "md5_digest": "5c66428abe6e3e570378fe8f83b8efc0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14712937, "upload_time": "2017-05-27T14:38:18", "url": "https://files.pythonhosted.org/packages/e4/73/6ef9a82fd917009c980bae2e78ef778fb6346d7b9ea0d9570a03544e9be0/pysmartclient-0.9.6.tar.gz" } ] }