{ "info": { "author": "Lars Sch\u00f6ning", "author_email": "lays@biosustain.dtu.dk", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", "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 :: Internet" ], "description": "=============\nPotion client\n=============\n\n\n.. image:: https://img.shields.io/travis/biosustain/potion-client/new-potion-client.svg?style=flat-square\n :target: https://travis-ci.org/biosustain/potion-client\n\n.. image:: https://img.shields.io/coveralls/biosustain/potion-client/new-potion-client.svg?style=flat-square\n :target: https://coveralls.io/r/biosustain/potion-client\n\n.. image:: https://img.shields.io/pypi/v/Potion-Client.svg?style=flat-square\n :target: https://pypi.python.org/pypi/Potion-Client\n\n.. image:: https://img.shields.io/pypi/l/Potion-Client.svg?style=flat-square\n :target: https://pypi.python.org/pypi/Potion-Client\n\n.. image:: https://badges.gitter.im/Join%20Chat.svg\n :alt: Join the chat at https://gitter.im/biosustain/potion\n :target: https://gitter.im/biosustain/potion?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n\nDescription\n===========\n\nThis is a Python client for APIs written in `Flask-Potion `_ (a powerful Flask extension for self-documenting JSON APIs).\n\nThe package uses `Requests `_ to provide a super-simple interface to Potion APIs that\nworks with all common authentication methods. It generates classes for each of the resources in the API and automatically handles pagination\nand resolving and serializing references. It also has some basic `IPython Notebook `_ support.\n\nExample\n=======\n\n.. code-block:: python\n\n from potion_client import Client\n from potion_client.auth import HTTPBearerAuth\n from potion_client.exceptions import ItemNotFound\n\n client = Client('http://localhost/api', auth=HTTPBearerAuth('79054025255fb1a26e4bc422aef54eb4'))\n\n u123 = client.User(123)\n\n chomp = client.Animal()\n chomp.owner = u123\n chomp.name = \"Chomp\"\n chomp.species = \"hamster\"\n chomp.save()\n\n pets = client.Animal.instances(where={\"owner\": u123}, sort={\"created_at\": True})\n\n print(\"{} has {} pet(s)\".format(u123.first_name, len(pets))\n\n for pet in pets:\n if pet is not chomp:\n pet.add_friend(chomp)\n print(\"{} is now friends with Chomp\".format(pet.name)))\n\n try:\n foo = client.User.first(where={\"username\": \"foo\"})\n except ItemNotFound:\n print(\"User 'foo' does not exist!\")\n else:\n chomp.update(owner=foo)\n print(\"Chomp has been sold to {}\".format(foo.name))\n\n chomp.destroy()\n print(\"RIP, Chomp. You lived a happy life.\")\n\nInstallation\n============\n\nTo install ``potion-client``, run:\n\n::\n\n pip install potion-client\n\n\n\n\nAuthors\n=======\n\nPotion-client was written by `Jo\u00e3o Cardoso `_ and `Lars Sch\u00f6ning `_.", "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/biosustain/potion-client", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "Potion-client", "package_url": "https://pypi.org/project/Potion-client/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/Potion-client/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/biosustain/potion-client" }, "release_url": "https://pypi.org/project/Potion-client/2.5.1/", "requires_dist": null, "requires_python": null, "summary": "A client for APIs written in Flask-Potion", "version": "2.5.1" }, "last_serial": 2799173, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "3eeb59c9565293f1a58cd08433ffde04", "sha256": "2ed9f392f00c5908eb6340d1870e3eaa0ddb187157d8114e63694f741f73a024" }, "downloads": -1, "filename": "Potion-client-0.1.0.tar.gz", "has_sig": false, "md5_digest": "3eeb59c9565293f1a58cd08433ffde04", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9838, "upload_time": "2016-01-22T12:58:59", "url": "https://files.pythonhosted.org/packages/70/ae/85bd9ec5f9d45b6111864cf7031fbc1e4d073413256b7d33af455922b3b5/Potion-client-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "c836731d4fcaf6539f30fcede377add6", "sha256": "f69a8b979ee65c137f3fdc7b7a2c76ba9ad2ff661ee00b1584fb3c89b43656f4" }, "downloads": -1, "filename": "Potion-client-0.1.1.tar.gz", "has_sig": false, "md5_digest": "c836731d4fcaf6539f30fcede377add6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9813, "upload_time": "2016-01-22T16:17:43", "url": "https://files.pythonhosted.org/packages/81/52/c020f77f51c02e2d138e9950cca68639078a2e818d089b77fac6fbb83592/Potion-client-0.1.1.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "6c138ae88c3b65e084f0a1ad9fd0d02b", "sha256": "fd8c446ad4e9fb6fa85f11ed1b18d575589c41cbf652f61cf0b9673ee1ceb1c8" }, "downloads": -1, "filename": "Potion-client-2.0.0.tar.gz", "has_sig": false, "md5_digest": "6c138ae88c3b65e084f0a1ad9fd0d02b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10084, "upload_time": "2016-03-16T14:38:52", "url": "https://files.pythonhosted.org/packages/9f/fe/3606a20a0f52e381bf3d39087cd2077df22a4a82c47a181c0a2e8d264dd7/Potion-client-2.0.0.tar.gz" } ], "2.0.1": [ { "comment_text": "", "digests": { "md5": "2b68a82fd43470186d6a092b81d695eb", "sha256": "25c94f767e19adb22a4a21a74866acf66e46fc53f07f73c9ff02313628afedd3" }, "downloads": -1, "filename": "Potion-client-2.0.1.tar.gz", "has_sig": false, "md5_digest": "2b68a82fd43470186d6a092b81d695eb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10070, "upload_time": "2016-03-29T19:22:40", "url": "https://files.pythonhosted.org/packages/de/40/4b47c5187848943600d12924fb5c95b6455a9a94afb0462670bb17e83417/Potion-client-2.0.1.tar.gz" } ], "2.1.0": [ { "comment_text": "", "digests": { "md5": "92f2fc53d99ef48a4bfa7fa30bf61080", "sha256": "eedd7c7f36a3a38254dabf806d3a78ae4231b1c4457d95c352ade2485c10df4d" }, "downloads": -1, "filename": "Potion-client-2.1.0.tar.gz", "has_sig": false, "md5_digest": "92f2fc53d99ef48a4bfa7fa30bf61080", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10652, "upload_time": "2016-04-08T11:30:42", "url": "https://files.pythonhosted.org/packages/f3/9e/e002ceadc00018f935ade0a795ed08e478402ff592990954235241c3d7fb/Potion-client-2.1.0.tar.gz" } ], "2.1.1": [ { "comment_text": "", "digests": { "md5": "20e929a7322ad2e4dae292e0626472b0", "sha256": "6f1d25cd699387f41fd3122a29bab6abb3928cc1eb289daa8aab122e284f352b" }, "downloads": -1, "filename": "Potion-client-2.1.1.tar.gz", "has_sig": false, "md5_digest": "20e929a7322ad2e4dae292e0626472b0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10661, "upload_time": "2016-04-08T11:54:17", "url": "https://files.pythonhosted.org/packages/d6/7b/59cce877033b28a9720b22c7939af137fa65239aa48273a2dceda2aba1c8/Potion-client-2.1.1.tar.gz" } ], "2.1.2": [ { "comment_text": "", "digests": { "md5": "926c3be87bb3a874af105d1519c3bd1f", "sha256": "aeb7088e32bbb6b4bf483db74d4fb3af3c467a5fcc81182fa859951350248fa4" }, "downloads": -1, "filename": "Potion-client-2.1.2.tar.gz", "has_sig": false, "md5_digest": "926c3be87bb3a874af105d1519c3bd1f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10684, "upload_time": "2016-04-08T12:21:48", "url": "https://files.pythonhosted.org/packages/d2/59/3cb070b07ecf8f4c565195f9471f1be49ec1519ec7432a0e94ee07ce127d/Potion-client-2.1.2.tar.gz" } ], "2.1.3": [ { "comment_text": "", "digests": { "md5": "1f9e4edce46c0b3ea8386322def120e6", "sha256": "35b2f6d59650c4ac7de119a2ead057eae7e21c1c37817306260483aca068ce14" }, "downloads": -1, "filename": "Potion-client-2.1.3.tar.gz", "has_sig": false, "md5_digest": "1f9e4edce46c0b3ea8386322def120e6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10738, "upload_time": "2016-04-17T06:59:17", "url": "https://files.pythonhosted.org/packages/d2/00/b0949951fd8df694eb16b434a25136ee40855106b885fcfdcb16ac964180/Potion-client-2.1.3.tar.gz" } ], "2.4.0": [ { "comment_text": "", "digests": { "md5": "bc3ccb30874bcaead67a624984a0121b", "sha256": "16e8353d0e477921cbc946e9978ad1a56ea8a2e2bf7eb206c8af90a7e9c6d07a" }, "downloads": -1, "filename": "Potion-client-2.4.0.tar.gz", "has_sig": false, "md5_digest": "bc3ccb30874bcaead67a624984a0121b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10741, "upload_time": "2016-05-17T07:58:27", "url": "https://files.pythonhosted.org/packages/74/c6/fa052b25ea185d8bb951d95e4d21452e98894518fbbfbd10b310a97a320a/Potion-client-2.4.0.tar.gz" } ], "2.4.1": [ { "comment_text": "", "digests": { "md5": "303bc355054f115c13b1a9ff16d3f848", "sha256": "9365fd9d7a3b8a3f59d94da38428e20e57397f5116b246097f6cbb865a614a4e" }, "downloads": -1, "filename": "Potion-client-2.4.1.tar.gz", "has_sig": false, "md5_digest": "303bc355054f115c13b1a9ff16d3f848", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10763, "upload_time": "2016-06-16T12:57:11", "url": "https://files.pythonhosted.org/packages/ac/47/7611a73717afce98c668026d0bcdfef63e84b5931e29a4a1514dc116dbf9/Potion-client-2.4.1.tar.gz" } ], "2.4.2": [ { "comment_text": "", "digests": { "md5": "0b3ac76a440131687e0788477972a065", "sha256": "a8241a74f3d55ec987998408badab56a00762877d78469dd524683f5791928bf" }, "downloads": -1, "filename": "Potion-client-2.4.2.tar.gz", "has_sig": false, "md5_digest": "0b3ac76a440131687e0788477972a065", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10987, "upload_time": "2016-11-07T11:54:41", "url": "https://files.pythonhosted.org/packages/b9/21/b1536700428687cc39215064f6ff9fff093ab46959cb3213990211c0effd/Potion-client-2.4.2.tar.gz" } ], "2.5.0": [ { "comment_text": "", "digests": { "md5": "e3527c9e4eec136bd38789f251f26c5d", "sha256": "b127b1cd7faf03dd95460d8fa88561b213b2eb823d2e9858b612529a31ff06fd" }, "downloads": -1, "filename": "Potion-client-2.5.0.tar.gz", "has_sig": false, "md5_digest": "e3527c9e4eec136bd38789f251f26c5d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11028, "upload_time": "2017-01-20T11:27:13", "url": "https://files.pythonhosted.org/packages/6d/fe/a20e3752699d15468317ffa9253ee4b1e8cf6186e5fc185287c78bb63763/Potion-client-2.5.0.tar.gz" } ], "2.5.1": [ { "comment_text": "", "digests": { "md5": "d135f17cc9464fa3688eb55a5bac4077", "sha256": "bfc1ca6c0feac683ff20f41bb13769754b9badde4d9ed7c0759799ae07398b5d" }, "downloads": -1, "filename": "Potion-client-2.5.1.tar.gz", "has_sig": false, "md5_digest": "d135f17cc9464fa3688eb55a5bac4077", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11037, "upload_time": "2017-04-12T14:43:02", "url": "https://files.pythonhosted.org/packages/10/16/04e56c52d5a9090f655f573fa2caf03b845ffee78bfc8d08ce99064a00aa/Potion-client-2.5.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d135f17cc9464fa3688eb55a5bac4077", "sha256": "bfc1ca6c0feac683ff20f41bb13769754b9badde4d9ed7c0759799ae07398b5d" }, "downloads": -1, "filename": "Potion-client-2.5.1.tar.gz", "has_sig": false, "md5_digest": "d135f17cc9464fa3688eb55a5bac4077", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11037, "upload_time": "2017-04-12T14:43:02", "url": "https://files.pythonhosted.org/packages/10/16/04e56c52d5a9090f655f573fa2caf03b845ffee78bfc8d08ce99064a00aa/Potion-client-2.5.1.tar.gz" } ] }