{ "info": { "author": "Alex Hayes", "author_email": "alex@alution.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: OS Independent", "Operating System :: POSIX", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Other/Nonlisted Topic", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "=====\neater\n=====\n\nConsume APIs and hold them to account.\n\n.. image:: https://travis-ci.org/alexhayes/eater.png?branch=master\n :target: https://travis-ci.org/alexhayes/eater\n :alt: Build Status\n\n.. image:: https://landscape.io/github/alexhayes/eater/master/landscape.png\n :target: https://landscape.io/github/alexhayes/eater/\n :alt: Code Health\n\n.. image:: https://codecov.io/github/alexhayes/eater/coverage.svg?branch=master\n :target: https://codecov.io/github/alexhayes/eater?branch=master\n :alt: Code Coverage\n\n.. image:: https://readthedocs.org/projects/eater/badge/\n :target: http://eater.readthedocs.org/en/latest/\n :alt: Documentation Status\n\n.. image:: https://img.shields.io/pypi/v/eater.svg\n :target: https://pypi.python.org/pypi/eater\n :alt: Latest Version\n\n.. image:: https://img.shields.io/pypi/pyversions/eater.svg\n :target: https://pypi.python.org/pypi/eater/\n :alt: Supported Python versions\n\n\nNot every API provider has an API as nice as Stripe_ and often their\ndocumentation is incorrect or (arguably better) non-existent.\n\nNot every API provider can manage their release cycle, like inform customers,\nconform to semantic version numbers etc..\n\nChances are, if you're reading this, you're trying to talk to an API just like\nthis.\n\nYou want to be sure, when you send them something, they give you the right\nthing back. That is, it contains the write shape of data and the correct data\ntypes and if you're really persnickety, that it validates against defined rules.\n\nWell, this Python library, with the help of schematics_, will allow you to do\njust that.\n\nInstall\n-------\n\n.. code-block:: bash\n\n pip install eater\n\n\nUsage\n-----\n\nNot that this has ever happened to anyone, ever... but let's say you are\ndealing with an API that you don't necessarily trust. Perhaps the API is in\nflux because it's alpha/beta or perhaps it's not versioned and changes get made\nwithout notifying users. In any case, you want to be sure that what it says it\ndoes, it definitely does.\n\nUsing eater, first you define the API to be consumed, in part using schematics_\nmodels.\n\n.. code-block:: python\n\n import eater\n from schematics import Model, IntegerType, StringType, BooleanType, ListType, ModelType\n\n class Book(Model):\n title = StringType(required=True, min_length=3)\n\n\n class Request(Model):\n \"\"\"\n Represents, as a Python object, the JSON data required by the API.\n \"\"\"\n in_print = BooleanType()\n\n\n class Response(Model):\n \"\"\"\n Represents, as a Python object, the JSON response returned by the API.\n \"\"\"\n books = ListType(ModelType(Book))\n\n class BooksAPI(eater.HTTPEater):\n url = 'https://example.com/books/'\n request_cls = Request\n response_cls = Response\n\n\nYou can then consume the API;\n\n.. code-block:: python\n\n api = BooksAPI()\n response = api(in_print=True)\n\n for book in response.books:\n print(book.title)\n\nSee the full documentation at https://readthedocs.org/projects/eater\n\nAuthor\n------\n\nAlex Hayes \n\n\n.. _schematics: http://github.com/schematics/schematics/\n.. _Stripe: https://stripe.com/docs/api\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/alexhayes/eater", "keywords": "schematics,xml,model,modelling,dicttoxml,xmltodict", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "eater", "package_url": "https://pypi.org/project/eater/", "platform": "any", "project_url": "https://pypi.org/project/eater/", "project_urls": { "Homepage": "http://github.com/alexhayes/eater" }, "release_url": "https://pypi.org/project/eater/0.4.0/", "requires_dist": [ "schematics (==2.0.0a1)", "requests (==2.12.1)" ], "requires_python": "", "summary": "Consume APIs and hold them to account.", "version": "0.4.0" }, "last_serial": 2507540, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "04c286a20cf1861d961a31f0c6a60df3", "sha256": "e0cb80e9dd20b67ac182efcafb4a7e50778ce66e73f05b01d88165070a6f88b5" }, "downloads": -1, "filename": "eater-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "04c286a20cf1861d961a31f0c6a60df3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9577, "upload_time": "2016-11-22T13:38:31", "url": "https://files.pythonhosted.org/packages/ec/8c/15c8fd704a39d10c33ca84c5a7b0a81e07b26b3b0273b65f90e0931c66ff/eater-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7c772b6392397b487e7a1b14b911591f", "sha256": "8f6119243d9fcadd4c3c81abf89b04d2b62cf788c26b009473088bc634ff2cbc" }, "downloads": -1, "filename": "eater-0.1.0.tar.gz", "has_sig": false, "md5_digest": "7c772b6392397b487e7a1b14b911591f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 901941, "upload_time": "2016-11-22T13:39:49", "url": "https://files.pythonhosted.org/packages/f0/0b/b6d6ab014d60fa33e64825de6364b1fb6731843cdf49d839de76ae43d7bd/eater-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "d36ea2a5da246175e6941f4252c923cf", "sha256": "0bbe6f084954b8f629c5e4a8952a2042d1b94b3d5c8d9ddaf07bc32139f7a09e" }, "downloads": -1, "filename": "eater-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d36ea2a5da246175e6941f4252c923cf", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10322, "upload_time": "2016-11-24T00:05:04", "url": "https://files.pythonhosted.org/packages/b1/0a/6179ee2502683a79949c50cbcc7674ac3486495d5fd8f83f59d5810fae9b/eater-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8344f3e232b4fc8a1a791f0e706bcb39", "sha256": "1de03bebef9017f61857c255790d163fee59a713db5181e4a8047174e60f1274" }, "downloads": -1, "filename": "eater-0.2.0.tar.gz", "has_sig": false, "md5_digest": "8344f3e232b4fc8a1a791f0e706bcb39", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 917169, "upload_time": "2016-11-24T00:05:09", "url": "https://files.pythonhosted.org/packages/b1/45/313017d213f163e6cd469dde4b4bdb2d6de1d038782e278ac2a56a5338a7/eater-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "4b33959c307fcb4e9073c27b6bafa97a", "sha256": "330793111d395d4b3deff118881b07c750ef5bb7f0c6cfdc5eaf57e0c2bfe9b6" }, "downloads": -1, "filename": "eater-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4b33959c307fcb4e9073c27b6bafa97a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10937, "upload_time": "2016-12-06T21:51:23", "url": "https://files.pythonhosted.org/packages/ee/1b/8914e16a7ba936cee369d3dc76ff3fb09fe12e384d4c3a4e8331a8ce33ab/eater-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "aef45354af4147f10987960b40f4e5a4", "sha256": "c9dbe08eccb6bbd815e95fdf986827a356117d7fe5286edbc4eea2bb7fef8043" }, "downloads": -1, "filename": "eater-0.3.0.tar.gz", "has_sig": false, "md5_digest": "aef45354af4147f10987960b40f4e5a4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 924563, "upload_time": "2016-12-06T21:51:28", "url": "https://files.pythonhosted.org/packages/e3/26/ed4faa7eea7e4205a949bbebe33a3ffd0e2c4235023e2eb89d89889d5cca/eater-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "d3259b32a6c565777964ae7efa6ebd51", "sha256": "4419eadc5b24f493d4686fcfbd0bc7fe3538ddf3637ca478025e7f44108842e9" }, "downloads": -1, "filename": "eater-0.3.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d3259b32a6c565777964ae7efa6ebd51", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11175, "upload_time": "2016-12-07T11:51:09", "url": "https://files.pythonhosted.org/packages/cf/52/c7e40fdaeea4deb8ef7470f9e0ea353a80d4aa9205b5f26e0ef81e37313d/eater-0.3.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "db928d8b2ecbb849ffaf344f66bfd5db", "sha256": "8022bf1a0879a7491e19c944e7e128bcb7d8cb10a6f9f217fb019212c880c51c" }, "downloads": -1, "filename": "eater-0.3.1.tar.gz", "has_sig": false, "md5_digest": "db928d8b2ecbb849ffaf344f66bfd5db", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 930232, "upload_time": "2016-12-07T11:51:20", "url": "https://files.pythonhosted.org/packages/03/03/c9bfa533e260dafaa488d19ad761022b064963429cbe2b8616a596862705/eater-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "10638bdc25bf3029ff4813fa8f17d67d", "sha256": "98ddb0368ce412d8f53d6ed04eda949c0fbe723d86e17a256da012407f3f8773" }, "downloads": -1, "filename": "eater-0.3.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "10638bdc25bf3029ff4813fa8f17d67d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11212, "upload_time": "2016-12-08T19:16:44", "url": "https://files.pythonhosted.org/packages/09/8a/4957ee47d1e706b1f093f128404b79666d8c2de78353c61bb6870ed478cb/eater-0.3.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7b8f6ea39f2b8a4167d14acec33adda2", "sha256": "ec18dab406eb77b94da6e1fa7ca54b3f26b2d6fba4f8d92ff4c61f16059bfc3b" }, "downloads": -1, "filename": "eater-0.3.2.tar.gz", "has_sig": false, "md5_digest": "7b8f6ea39f2b8a4167d14acec33adda2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 930327, "upload_time": "2016-12-08T19:16:49", "url": "https://files.pythonhosted.org/packages/75/1f/e3ad27037b57e2663ce7d37243a6545e9ecb552cc74a15e51ee598c0c5aa/eater-0.3.2.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "5495fff13a8b09aa0035216bbfe2eb46", "sha256": "48a0467199d0e00297da3c86bbfdbba99d3171698704239fcfa3087c20eb3a67" }, "downloads": -1, "filename": "eater-0.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5495fff13a8b09aa0035216bbfe2eb46", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11508, "upload_time": "2016-12-08T20:18:29", "url": "https://files.pythonhosted.org/packages/99/b9/46e0387496a0390c5fb0a4b580bb55579d3df09629b16df8d97400c549e7/eater-0.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "37a5c17a6fd0603bef8326e0a35b8f1f", "sha256": "4697bf2e9b1c96defa5dec11ea64b3ebe933f75d54d8f509aaabfa260b8b959a" }, "downloads": -1, "filename": "eater-0.4.0.tar.gz", "has_sig": false, "md5_digest": "37a5c17a6fd0603bef8326e0a35b8f1f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 930659, "upload_time": "2016-12-08T20:18:34", "url": "https://files.pythonhosted.org/packages/c4/08/4173360f04f79a138fcdce7365de70204c0ef2fb2500b358cdb7144bb81e/eater-0.4.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5495fff13a8b09aa0035216bbfe2eb46", "sha256": "48a0467199d0e00297da3c86bbfdbba99d3171698704239fcfa3087c20eb3a67" }, "downloads": -1, "filename": "eater-0.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5495fff13a8b09aa0035216bbfe2eb46", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11508, "upload_time": "2016-12-08T20:18:29", "url": "https://files.pythonhosted.org/packages/99/b9/46e0387496a0390c5fb0a4b580bb55579d3df09629b16df8d97400c549e7/eater-0.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "37a5c17a6fd0603bef8326e0a35b8f1f", "sha256": "4697bf2e9b1c96defa5dec11ea64b3ebe933f75d54d8f509aaabfa260b8b959a" }, "downloads": -1, "filename": "eater-0.4.0.tar.gz", "has_sig": false, "md5_digest": "37a5c17a6fd0603bef8326e0a35b8f1f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 930659, "upload_time": "2016-12-08T20:18:34", "url": "https://files.pythonhosted.org/packages/c4/08/4173360f04f79a138fcdce7365de70204c0ef2fb2500b358cdb7144bb81e/eater-0.4.0.tar.gz" } ] }