{ "info": { "author": "Moritz K.", "author_email": "moritzmhmk@googlemail.com", "bugtrack_url": null, "classifiers": [], "description": "WSGI-GraphQL\n=============\n\nCreate a WSGI Application for a GraphQL schema.\n\nUsage\n-----\n\nUse the ``GraphQLApplication`` from ``wsgi_graphql``.\n\n.. code:: python\n\n from wsgi_graphql import GraphQLApplication\n application = GraphQLApplication(schema)\n\nOptions\n~~~~~~~\n\n- ``schema``: ``GraphQLSchema`` to serve with this application.\n- ``execute_options``: Dictionary of options to be passed to ``graphql.execute``\n via ``graphql_server.run_http_query``. If the dictionary values are callable\n they will be called (see example below).\n- ``format_error``: Function to format errors (defaults to ``graphql_server.default_format_error``).\n- ``encode``: Function to encode dictionary (defaults to ``graphql_server.json_encode``).\n\nAll ``execute_options`` can be ``callable`` (i.e. functions) and will receive\nthe current ``environ`` as an argument. This can be used for tasks like parsing\nauthentication tokens and inserting results as ``context_value``.\n\nThis snippet from the ``example.py`` sets the ``context_value`` to a dictionary\ncontaining the value of the request header ``greet``.\n\n.. code:: python\n\n application = GraphQLApplication(schema, execute_options={\n 'context_value': lambda environ: {\n 'greet': environ.get('HTTP_GREET')\n }\n })\n\nThis ``curl`` command will return ``{\"data\":{\"hello\":\"world\"}}``.\n\n.. code:: bash\n\n curl --request POST\\\n --url http://localhost:8080\\\n --header 'Content-Type: application/graphql'\\\n --header 'greet: world'\\\n --data 'query {hello}'\n", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/moritzmhmk/wsgi-graphql/archive/v0.0.2.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/moritzmhmk/wsgi-graphql", "keywords": "graphql", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "wsgi_graphql", "package_url": "https://pypi.org/project/wsgi_graphql/", "platform": "", "project_url": "https://pypi.org/project/wsgi_graphql/", "project_urls": { "Download": "https://github.com/moritzmhmk/wsgi-graphql/archive/v0.0.2.tar.gz", "Homepage": "https://github.com/moritzmhmk/wsgi-graphql" }, "release_url": "https://pypi.org/project/wsgi_graphql/0.0.2/", "requires_dist": null, "requires_python": "", "summary": "Create a WSGI Application for a GraphQL schema.", "version": "0.0.2" }, "last_serial": 3713872, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "6ad2ded3a976e5a500b28724a6c781bb", "sha256": "5a884ce422211cc5472b936f2e3fde486d32bc5c98ee8c8cd20b024dbff4b94a" }, "downloads": -1, "filename": "wsgi_graphql-0.0.1.tar.gz", "has_sig": false, "md5_digest": "6ad2ded3a976e5a500b28724a6c781bb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3488, "upload_time": "2018-03-27T20:25:47", "url": "https://files.pythonhosted.org/packages/4f/0d/c2cf26187b994cdea8f954a5e6da6e31f2a81d97a62d3237562967671d55/wsgi_graphql-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "2f0276c1dc428747472d654f4b474588", "sha256": "20412c281b59d4add43464f858d62ede99d5fa016aab2acf7aced6534dc9a028" }, "downloads": -1, "filename": "wsgi_graphql-0.0.2.tar.gz", "has_sig": false, "md5_digest": "2f0276c1dc428747472d654f4b474588", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3523, "upload_time": "2018-03-28T13:52:42", "url": "https://files.pythonhosted.org/packages/9c/6b/1c855d459e428f811203375e56b97d5267676f3846cb509fc1420d2a2417/wsgi_graphql-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2f0276c1dc428747472d654f4b474588", "sha256": "20412c281b59d4add43464f858d62ede99d5fa016aab2acf7aced6534dc9a028" }, "downloads": -1, "filename": "wsgi_graphql-0.0.2.tar.gz", "has_sig": false, "md5_digest": "2f0276c1dc428747472d654f4b474588", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3523, "upload_time": "2018-03-28T13:52:42", "url": "https://files.pythonhosted.org/packages/9c/6b/1c855d459e428f811203375e56b97d5267676f3846cb509fc1420d2a2417/wsgi_graphql-0.0.2.tar.gz" } ] }