{ "info": { "author": "willemt", "author_email": "himself@willemthiart.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: System :: Logging" ], "description": "Py2graphql\n##########\n\n|pypi|\n\n1. GraphQL\n2. Django queryset love\n3. ``__getattr__`` abuse\n4. ???\n5. Profit!!!\n\n\nWhat\n----\npy2graphql is a Python GraphQL client that makes GraphQL feel better to use. It almost feels like you're using Django's ORM.\n\n\nInstallation\n------------\n.. code-block:: bash\n :class: ignore\n\n pip install py2graphql\n\n\nExample\n-------\n\nThis Python equates to the following GraphQL.\n\n.. code-block:: python\n :class: ignore\n\n from py2graphql import Query\n\n Query().repository(owner='juliuscaeser', name='rome').pullRequest(number=2).values('title', 'url').commits(last=250).edges.node.commit.values('id', 'message', 'messageBody')\n\n.. code-block::\n :class: ignore\n\n query {\n repository(owner: \"juliuscaeser\", name: \"rome\") {\n pullRequest(number: 2) {\n title\n url\n commits(last: 250) {\n edges {\n node {\n commit {\n id\n message\n messageBody\n }\n }\n }\n }\n }\n }\n }\n\nYou can even use the library to do the HTTP requests:\n\n.. code-block:: python\n :class: ignore\n\n from py2graphql import Client\n\n headers = {\n 'Authorization': 'token MY_TOKEN',\n }\n Client(url=THE_URL, headers=headers).query().repository(owner='juliuscaeser', name='rome').fetch()\n\nIt also supports Mutations:\n\n.. code-block:: python\n :class: ignore\n\n from py2graphql import Client, Query\n\n headers = {\n 'Authorization': 'token MY_TOKEN',\n }\n client = Client(url=THE_URL, headers=headers)\n mutation = Query(name='mutation', client=client)\n\n\nAnd multiple queries in a single request:\n\n.. code-block:: python\n :class: ignore\n\n from py2graphql import Client, Query\n\n headers = {\n 'Authorization': 'token MY_TOKEN',\n }\n query = Client(url=THE_URL, headers=headers).query().repository(owner='juliuscaeser', name='rome')\n query.pullRequest(number=2).values('title', 'url')\n query.releases(first=10).edges.node.values('name')\n query.get_graphql()\n\n.. code-block::\n :class: ignore\n\n query {\n repository(owner: \"juliuscaeser\", name: \"rome\") {\n pullRequest(number: 2) {\n title\n url\n }\n releases(first: 10) {\n edges {\n node {\n name\n }\n }\n }\n }\n }\n\nAs well as GraphQL errors:\n\n.. code-block:: python\n :class: ignore\n\n from py2graphql import Client, Query\n\n headers = {\n 'Authorization': 'token MY_TOKEN',\n }\n result = Client(url=THE_URL, headers=headers).query().repository(owner='juliuscaeser', name='rome').fetch()\n result._errors\n [{'message': \"Field 'repository' is missing required arguments: name\", 'locations': [{'line': 7, 'column': 3}]}]\n\n\n.. |pypi| image:: https://img.shields.io/pypi/v/py2graphql.svg?style=flat\n :target: https://pypi.python.org/pypi/py2graphql\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/willemt/py2graphql", "keywords": "development", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "py2graphql", "package_url": "https://pypi.org/project/py2graphql/", "platform": "", "project_url": "https://pypi.org/project/py2graphql/", "project_urls": { "Homepage": "https://github.com/willemt/py2graphql" }, "release_url": "https://pypi.org/project/py2graphql/0.5.4/", "requires_dist": null, "requires_python": "", "summary": "Pythonic GraphQL client", "version": "0.5.4" }, "last_serial": 5925970, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "c8e41242fa8e0695dbf9fb0f5cbabaf7", "sha256": "b9372fb9a6882575ba7f239d15429a7d4c48a583aed85c53bf302064f61f3c99" }, "downloads": -1, "filename": "py2graphql-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c8e41242fa8e0695dbf9fb0f5cbabaf7", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 4595, "upload_time": "2018-06-29T23:38:25", "url": "https://files.pythonhosted.org/packages/9d/cc/3790adcf8b57038f810b898adafcbb89c87461dd699b16f9dbb2db7f5c08/py2graphql-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1c8adea6c01e0a9ac4b07ffc24d1f445", "sha256": "ed0f3f325e4011a0e7aff0ad1534f5c5c55465cefe98a5beeb764077d868c3c4" }, "downloads": -1, "filename": "py2graphql-0.1.0.tar.gz", "has_sig": false, "md5_digest": "1c8adea6c01e0a9ac4b07ffc24d1f445", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3958, "upload_time": "2018-06-29T23:38:22", "url": "https://files.pythonhosted.org/packages/46/cf/c653c657f5b4269be148b06617d32f788c4c04594ec71ca76ce08c8dccf3/py2graphql-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "6d0148ac40972d4467dfb2e100a0e7ba", "sha256": "79fc6b046d7f17737770ccb463eaf3f9aa9d4e4837dc5557acc0b205df24d697" }, "downloads": -1, "filename": "py2graphql-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6d0148ac40972d4467dfb2e100a0e7ba", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 5145, "upload_time": "2018-10-11T23:54:01", "url": "https://files.pythonhosted.org/packages/9b/17/523218cc0c50b8f39335c59f6c04f4ce92a956c701e715d44e7a27765049/py2graphql-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c77237fee79008eebd88ab28409fc35f", "sha256": "0faeb1a54678178f14ef18cf6a3b560e19f1ad171e04dd1fa618f3b976585522" }, "downloads": -1, "filename": "py2graphql-0.2.0.tar.gz", "has_sig": false, "md5_digest": "c77237fee79008eebd88ab28409fc35f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3953, "upload_time": "2018-10-11T23:53:58", "url": "https://files.pythonhosted.org/packages/cc/96/921ec0f77bc2912ae80522d64ce27f42f9b509d634ac42489310e0b6e7e9/py2graphql-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "65fb1d48df1be0fdf776420b6651a581", "sha256": "9e34f2885c2b3374ce576d9a27b021ce9232c56e4acb60e40ceb9770cbdbcc22" }, "downloads": -1, "filename": "py2graphql-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "65fb1d48df1be0fdf776420b6651a581", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 5554, "upload_time": "2018-10-16T23:18:18", "url": "https://files.pythonhosted.org/packages/dc/e3/f3af758c15bc2c9fcf60fb524edf418d1b28f4c0c8398a34131274e291b3/py2graphql-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "da28e1edd642dabe54c28ce6c46b5f7f", "sha256": "2ec2b65d0fc49e42207e5f073ada34691ce4da297d109bd74988631f908da1f4" }, "downloads": -1, "filename": "py2graphql-0.3.0.tar.gz", "has_sig": false, "md5_digest": "da28e1edd642dabe54c28ce6c46b5f7f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4607, "upload_time": "2018-10-16T23:18:15", "url": "https://files.pythonhosted.org/packages/f2/57/7f82696a9506c932949c073000203f87bda8a9dd5c3f111ed732a84e2d99/py2graphql-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "40cabda0b1100f67fb6350c62d637e25", "sha256": "b890450a9139721ea565ada04abe83c33da3ec6413746e749ec2c7f976e68c5c" }, "downloads": -1, "filename": "py2graphql-0.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "40cabda0b1100f67fb6350c62d637e25", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 6751, "upload_time": "2019-07-24T05:10:31", "url": "https://files.pythonhosted.org/packages/fa/91/e7d3d36031b0b7e6f84174679293452d1b833e58052d640c8e0995757d6b/py2graphql-0.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f6a6b566b16175d442cb63ef3572c968", "sha256": "b0713e600b95f00d7b8faee4f257041411a63f861704b272f68b4ac695e8ebc6" }, "downloads": -1, "filename": "py2graphql-0.4.0.tar.gz", "has_sig": false, "md5_digest": "f6a6b566b16175d442cb63ef3572c968", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4793, "upload_time": "2019-07-24T05:10:28", "url": "https://files.pythonhosted.org/packages/f3/1e/f8a005afd0b492aefdbcf2ee5cf2877fd3d832d82ad99e659354131769ff/py2graphql-0.4.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "f51df3a7ccd16a54c803e5df7de5dfca", "sha256": "fd782e34b703e289dd35eb5fcfaaa25f06a7fe3eda6860a82f96c374cffbe8ae" }, "downloads": -1, "filename": "py2graphql-0.5.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f51df3a7ccd16a54c803e5df7de5dfca", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 6782, "upload_time": "2019-08-01T02:06:14", "url": "https://files.pythonhosted.org/packages/fd/1b/ffe26aaa5dbb6abf30d9cde06874241ae26f3f16e1f0dd26b484cf39f3b3/py2graphql-0.5.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "eecda79a5dead7c98b59690b55938e32", "sha256": "3f8b3821d0de1c0a322d60a2f9d9f731f3720178264e558ae07509b7466ddc16" }, "downloads": -1, "filename": "py2graphql-0.5.0.tar.gz", "has_sig": false, "md5_digest": "eecda79a5dead7c98b59690b55938e32", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4824, "upload_time": "2019-08-01T02:06:11", "url": "https://files.pythonhosted.org/packages/81/27/e002f6b9819bd411ee7cf1783cdbd9d70f5829c12819636826f7d02fab31/py2graphql-0.5.0.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "80db5aa758ad4a7e8e2c73b43474bc77", "sha256": "574db4833d74be203cb190c665128f0d94325fc44d511ff3d6c68586b5d866fc" }, "downloads": -1, "filename": "py2graphql-0.5.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "80db5aa758ad4a7e8e2c73b43474bc77", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 6801, "upload_time": "2019-08-15T04:44:44", "url": "https://files.pythonhosted.org/packages/71/b4/6d09a440379ac7dcff5cf315b406449af430871477ab360a5be900695004/py2graphql-0.5.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "64d383023b11597c1c9207dc49454b58", "sha256": "db5317d240f66524b7cb2c0bfaf37aa8cd10fc255681d799d7f0cb5d40e3e96c" }, "downloads": -1, "filename": "py2graphql-0.5.1.tar.gz", "has_sig": false, "md5_digest": "64d383023b11597c1c9207dc49454b58", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4844, "upload_time": "2019-08-15T04:44:42", "url": "https://files.pythonhosted.org/packages/e9/63/4471330a470642884fb723ada42a6b403fed779084ef983362798e2cd513/py2graphql-0.5.1.tar.gz" } ], "0.5.3": [ { "comment_text": "", "digests": { "md5": "4b0fdc1d4c7dd696327b1898999318d8", "sha256": "e8140bfeda6b716e1f67520758ebd5314895ace7e36bc5455754834b182349be" }, "downloads": -1, "filename": "py2graphql-0.5.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4b0fdc1d4c7dd696327b1898999318d8", "packagetype": "bdist_wheel", "python_version": "3.7", "requires_python": null, "size": 7109, "upload_time": "2019-09-26T01:06:09", "url": "https://files.pythonhosted.org/packages/78/ff/7d8a7f8f98b3379f8959c4cf011a3741c789979fca19138c4316a55642cb/py2graphql-0.5.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "559bf099ade776a69558083c79f7c1b2", "sha256": "4382bc5824b7d46ebab61f9d1db5fe8b0ea68ef62f86243be92a76f9bc5007e5" }, "downloads": -1, "filename": "py2graphql-0.5.3.tar.gz", "has_sig": false, "md5_digest": "559bf099ade776a69558083c79f7c1b2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5146, "upload_time": "2019-09-26T01:06:06", "url": "https://files.pythonhosted.org/packages/78/9d/83af365241518a778092898fe3d868a3a5ef44fb2f932729563e7feda587/py2graphql-0.5.3.tar.gz" } ], "0.5.4": [ { "comment_text": "", "digests": { "md5": "4525a67c5e6937e562caa752ef941b98", "sha256": "4e89076e1c2f556ce1c375f580f8c40add9cdad74a6a38295b6c3e6f01e7d479" }, "downloads": -1, "filename": "py2graphql-0.5.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4525a67c5e6937e562caa752ef941b98", "packagetype": "bdist_wheel", "python_version": "3.7", "requires_python": null, "size": 7140, "upload_time": "2019-10-04T00:31:08", "url": "https://files.pythonhosted.org/packages/84/9e/3d0491061c65f56f65d21549f9f5663ed4392a3cc77a7faef09abdae186c/py2graphql-0.5.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2552cd50a7b14eaea6524580313f3c36", "sha256": "8294430098312930e68ad2bd0e6f4e7a6ea91bc1509ad6a4666fb482b0f05d48" }, "downloads": -1, "filename": "py2graphql-0.5.4.tar.gz", "has_sig": false, "md5_digest": "2552cd50a7b14eaea6524580313f3c36", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5177, "upload_time": "2019-10-04T00:31:05", "url": "https://files.pythonhosted.org/packages/1f/42/0152eff7d1a836f1ae5255d1c2e2269c644f5e871e123a85cc45d1ab6e94/py2graphql-0.5.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4525a67c5e6937e562caa752ef941b98", "sha256": "4e89076e1c2f556ce1c375f580f8c40add9cdad74a6a38295b6c3e6f01e7d479" }, "downloads": -1, "filename": "py2graphql-0.5.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4525a67c5e6937e562caa752ef941b98", "packagetype": "bdist_wheel", "python_version": "3.7", "requires_python": null, "size": 7140, "upload_time": "2019-10-04T00:31:08", "url": "https://files.pythonhosted.org/packages/84/9e/3d0491061c65f56f65d21549f9f5663ed4392a3cc77a7faef09abdae186c/py2graphql-0.5.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2552cd50a7b14eaea6524580313f3c36", "sha256": "8294430098312930e68ad2bd0e6f4e7a6ea91bc1509ad6a4666fb482b0f05d48" }, "downloads": -1, "filename": "py2graphql-0.5.4.tar.gz", "has_sig": false, "md5_digest": "2552cd50a7b14eaea6524580313f3c36", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5177, "upload_time": "2019-10-04T00:31:05", "url": "https://files.pythonhosted.org/packages/1f/42/0152eff7d1a836f1ae5255d1c2e2269c644f5e871e123a85cc45d1ab6e94/py2graphql-0.5.4.tar.gz" } ] }