{ "info": { "author": "Marius Vigariu", "author_email": "marius.vigariu@onem.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# ONEm python client\nClient which defines the JSON structure accepted by ONEm platform.\n\n\n## Quickstart\n\nONEm client works only with Python 3. You can use [virtualenvwrapper](https://virtualenvwrapper.readthedocs.io) to create a virtual environment.\n\nOn a linux box:\n\n```mkvirtualenv --python=`which python3` onem-py```\n\nThen install the ONEm client\n\n`pip install onem-py`\n\n\n### Menu\n\n```\nIn [1]: from onem import menus \n\nIn [2]: menu_item1 = menus.MenuItem('First menu item', '/callback-path-m1') \n\nIn [3]: menu_item2 = menus.MenuItem('Second menu item which is just content', is_option=False) \n\nIn [4]: menu = menus.Menu([menu_item1, menu_item2],\n header='Menu header',\n footer='Displayed at the bottom')\n\nIn [5]: menu.as_data() \nOut[5]: \n{'type': 'menu',\n 'header': 'Menu header',\n 'footer': 'Displayed at the bottom',\n 'body': [{'description': 'First menu item',\n 'method': 'GET',\n 'path': '/callback-path-m1',\n 'type': 'option'},\n {'description': 'Second menu item which is just content',\n 'method': None,\n 'path': None,\n 'type': 'content'}],\n 'meta': None}\n\n```\n\n\n### Form\n\n```\nIn [1]: from onem import forms \n\nIn [2]: form_item1 = forms.FormItem('age', forms.FormItemType.INT, 'How old are you?') \nIn [3]: form_item2 = forms.FormItemMenu('is_number', [ \n ...: forms.FormItemMenuItem('Age is just a number, right?', is_option=False), \n ...: forms.FormItemMenuItem('Yes!', value=True), \n ...: forms.FormItemMenuItem('Not really ...', value=False), \n ...: ]) \n\nIn [4]: form = forms.Form([form_item1, form_item2], \n ...: '/form-callback-path-with-user-choices', \n ...: method='POST', \n ...: header='Form header', \n ...: footer='Form footer', \n ...: meta=forms.FormMeta(confirm=False)) \n\nIn [5]: form.as_data() \nOut[5]: \n{'type': 'form',\n 'header': 'Form header',\n 'footer': 'Form footer',\n 'body': [{'description': 'How old are you?',\n 'footer': None,\n 'header': None,\n 'method': None,\n 'name': 'age',\n 'path': None,\n 'type': 'int'},\n {'type': 'form-menu',\n 'header': None,\n 'footer': None,\n 'body': [{'description': 'Age is just a number, right?',\n 'type': 'content',\n 'value': None},\n {'description': 'Yes!', 'type': 'option', 'value': True},\n {'description': 'Not really ...', 'type': 'option', 'value': False}],\n 'meta': None,\n 'name': 'is_number'}],\n 'meta': {'completion_status_show': True,\n 'completion_status_in_header': True,\n 'confirmation_needed': False},\n 'path': '/form-callback-path-with-user-choices',\n 'method': 'POST'}\n\n```\n\n\n", "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/mvnm/onem-py", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "onem-py", "package_url": "https://pypi.org/project/onem-py/", "platform": "", "project_url": "https://pypi.org/project/onem-py/", "project_urls": { "Homepage": "https://github.com/mvnm/onem-py" }, "release_url": "https://pypi.org/project/onem-py/0.0.3/", "requires_dist": null, "requires_python": "", "summary": "Defines the JSON structure accepted by ONEm platform.", "version": "0.0.3" }, "last_serial": 5736120, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "b4088771df1183ba132294013836358f", "sha256": "83bc414681a8b76fda0a4572bd3fa0abe7ec19db8267b34a5ae6db8082164010" }, "downloads": -1, "filename": "onem_py-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "b4088771df1183ba132294013836358f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9610, "upload_time": "2019-08-22T12:03:12", "url": "https://files.pythonhosted.org/packages/30/f4/1e58686769613dfc6ba8ad7f3b4675654881482d831609af41664555b619/onem_py-0.0.1-py3-none-any.whl" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "25533c936faa5412bdaffd3c133b79b2", "sha256": "85cd85acfa8fa9d9f43fe4f6d0fdc9d615e549658d8728dc4e9009150a907cea" }, "downloads": -1, "filename": "onem_py-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "25533c936faa5412bdaffd3c133b79b2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9714, "upload_time": "2019-08-26T10:58:41", "url": "https://files.pythonhosted.org/packages/b6/48/6afdb9a6583d719e5f0adcd520eba5ac3c8b4996780f4df829273e8bd2b4/onem_py-0.0.2-py3-none-any.whl" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "52243ac0e672c77e8ea8ca7b6a53f483", "sha256": "a72569e63e7560f5f0250d248892c6317f4c2db160c2b09be535e138d5058756" }, "downloads": -1, "filename": "onem_py-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "52243ac0e672c77e8ea8ca7b6a53f483", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9778, "upload_time": "2019-08-27T10:47:47", "url": "https://files.pythonhosted.org/packages/ec/4b/e977b1170740c8cf09b7ed740687d42fd8a0665868cbd74baec335e4d938/onem_py-0.0.3-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "52243ac0e672c77e8ea8ca7b6a53f483", "sha256": "a72569e63e7560f5f0250d248892c6317f4c2db160c2b09be535e138d5058756" }, "downloads": -1, "filename": "onem_py-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "52243ac0e672c77e8ea8ca7b6a53f483", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9778, "upload_time": "2019-08-27T10:47:47", "url": "https://files.pythonhosted.org/packages/ec/4b/e977b1170740c8cf09b7ed740687d42fd8a0665868cbd74baec335e4d938/onem_py-0.0.3-py3-none-any.whl" } ] }