{ "info": { "author": "Justin Dane Vrana", "author_email": "justin.vrana@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "|travis build| |Coverage Status|\n\n|pillow\\_talk\\_icon| # **Pillowtalk**\n\nCreates intuitive python wrappers for APIs. **Pillowtalk** talks to APIs\nand handles all of the model relationships behind the scenes, providing\na clean and easy-to-use wrapper for your models.\n\nWhy another package?\n====================\n\nWhile there are plenty of excellent libraries for creating APIs, but\ncreating intuitive wrappers for these APIs isn't entirely\nstraightforward. **Pillowtalk** cleanly captures the underlying database\nrelationships APIs may be providing making it easy to write python\nmodels. It provides a wrapper for making intuitive live API calls using\nyour python models and the underlying relationships you specified.\n\nIn future versions, **pillowtalk** will be able to create and update\nyour code based on a list of JSON files and *guess* at the underlying\nrelationships between models. From there, **pillowtalk** will\nautomatically generate or update python models. This means changes to\nsome API can trigger an automatic update to your python wrapper to that\nAPI!\n\nFeatures and Examples\n=====================\n\nMinimalistic models with relationships\n--------------------------------------\n\ne.g. Person with ONE Address; Address has MANY people\n\n.. code:: python\n\n class MyBase(PillowtalkBase):\n @classmethod\n def find(cls, id):\n ...\n \n def where(cls, data):\n ...\n\n @add_schema\n class Person(MyBase):\n FIELDS = [\"id\", \"name\"]\n RELATIONSHIPS = [\n One(\"address\", \"find Person.address_id <> Address.id\")\n ]\n \n @add_schema\n class Address(MyBase):\n FIELDS = [\"id\", \"str\"]\n RELATIONSHIPS = [\n Many(\"people\", \"where Address.id <> Person.address_id\")\n ]\n\nIntuitive calls uses live API connection to deserialize data to your\nmodels\n\n.. code:: python\n\n # address.people doesn't exist yet\n address = Address.find(3)\n\n # calling .people causes a api call using \"where\" and deserialization of data\n people = address.people # returns a list of People objects found through \"where\"\n\n # returned is a list of Person objects!\n assert type(people[0]) is Person \n\nHandling impartial data\n\n.. code:: python\n\n person = {\n \"id\": 5,\n \"name\": \"Joe\",\n \"address\": {\"id\": 4}\n }\n\n p = Person.load(person_data)\n\n # a.address will magically return Address object even though data is enveloped in a json.\n # we do not specifically have to handle deserialization of impartial data since the\n # relationship between Person.address_id <> Address.id was already defined.\n a = p.address\n assert type(a) is Address\n assert person.address_id == 4 # this wasn't defined explicitly but it is inferred from \"address\": {\"id\": 4}\n\nMore examples and magic to come!\n--------------------------------\n\n::\n\n Other things include:\n * Magic chaining in relationships\n * Session managing suggestions\n * automatically creating model skeletons from list of JSON\n * model relationships through associations\n * examples of connecting to MySQL or SQLlite\n * examples of using CLI through hug\n \n\n.. |travis build| image:: https://img.shields.io/travis/jvrana/**Pillowtalk**.svg\n :target: https://travis-ci.org/jvrana/**Pillowtalk**\n.. |Coverage Status| image:: https://coveralls.io/repos/github/jvrana/**Pillowtalk**/badge.svg?branch=master\n :target: https://coveralls.io/github/jvrana/**Pillowtalk**?branch=master\n.. |pillow\\_talk\\_icon| image:: images/pillowtalk_icon_medium.png?raw=true", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jvrana/pillowtalk", "keywords": "serialization marshmallow deserialization orm api-wrapper api", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pillowtalk", "package_url": "https://pypi.org/project/pillowtalk/", "platform": "", "project_url": "https://pypi.org/project/pillowtalk/", "project_urls": { "Homepage": "https://github.com/jvrana/pillowtalk" }, "release_url": "https://pypi.org/project/pillowtalk/1.1.0a/", "requires_dist": null, "requires_python": "", "summary": "Intuitive API wrapper framework using marshmallow", "version": "1.1.0a" }, "last_serial": 3300610, "releases": { "1.0.2a": [ { "comment_text": "", "digests": { "md5": "2bf0ba424661b603e9663acef8261d97", "sha256": "65980a98382976a695b5b322d3089c71b6250bb079e4857a9f3d35de20c661d1" }, "downloads": -1, "filename": "pillowtalk-1.0.2a.tar.gz", "has_sig": false, "md5_digest": "2bf0ba424661b603e9663acef8261d97", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9574, "upload_time": "2017-10-23T00:32:01", "url": "https://files.pythonhosted.org/packages/17/e3/442ff2556c6ae5c1f1009fa0bc7434e6a21066198f55659629ba15bb0ede/pillowtalk-1.0.2a.tar.gz" } ], "1.0.alpha": [ { "comment_text": "", "digests": { "md5": "db16c8f55674d37fb0dfef4e2b784421", "sha256": "76d177e9d68acb00151c0ee95a73b582573518686fb61b5007bdd77b7bf61221" }, "downloads": -1, "filename": "pillowtalk-1.0.alpha.tar.gz", "has_sig": false, "md5_digest": "db16c8f55674d37fb0dfef4e2b784421", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9459, "upload_time": "2017-10-22T21:27:26", "url": "https://files.pythonhosted.org/packages/fb/6f/3078df4ae0a30432fe1ca5c6942d6637d9d28b9e770c7ec67a9716e94e53/pillowtalk-1.0.alpha.tar.gz" } ], "1.1.0a": [ { "comment_text": "", "digests": { "md5": "41dcd84598949be55e4d0149905e232e", "sha256": "9b8085e8f414f45dc3274fb4152c0386c5e856a5de901d7d29f66598eb22b3a3" }, "downloads": -1, "filename": "pillowtalk-1.1.0a.tar.gz", "has_sig": false, "md5_digest": "41dcd84598949be55e4d0149905e232e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10538, "upload_time": "2017-11-02T15:53:15", "url": "https://files.pythonhosted.org/packages/48/13/41196efd09c0e22163a23adae83cf018c05cca7d5619bc835a2aff3f2b0a/pillowtalk-1.1.0a.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "41dcd84598949be55e4d0149905e232e", "sha256": "9b8085e8f414f45dc3274fb4152c0386c5e856a5de901d7d29f66598eb22b3a3" }, "downloads": -1, "filename": "pillowtalk-1.1.0a.tar.gz", "has_sig": false, "md5_digest": "41dcd84598949be55e4d0149905e232e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10538, "upload_time": "2017-11-02T15:53:15", "url": "https://files.pythonhosted.org/packages/48/13/41196efd09c0e22163a23adae83cf018c05cca7d5619bc835a2aff3f2b0a/pillowtalk-1.1.0a.tar.gz" } ] }