{ "info": { "author": "Charles Lirsac", "author_email": "c.lirsac@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Software Development :: Libraries" ], "description": "\npy-gql\n======\n\n[![CircleCI](https://img.shields.io/circleci/project/github/lirsacc/py-gql.svg?logo=circleci)](https://circleci.com/gh/lirsacc/workflows/py-gql) [![Codecov](https://img.shields.io/codecov/c/github/lirsacc/py-gql.svg?)](https://codecov.io/gh/lirsacc/py-gql) [![PyPI](https://img.shields.io/pypi/v/py-gql.svg)](https://pypi.org/project/py-gql/) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/py-gql.svg?logo=python&logoColor=white) ![PyPI - Wheel](https://img.shields.io/pypi/wheel/py-gql.svg) [![Read the Docs (version)](https://img.shields.io/readthedocs/pip/latest.svg)](https://py-gql.readthedocs.io/)\n\npy-gql is a pure python [GraphQL](http://facebook.github.io/graphql/) implementation aimed at creating GraphQL servers and tooling.\n\nIt supports:\n\n- Parsing the GraphQL query language and schema definition language.\n- Building a GraphQL type schema programatically and from Schema Definition files (including support for schema directives).\n- Validating and Executing a GraphQL request against a type schema.\n\nQuick links\n-----------\n\n- [Source Code & Issue Tracker](https://github.com/lirsacc/py-gql)\n- [PyPI project](https://pypi.org/project/py-gql/)\n- [Read The Docs](https://py-gql.readthedocs.io/)\n- [Changelog](./CHANGES.md)\n\nInstallation\n------------\n\n```.bash\npip install py-gql\n```\n\nFor more details see [install.rst](docs/usage/install.rst).\n\nUsage & Examples\n----------------\n\n### Hello World\n\n```.python\nfrom py_gql import build_schema, graphql_blocking\n\nschema = build_schema(\n \"\"\"\n type Query {\n hello(value: String = \"world\"): String!\n }\n \"\"\"\n)\n\n\n@schema.resolver(\"Query.hello\")\ndef resolve_hello(*_, value):\n return f\"Hello {value}!\"\n\n\nresult = graphql_blocking(schema, '{ hello(value: \"Foo\") }')\nassert result.response() == {\n \"data\": {\n \"hello\": \"Hello Foo!\"\n }\n}\n```\n\nFor more usage examples, you can refer to the [User Guide](https://py-gql.readthedocs.io/en/latest/usage/index.html) and some more involved examples available in the [examples](./examples) folder.\n\nThe [tests](./tests) should also provide some contrived exmaples.\n\nGoals & Status\n--------------\n\nThis project was initially born as an experiment / learning project following some frustration with [graphql-core](https://github.com/graphql-python/graphql-core/) and [Graphene](https://github.com/graphql-python/graphene/) I encountered at work.\n\nThe main goals were originally to:\n\n- Get a deeper understanding of GraphQL\n- Provide an alternative to `graphql-core` which:\n\n - tracks the latest version of the spec (which `graphql-core` didn't)\n - does so without being a port of the JS code which leads to some weird edge case when we tried to extend the library\n - keeps support for Python 2 (which `graphql-core-next`) didn't (this isn't a focus anymore and version 0.2 dropped Python 2 support).\n - (subjective) attempts to be a bit more usable for our use cases, the ideal result would sit somewhere in between `Graphene` and `graphql-core`\n - makes it easier for us to build / include some extra tooling such as custom tracing, custom validation and SDL based tools as well as builder infrastructure to support easily implementing graphql layers over existing data layers (such as ORM).\n\nNot all these points are satisfied yet but py-gql should be ready for general use. It is however still in a fairly experimental phase and to reflect that versions are still in the `0.x.y`.The API is still subject to change as different part of the codebase are iterated on and are getting more use against production codebases.\n\nDevelopment setup\n-----------------\n\nMake sure you are using Python 3.6+ (you can run the tests under 3.5 but `black` and other development tasks are not guaranteed to work).\n\nClone this repo and create a virtualenv before installing the development dependencies:\n\n```.bash\ngit clone git@github.com:lirsacc/py-gql.git\npython -m venv $WORKON_HOME/py-gql --copies\npip install -U -r dev-requirements.txt\npip install -e .\n```\n\nDevelopment tasks are available through [invoke](http://www.pyinvoke.org/) (see: [`tasks.py`](./tasks.py)). Use `inv -l` to list all available tasks and `inv {TASKS} --help` to get help on a specific task:\n\n```bash\n$ inv -l\ninv -l\nAvailable tasks:\n\n benchmark Run benchmarks\n black\n build Build source distribution and wheel for upload to PyPI\n check Run all checks (formatting, lint, typecheck and tests)\n clean Remove test and compilation artifacts\n docs Generate documentation\n flake8\n fmt (format) Run formatters\n mypy (typecheck)\n sort-imports\n test Run test suite (using: py.test)\n```\n\nMost tools should be usable directly, but the tasks provide some common aliases and targets. Each task should print the exact commands it runs.\n\n### Branches\n\n- The last tag should correspond to the latest release version\n- `master` contains unreleased changes that are planned to be released\n- `dev` is used for experimenting and hard changes such as rebase and force pushed should be expected (I plan to move to using specific feature branches for better organisation)\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/lirsacc/py-gql", "keywords": "graphql", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "py-gql", "package_url": "https://pypi.org/project/py-gql/", "platform": "", "project_url": "https://pypi.org/project/py-gql/", "project_urls": { "Homepage": "https://github.com/lirsacc/py-gql" }, "release_url": "https://pypi.org/project/py-gql/0.4.0/", "requires_dist": null, "requires_python": ">=3.5", "summary": "Comprehensive GraphQL implementation for Python.", "version": "0.4.0" }, "last_serial": 5954239, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "7342c31f1b7bc6aab82b54796ae53f54", "sha256": "c3d74be7bbf61d97d4d683cbf034ade2a9286688e1c540ffa02bb7489ad5210a" }, "downloads": -1, "filename": "py_gql-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7342c31f1b7bc6aab82b54796ae53f54", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", "size": 173518, "upload_time": "2018-08-10T11:33:49", "url": "https://files.pythonhosted.org/packages/63/34/fcb1c8cf89a58a104f352e2f7faf8a24e33a684bd3e5473baed7c7bd0e66/py_gql-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a659c1dd2d0c81e023de0d6a0d213050", "sha256": "9d5f970a7cca6da999c04067f483c14c8fae2c40d541285e75211a4f1b763eeb" }, "downloads": -1, "filename": "py_gql-0.1.0.tar.gz", "has_sig": false, "md5_digest": "a659c1dd2d0c81e023de0d6a0d213050", "packagetype": "sdist", "python_version": "source", "requires_python": ">2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", "size": 167375, "upload_time": "2018-08-10T11:33:50", "url": "https://files.pythonhosted.org/packages/1d/46/c0c37b70c0992d384bbf83636d1c721e7cad4775ac30590058f442a9b39b/py_gql-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "cc60f6b72af5b7f6ea762aed34d25278", "sha256": "df6e8699581728a4d0f659efcf6dc765dd6f9a0e5468ab626e4fec83c697be79" }, "downloads": -1, "filename": "py_gql-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "cc60f6b72af5b7f6ea762aed34d25278", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.5", "size": 120047, "upload_time": "2019-04-17T23:26:29", "url": "https://files.pythonhosted.org/packages/4c/e1/26df3cf79bc0fe274f58173950e8dd2c5d458cf25b7044268f04d03478ff/py_gql-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "185d26eecd286d1171f2980964907290", "sha256": "f73527956797dddafadbff6c167c59e43049dbfc17a2c076be8df9740230af59" }, "downloads": -1, "filename": "py_gql-0.2.0.tar.gz", "has_sig": false, "md5_digest": "185d26eecd286d1171f2980964907290", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 178722, "upload_time": "2019-04-17T23:26:34", "url": "https://files.pythonhosted.org/packages/a4/98/ef6301d1c17871cb7d84f8b25abca44bc079785ed6837425fa51fafa2b6b/py_gql-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "f34949e3a5ce80a919a578d49d7d98a4", "sha256": "01bafb5f0a6fc73a319acbe6084529f6c67ae876a67ae8e526de08862c3c8e9f" }, "downloads": -1, "filename": "py_gql-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f34949e3a5ce80a919a578d49d7d98a4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.5", "size": 139532, "upload_time": "2019-05-01T13:21:15", "url": "https://files.pythonhosted.org/packages/eb/c7/8ecaf6dfe9238c23b85dcf43e4027516d67c904376bbe51c4038799303be/py_gql-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3a51a5990fa2c5bc611a3d46f9909f4c", "sha256": "a02713a4e1b91f51eadf6ee7df9fbcf3cbb8bb23d0f3bd3c49d6fc12bba4e176" }, "downloads": -1, "filename": "py_gql-0.3.0.tar.gz", "has_sig": false, "md5_digest": "3a51a5990fa2c5bc611a3d46f9909f4c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 182539, "upload_time": "2019-05-01T13:21:17", "url": "https://files.pythonhosted.org/packages/c2/ee/949cf38d0e23f5944fd363ea88adff440aa163138e25a06aa529c855232b/py_gql-0.3.0.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "570af8253999afb360267576abe161b2", "sha256": "37144042575a060b8ff5ebd89a3fc4b20f1853768b2dc28fc5a2d60faedde04e" }, "downloads": -1, "filename": "py_gql-0.3.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "570af8253999afb360267576abe161b2", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.5", "size": 139526, "upload_time": "2019-05-01T13:48:12", "url": "https://files.pythonhosted.org/packages/ab/13/b381e948e016f95f5b27c2b65534b7b60f7e58021313aa1f8bd8b4f6b00d/py_gql-0.3.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "539ac946a5aded3c4f313989bfe595ab", "sha256": "2b7a89b215bd6c1e5b06a2e168a262710204d69549e3277314e29020cdcf1480" }, "downloads": -1, "filename": "py_gql-0.3.2.tar.gz", "has_sig": false, "md5_digest": "539ac946a5aded3c4f313989bfe595ab", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 182544, "upload_time": "2019-05-01T13:48:14", "url": "https://files.pythonhosted.org/packages/0a/18/7286750a6f94c405a2930279777a7d8390e087028550493c074274355fa9/py_gql-0.3.2.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "12625878a1a11c14ced884d389679219", "sha256": "60d72f49b02a2549f093e08e333c83bc20acd0540383e7977ad69ef7316cc643" }, "downloads": -1, "filename": "py_gql-0.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "12625878a1a11c14ced884d389679219", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.5", "size": 159368, "upload_time": "2019-10-10T11:04:08", "url": "https://files.pythonhosted.org/packages/8c/5f/ac553a8cddb4ae626256b4d482ef5e3a31bb84127c83098113b1f17a849c/py_gql-0.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ea7d0245c0f47f08dfe011611c38d18b", "sha256": "f983dc36a09491af6e8c0910079e57c0eb0284d1106fd23e79a88521fade1110" }, "downloads": -1, "filename": "py_gql-0.4.0.tar.gz", "has_sig": false, "md5_digest": "ea7d0245c0f47f08dfe011611c38d18b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 195659, "upload_time": "2019-10-10T11:04:10", "url": "https://files.pythonhosted.org/packages/e4/90/bfe0f6633256292887fd912628227de938d70a02c4129ab9d40bcb2a9b78/py_gql-0.4.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "12625878a1a11c14ced884d389679219", "sha256": "60d72f49b02a2549f093e08e333c83bc20acd0540383e7977ad69ef7316cc643" }, "downloads": -1, "filename": "py_gql-0.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "12625878a1a11c14ced884d389679219", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.5", "size": 159368, "upload_time": "2019-10-10T11:04:08", "url": "https://files.pythonhosted.org/packages/8c/5f/ac553a8cddb4ae626256b4d482ef5e3a31bb84127c83098113b1f17a849c/py_gql-0.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ea7d0245c0f47f08dfe011611c38d18b", "sha256": "f983dc36a09491af6e8c0910079e57c0eb0284d1106fd23e79a88521fade1110" }, "downloads": -1, "filename": "py_gql-0.4.0.tar.gz", "has_sig": false, "md5_digest": "ea7d0245c0f47f08dfe011611c38d18b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 195659, "upload_time": "2019-10-10T11:04:10", "url": "https://files.pythonhosted.org/packages/e4/90/bfe0f6633256292887fd912628227de938d70a02c4129ab9d40bcb2a9b78/py_gql-0.4.0.tar.gz" } ] }