{ "info": { "author": "NSO / AURA", "author_email": "\"swiant@nso.edu\"", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7" ], "description": "gqlclient\n=========\n\n|codecov|\n\n\n.. image:: https://readthedocs.org/projects/graphql-client/badge/?version=latest\n :target: https://dkistdc.readthedocs.io/projects/graphql-client/en/latest/?badge=latest\n :alt: Documentation Status\n\nA pythonic interface for making requests to a GraphQL server using\nstandard library or pydantic dataclasses to spare you from string manipulation.\n\nFeatures\n--------\n\n- Use standard library dataclasses to specify graphql parameters and responses\n\n- Use `pydantic `__ dataclasses to\n specify graphql parameters and responses that have type validation\n\n- Create and execute GraphQL Queries based upon typed models\n\n- Create and execute GraphQL Mutations based upon typed models\n\n- Async support\n\nInstallation\n------------\n\n.. code:: bash\n\n pip install gqlclient\n\nwith ``asyncio`` support\n\n.. code:: bash\n\n pip install gqlclient[async]\n\nExamples\n--------\n\n**Query**\n\n.. code:: python\n\n from pydantic.dataclasses import dataclass\n\n from gqlclient import GraphQLClient\n\n @dataclass\n class Parameters:\n attr_one: str\n attr_two: int\n\n @dataclass\n class Response:\n attr_three: int\n attr_four: str\n \n client = GraphQLClient(gql_uri=\"http://localhost:5000/graphql\")\n parameters = Parameters(attr_one=\"foo\", attr_two=3)\n query = client.get_query(query_base=\"baseType\", query_response_cls=Response, query_parameters=parameters)\n print(query)\n #{'query': '{baseType(attr_one: \"foo\", attr_two: 3){attr_three, attr_four} }'}\n response = client.execute_gql_query(query_base=\"baseType\", query_response_cls=Response, query_parameters=parameters)\n print(response)\n #{\"baseType\"{\"attr_three\":5, \"attr_four\":\"bar\"}}\n\n**Mutation**\n\n.. code:: python\n\n from pydantic.dataclasses import dataclass\n\n from gqlclient import GraphQLClient\n\n\n @dataclass\n class Parameters:\n attr_one: str\n attr_two: int\n\n\n @dataclass\n class Response:\n attr_three: int\n attr_four: str\n \n client = GraphQLClient(gql_uri=\"http://localhost:5000/graphql\")\n parameters = Parameters(attr_one=\"foo\", attr_two=3)\n query = client.get_mutation(mutation_base=\"baseMutation\", mutation_response_cls=Response, mutation_parameters=parameters)\n print(query)\n #{'query': 'mutation baseType {baseType(attr_one: \"foo\", attr_two: 3){ok, attr_three, attr_four} }', 'operationName': 'baseType'}\n\n response = client.execute_gql_mutation(mutation_base=\"baseMutation\", mutation_response_cls=Response, mutation_parameters=parameters)\n print(response)\n #{\"baseMutation\": {\"ok\": true, \"Response\": {\"attr_three\":5, \"attr_four\":\"bar\"} }}\n\n.. |codecov| image:: https://codecov.io/bb/dkistdc/graphql_client/branch/master/graph/badge.svg\n :target: https://codecov.io/bb/dkistdc/graphql_client", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/dkistdc/graphql_client/src/master/", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "gqlclient", "package_url": "https://pypi.org/project/gqlclient/", "platform": "", "project_url": "https://pypi.org/project/gqlclient/", "project_urls": { "Homepage": "https://bitbucket.org/dkistdc/graphql_client/src/master/" }, "release_url": "https://pypi.org/project/gqlclient/0.7.3/", "requires_dist": null, "requires_python": ">=3.6", "summary": "Client library for making graphql calls", "version": "0.7.3" }, "last_serial": 5885831, "releases": { "0.1.1rc3": [ { "comment_text": "", "digests": { "md5": "19fa1ba23d23c0ff3abeb12a498d6ac5", "sha256": "f7afd703aff1272e7570623cf1305f93f4872f0858132ef7e662d0222f3d8587" }, "downloads": -1, "filename": "gqlclient-0.1.1rc3.tar.gz", "has_sig": false, "md5_digest": "19fa1ba23d23c0ff3abeb12a498d6ac5", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 7610, "upload_time": "2019-08-08T21:01:31", "url": "https://files.pythonhosted.org/packages/04/41/bb5b9384f2bc92df5c491b1e7d787d9f6ca40b7040aa8eddbaa92d90b1e2/gqlclient-0.1.1rc3.tar.gz" } ], "0.1.1rc4": [ { "comment_text": "", "digests": { "md5": "c2bc20410ea24e5273feeec608fbfc38", "sha256": "cb99b6e0afd26f9dbac6a8be60bb25cc72a83233b9ba0217bd42e96f62e2550d" }, "downloads": -1, "filename": "gqlclient-0.1.1rc4.tar.gz", "has_sig": false, "md5_digest": "c2bc20410ea24e5273feeec608fbfc38", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8308, "upload_time": "2019-08-08T21:04:24", "url": "https://files.pythonhosted.org/packages/66/2e/30ce421d6d0d30021bc7e3176e5f5671869132dff2114efbd86b1fcda2a2/gqlclient-0.1.1rc4.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "eb0d625c40269c4bde9cdfa593e4299d", "sha256": "5a6440468c07393ad38e776b65016a7006a7e6424c62a214c4974eba161fd066" }, "downloads": -1, "filename": "gqlclient-0.2.tar.gz", "has_sig": false, "md5_digest": "eb0d625c40269c4bde9cdfa593e4299d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8290, "upload_time": "2019-08-08T21:07:32", "url": "https://files.pythonhosted.org/packages/99/47/65bd608c30ee25c5aa5fa2bbb9f77ede269e8da21a9a3c90ded62901576a/gqlclient-0.2.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "092d75dff0138048904c71d70e98c632", "sha256": "77f1dc0f0b2ab593cc2c04505d61902afe9e7cb5b2d33089fc3644a6949b65fb" }, "downloads": -1, "filename": "gqlclient-0.4.tar.gz", "has_sig": false, "md5_digest": "092d75dff0138048904c71d70e98c632", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8951, "upload_time": "2019-08-08T21:25:17", "url": "https://files.pythonhosted.org/packages/db/26/74bbe108fbd68a13f6e0354481d6bf7be5258c88eb9cebae1a7c11e941e5/gqlclient-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "36e6a9455bb994a61851d74f33e43004", "sha256": "03f2f2021c357690cf1ab29691f74d2f751fcf254bf2d4e57c783d6fd4d309d1" }, "downloads": -1, "filename": "gqlclient-0.5.tar.gz", "has_sig": false, "md5_digest": "36e6a9455bb994a61851d74f33e43004", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8949, "upload_time": "2019-08-08T21:39:00", "url": "https://files.pythonhosted.org/packages/b5/ff/3eaa61f1d33dd034710bc20604acd9a7b96232cf989c4381ea4b58596526/gqlclient-0.5.tar.gz" } ], "0.5rc1": [ { "comment_text": "", "digests": { "md5": "15640abca7369012b943d024c6a9574a", "sha256": "c090eef573e712d5903521ee3b3c6ce4799db4ebab5ba641fc54b56a9ab97d6d" }, "downloads": -1, "filename": "gqlclient-0.5rc1.tar.gz", "has_sig": false, "md5_digest": "15640abca7369012b943d024c6a9574a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8972, "upload_time": "2019-08-08T22:04:12", "url": "https://files.pythonhosted.org/packages/38/14/80e9547f2d50db21c3661b24db9e091a63eee4f47c8ad81a2530f879320e/gqlclient-0.5rc1.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "d41357337c5cd39aa58368ee088e78a9", "sha256": "7bb2b4f751474651aba9a5a2d5f829a29c1095cb361d170f9fa3f8f6137121b4" }, "downloads": -1, "filename": "gqlclient-0.6.tar.gz", "has_sig": false, "md5_digest": "d41357337c5cd39aa58368ee088e78a9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8971, "upload_time": "2019-08-08T22:21:19", "url": "https://files.pythonhosted.org/packages/d1/66/f2e804804b4c253447edf45ef51a8f17c645113aa7705534ec49dc842e69/gqlclient-0.6.tar.gz" } ], "0.6rc1": [ { "comment_text": "", "digests": { "md5": "12b73e98eece5600c6bb329f07081999", "sha256": "94d7e9681fb04995a1a38fdb4b075df277564d66bf12a9e71f633a959bc8f8b4" }, "downloads": -1, "filename": "gqlclient-0.6rc1.tar.gz", "has_sig": false, "md5_digest": "12b73e98eece5600c6bb329f07081999", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8974, "upload_time": "2019-08-08T22:09:17", "url": "https://files.pythonhosted.org/packages/a4/97/3e586bc2b2d2d92b8620e6823362b25eee650103f29fb6370e441a765ee7/gqlclient-0.6rc1.tar.gz" } ], "0.6rc2": [ { "comment_text": "", "digests": { "md5": "ccdc6d44799d3691d0a4a872b239e234", "sha256": "0cc5bf0f85c0c92b2770e4846b36930400942b9901ecef2edc7a9d22c2443b47" }, "downloads": -1, "filename": "gqlclient-0.6rc2.tar.gz", "has_sig": false, "md5_digest": "ccdc6d44799d3691d0a4a872b239e234", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8979, "upload_time": "2019-08-08T22:16:32", "url": "https://files.pythonhosted.org/packages/8d/25/d648af53c60966a965a00e73d0e309a6de2bc14cb57398f69305abe4e27f/gqlclient-0.6rc2.tar.gz" } ], "0.7.0rc2": [ { "comment_text": "", "digests": { "md5": "8a76bc7ced0af72d9f6a1645a0830b16", "sha256": "6e1b51336d02b7e07f57087e6bc39f5d81f637e1db177bab61f9a99984f29882" }, "downloads": -1, "filename": "gqlclient-0.7.0rc2.tar.gz", "has_sig": false, "md5_digest": "8a76bc7ced0af72d9f6a1645a0830b16", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 10517, "upload_time": "2019-09-23T21:41:59", "url": "https://files.pythonhosted.org/packages/01/28/a2289098867b2f80d29002f8b2ebbc2e10a4a020ce2eea83865ec054f860/gqlclient-0.7.0rc2.tar.gz" } ], "0.7.1": [ { "comment_text": "", "digests": { "md5": "8c7f6da5e08dc674c485ce0748bf7268", "sha256": "c6aca63175c5f31130bf8c7414d4119f608fc2f19106dcec3e836c8735698a24" }, "downloads": -1, "filename": "gqlclient-0.7.1.tar.gz", "has_sig": false, "md5_digest": "8c7f6da5e08dc674c485ce0748bf7268", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 10520, "upload_time": "2019-09-23T21:46:47", "url": "https://files.pythonhosted.org/packages/e7/86/67bff2c1b6800f94ecf19c1e36194858a24518b2ca5dfdc460df9f85c7a1/gqlclient-0.7.1.tar.gz" } ], "0.7.2": [ { "comment_text": "", "digests": { "md5": "8a0a13aa13bd8b96d2df52b252daf3e6", "sha256": "9b366ff7f6a7482b46152b59cc4efce4e0fd3911fdd069858cc2912910f8dee3" }, "downloads": -1, "filename": "gqlclient-0.7.2.tar.gz", "has_sig": false, "md5_digest": "8a0a13aa13bd8b96d2df52b252daf3e6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 10737, "upload_time": "2019-09-24T16:00:38", "url": "https://files.pythonhosted.org/packages/a1/77/4a626cc2fe04e06b5d35ce193e852e3f48fe06e26e28e6308747b1f04205/gqlclient-0.7.2.tar.gz" } ], "0.7.3": [ { "comment_text": "", "digests": { "md5": "8b69527e54132299b45c05698d5fa959", "sha256": "a4ca5da07c4ca53927bf0f2e5d0308eb685b30423607c9b93812936f15124062" }, "downloads": -1, "filename": "gqlclient-0.7.3.tar.gz", "has_sig": false, "md5_digest": "8b69527e54132299b45c05698d5fa959", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 10727, "upload_time": "2019-09-25T15:04:57", "url": "https://files.pythonhosted.org/packages/2a/84/d936059e6743d89943cfb9a9902c0bd8eb101369369d9f32d37da4600bbe/gqlclient-0.7.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8b69527e54132299b45c05698d5fa959", "sha256": "a4ca5da07c4ca53927bf0f2e5d0308eb685b30423607c9b93812936f15124062" }, "downloads": -1, "filename": "gqlclient-0.7.3.tar.gz", "has_sig": false, "md5_digest": "8b69527e54132299b45c05698d5fa959", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 10727, "upload_time": "2019-09-25T15:04:57", "url": "https://files.pythonhosted.org/packages/2a/84/d936059e6743d89943cfb9a9902c0bd8eb101369369d9f32d37da4600bbe/gqlclient-0.7.3.tar.gz" } ] }