{"id":37071899,"url":"https://github.com/jvrana/pillowtalk","last_synced_at":"2026-01-14T08:26:34.393Z","repository":{"id":57452747,"uuid":"105574428","full_name":"jvrana/Pillowtalk","owner":"jvrana","description":"Creates intuitive python wrapper for APIs. Grabs only the data when you need it in ways that make sense.","archived":true,"fork":false,"pushed_at":"2018-02-05T18:36:04.000Z","size":2010,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-20T04:19:19.755Z","etag":null,"topics":["api-wrapper","deserialization","intuitive-calls","marshmallow","orm","python-interface","python-models","serialization"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jvrana.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-02T19:14:11.000Z","updated_at":"2023-01-28T12:52:08.000Z","dependencies_parsed_at":"2022-09-02T07:01:20.598Z","dependency_job_id":null,"html_url":"https://github.com/jvrana/Pillowtalk","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/jvrana/Pillowtalk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvrana%2FPillowtalk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvrana%2FPillowtalk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvrana%2FPillowtalk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvrana%2FPillowtalk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jvrana","download_url":"https://codeload.github.com/jvrana/Pillowtalk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvrana%2FPillowtalk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28413960,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:16:59.381Z","status":"ssl_error","status_checked_at":"2026-01-14T08:13:45.490Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-wrapper","deserialization","intuitive-calls","marshmallow","orm","python-interface","python-models","serialization"],"created_at":"2026-01-14T08:26:33.692Z","updated_at":"2026-01-14T08:26:34.366Z","avatar_url":"https://github.com/jvrana.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"|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 \u003c\u003e Address.id\")\n        ]\n          \n    @add_schema\n    class Address(MyBase):\n        FIELDS = [\"id\", \"str\"]\n        RELATIONSHIPS = [\n          Many(\"people\", \"where Address.id \u003c\u003e 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 \u003c\u003e 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\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjvrana%2Fpillowtalk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjvrana%2Fpillowtalk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjvrana%2Fpillowtalk/lists"}