{ "info": { "author": "Jochen Wersdoerfer", "author_email": "jochen-pythonista@wersdoerfer.de", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP" ], "description": "# Pythonista API Client\n\n## Installation\n\nThere's a package on [PyPI](https://pypi.org) just type:\n```shell\npip install pythonista_api_client\n```\n\n### Desktop\n\nTo test your installation you can try one of the examples:\n```shell\npython examples/konektom.py\n```\n\n### iOS\n\nBefore you are able to install the package from PyPI, you have to install\n[StaSh](https://github.com/ywangd/stash) a shell for pythonista.\n\n## Api\nTo create an api client just inherit from BaseClient which will\nhandle authentication and settings for you. Requests should be\ndone by importing requests from api client which will then behave\nlike the usual requests module.\n\nDepending on which platform your script will be run one of following\nmethods will be called:\n\n- python_main (normal python)\n- pythonista_main (started with pythonista play button)\n- appex_main (invoked via share sheet)\n\n### Token Authentication\nIf you wnat to use token authentication you need to set obtain_token_endpoint.\n\n### JWT Authentication\nFor JWT Authentication obtain_jwt_endpoint and refresh_jwt_endpoint have to\nbe set.\n\n### Example with token authentictaion\nHere's a minimal example which should work with token and jwt authentication:\n\n```python\nfrom urllib.parse import urljoin\n\nfrom api_client import requests\nfrom api_client import BaseClient\n\n\nclass Bookmark(BaseClient):\n obtain_jwt_endpoint = 'api/auth/token/obtain/'\n refresh_jwt_endpoint = 'api/auth/token/refresh/'\n obtain_token_endpoint = '/api/api-token-auth/'\n\n bookmarks_endpoint = 'api/v1/bookmarks/'\n\n def list_bookmarks(self):\n list_url = urljoin(self.base_url, self.bookmarks_endpoint)\n return requests.get(list_url, auth=self.auth).json()\n\n def python_main(self):\n print('running in normal python')\n print(self.list_bookmarks())\n\n def pythonista_main(self):\n print('Running in Pythonista app, using test data...\\n')\n print(self.list_bookmarks())\n\n def appex_main(self):\n print('running in share sheet')\n print(self.list_bookmarks())\n\n\ndef main():\n Bookmark(auth_method='token').main()\n\nif __name__ == '__main__':\n main()\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/ephes/pythonista_api_client", "keywords": "api rest pythonista jwt token drf", "license": "", "maintainer": "", "maintainer_email": "", "name": "pythonista-api-client", "package_url": "https://pypi.org/project/pythonista-api-client/", "platform": "", "project_url": "https://pypi.org/project/pythonista-api-client/", "project_urls": { "Homepage": "https://github.com/ephes/pythonista_api_client" }, "release_url": "https://pypi.org/project/pythonista-api-client/0.1.4/", "requires_dist": [ "requests", "pytest; extra == 'dev'", "flake8; extra == 'dev'" ], "requires_python": "", "summary": "Making requests to rest apis in pythonista.", "version": "0.1.4" }, "last_serial": 3851007, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "b6fca2077c538baafee7db8a15cc4275", "sha256": "9bb5fcbf67018f32dc25f8695a2a94b257fdaba2bff21908c2a04ef68ca8f68c" }, "downloads": -1, "filename": "pythonista_api_client-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b6fca2077c538baafee7db8a15cc4275", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4928, "upload_time": "2018-05-10T10:54:05", "url": "https://files.pythonhosted.org/packages/ae/e4/541ed99fb8f590f6fc482876e3d598a96f552b93330fb03f5f98bed85fd0/pythonista_api_client-0.1.0-py3-none-any.whl" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "d80a0d25c0080f35362e9cfece657c94", "sha256": "e277d64c0d3cf3557db385fa1164b41257e6e8dbcb5dce1fc6e733025936f657" }, "downloads": -1, "filename": "pythonista_api_client-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "d80a0d25c0080f35362e9cfece657c94", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5284, "upload_time": "2018-05-10T14:47:14", "url": "https://files.pythonhosted.org/packages/0c/35/0becc3932b2d77925f3a67f4c9b7f925e6094a0696d8f0cb150d23b658ee/pythonista_api_client-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1092fac7b9ea24492e0f4125c73cd594", "sha256": "417fc129e98073a537013d07de15d6d34e8117a475e3f029c3817b119667d9c6" }, "downloads": -1, "filename": "pythonista_api_client-0.1.1.tar.gz", "has_sig": false, "md5_digest": "1092fac7b9ea24492e0f4125c73cd594", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4890, "upload_time": "2018-05-10T15:47:47", "url": "https://files.pythonhosted.org/packages/85/d0/d5bead0a9b2045b37d4ea96f20ddba8ee84feaf1c04c1ad5f79b9d03ac38/pythonista_api_client-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "6c73f87a6c9f96970f1c0a3e87141385", "sha256": "32acda441492a8526b1ea6fe2d9557fb3e30941675fb264d8f6ae564be03d777" }, "downloads": -1, "filename": "pythonista_api_client-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "6c73f87a6c9f96970f1c0a3e87141385", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5738, "upload_time": "2018-05-10T15:47:47", "url": "https://files.pythonhosted.org/packages/43/9b/9a0061ea0714362f8df0e2a7c8a411d14414a42f7958509009875ac6b45c/pythonista_api_client-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d63b98a47efa41fb307cc11a7f942f19", "sha256": "2d2557d436bfa29d91f6b76668acfebca5edc08ca004cb9e97799f4f131aff25" }, "downloads": -1, "filename": "pythonista_api_client-0.1.2.tar.gz", "has_sig": false, "md5_digest": "d63b98a47efa41fb307cc11a7f942f19", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5654, "upload_time": "2018-05-10T15:47:49", "url": "https://files.pythonhosted.org/packages/31/56/a9a55665f1a79085d1e10e91dd7074598afc9d8f51069b9c40c6dff11f98/pythonista_api_client-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "6f0531480f10e24090000bd76ebecddc", "sha256": "1dae13c9a04b5ba4ca964b406c26dbacc02adc8a34d06cb69f92793ea75aa4db" }, "downloads": -1, "filename": "pythonista_api_client-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "6f0531480f10e24090000bd76ebecddc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5730, "upload_time": "2018-05-10T15:50:50", "url": "https://files.pythonhosted.org/packages/f5/e5/f4a877a1fa314e247040860518be4c45bbeb2f631dfe5c3432dd0b690459/pythonista_api_client-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4d5132ef5711817bc4c402059cad7d2f", "sha256": "5029ff074d85c7962dda68417ae6adf9d4c52b8222fb88ba748c123d93075123" }, "downloads": -1, "filename": "pythonista_api_client-0.1.3.tar.gz", "has_sig": false, "md5_digest": "4d5132ef5711817bc4c402059cad7d2f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5656, "upload_time": "2018-05-10T15:50:52", "url": "https://files.pythonhosted.org/packages/50/e0/605924a065d435dbbe099c3dcb81681085810ca15fac361416ed70cf9bdf/pythonista_api_client-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "f81cbd5c013fb08389260c944bef54ad", "sha256": "4f4bd34fe2b446165b30c456081e5940de17eabe6a5e5b855336ca7f0b793c2d" }, "downloads": -1, "filename": "pythonista_api_client-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "f81cbd5c013fb08389260c944bef54ad", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5727, "upload_time": "2018-05-10T16:10:14", "url": "https://files.pythonhosted.org/packages/0f/b1/93e262257cb6c597a658c1c97e55665ac65d2050db1214d22830200df6d6/pythonista_api_client-0.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6dc4cddbee03a54636fce5ec38ffff46", "sha256": "9fe100d39b823b335ada77e6cc1c2d7b1b4d233c6e418f42b1f6bffeee59ed5b" }, "downloads": -1, "filename": "pythonista_api_client-0.1.4.tar.gz", "has_sig": false, "md5_digest": "6dc4cddbee03a54636fce5ec38ffff46", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5651, "upload_time": "2018-05-10T16:10:17", "url": "https://files.pythonhosted.org/packages/f3/c2/86df9ec100764685fb5c2c4e0dfdd273ba1d7987148d04f429f7b24552cf/pythonista_api_client-0.1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f81cbd5c013fb08389260c944bef54ad", "sha256": "4f4bd34fe2b446165b30c456081e5940de17eabe6a5e5b855336ca7f0b793c2d" }, "downloads": -1, "filename": "pythonista_api_client-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "f81cbd5c013fb08389260c944bef54ad", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5727, "upload_time": "2018-05-10T16:10:14", "url": "https://files.pythonhosted.org/packages/0f/b1/93e262257cb6c597a658c1c97e55665ac65d2050db1214d22830200df6d6/pythonista_api_client-0.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6dc4cddbee03a54636fce5ec38ffff46", "sha256": "9fe100d39b823b335ada77e6cc1c2d7b1b4d233c6e418f42b1f6bffeee59ed5b" }, "downloads": -1, "filename": "pythonista_api_client-0.1.4.tar.gz", "has_sig": false, "md5_digest": "6dc4cddbee03a54636fce5ec38ffff46", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5651, "upload_time": "2018-05-10T16:10:17", "url": "https://files.pythonhosted.org/packages/f3/c2/86df9ec100764685fb5c2c4e0dfdd273ba1d7987148d04f429f7b24552cf/pythonista_api_client-0.1.4.tar.gz" } ] }