2025-12-01
This commit is contained in:
@@ -0,0 +1 @@
|
||||
pip
|
||||
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 GraphQL Python
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,209 @@
|
||||
Metadata-Version: 2.1
|
||||
Name: gql
|
||||
Version: 3.5.3
|
||||
Summary: GraphQL client for Python
|
||||
Home-page: https://github.com/graphql-python/gql
|
||||
Author: Syrus Akbary
|
||||
Author-email: me@syrusakbary.com
|
||||
License: MIT
|
||||
Keywords: api graphql protocol rest relay gql client
|
||||
Platform: any
|
||||
Classifier: Development Status :: 5 - Production/Stable
|
||||
Classifier: Intended Audience :: Developers
|
||||
Classifier: Topic :: Software Development :: Libraries
|
||||
Classifier: Programming Language :: Python :: 3
|
||||
Classifier: Programming Language :: Python :: 3 :: Only
|
||||
Classifier: Programming Language :: Python :: 3.7
|
||||
Classifier: Programming Language :: Python :: 3.8
|
||||
Classifier: Programming Language :: Python :: 3.9
|
||||
Classifier: Programming Language :: Python :: 3.10
|
||||
Classifier: Programming Language :: Python :: 3.11
|
||||
Classifier: Programming Language :: Python :: 3.12
|
||||
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
||||
Description-Content-Type: text/markdown
|
||||
Requires-Dist: graphql-core<3.2.7,>=3.2
|
||||
Requires-Dist: yarl<2.0,>=1.6
|
||||
Requires-Dist: backoff<3.0,>=1.11.1
|
||||
Requires-Dist: anyio<5,>=3.0
|
||||
Provides-Extra: aiohttp
|
||||
Requires-Dist: aiohttp<4,>=3.8.0; python_version <= "3.11" and extra == "aiohttp"
|
||||
Requires-Dist: aiohttp<4,>=3.9.0b0; python_version > "3.11" and extra == "aiohttp"
|
||||
Provides-Extra: all
|
||||
Requires-Dist: requests<3,>=2.26; extra == "all"
|
||||
Requires-Dist: requests-toolbelt<2,>=1.0.0; extra == "all"
|
||||
Requires-Dist: httpx<1,>=0.23.1; extra == "all"
|
||||
Requires-Dist: websockets<12,>=10; extra == "all"
|
||||
Requires-Dist: botocore<2,>=1.21; extra == "all"
|
||||
Requires-Dist: aiohttp<4,>=3.8.0; python_version <= "3.11" and extra == "all"
|
||||
Requires-Dist: aiohttp<4,>=3.9.0b0; python_version > "3.11" and extra == "all"
|
||||
Provides-Extra: botocore
|
||||
Requires-Dist: botocore<2,>=1.21; extra == "botocore"
|
||||
Provides-Extra: dev
|
||||
Requires-Dist: requests<3,>=2.26; extra == "dev"
|
||||
Requires-Dist: requests-toolbelt<2,>=1.0.0; extra == "dev"
|
||||
Requires-Dist: httpx<1,>=0.23.1; extra == "dev"
|
||||
Requires-Dist: websockets<12,>=10; extra == "dev"
|
||||
Requires-Dist: botocore<2,>=1.21; extra == "dev"
|
||||
Requires-Dist: black==22.3.0; extra == "dev"
|
||||
Requires-Dist: check-manifest<1,>=0.42; extra == "dev"
|
||||
Requires-Dist: flake8==3.8.1; extra == "dev"
|
||||
Requires-Dist: isort==4.3.21; extra == "dev"
|
||||
Requires-Dist: mypy==0.910; extra == "dev"
|
||||
Requires-Dist: sphinx<6,>=5.3.0; extra == "dev"
|
||||
Requires-Dist: sphinx-rtd-theme<1,>=0.4; extra == "dev"
|
||||
Requires-Dist: sphinx-argparse==0.2.5; extra == "dev"
|
||||
Requires-Dist: types-aiofiles; extra == "dev"
|
||||
Requires-Dist: types-mock; extra == "dev"
|
||||
Requires-Dist: types-requests; extra == "dev"
|
||||
Requires-Dist: parse==1.15.0; extra == "dev"
|
||||
Requires-Dist: pytest==7.4.2; extra == "dev"
|
||||
Requires-Dist: pytest-asyncio==0.21.1; extra == "dev"
|
||||
Requires-Dist: pytest-console-scripts==1.3.1; extra == "dev"
|
||||
Requires-Dist: pytest-cov==3.0.0; extra == "dev"
|
||||
Requires-Dist: mock==4.0.2; extra == "dev"
|
||||
Requires-Dist: aiofiles; extra == "dev"
|
||||
Requires-Dist: aiohttp<4,>=3.8.0; python_version <= "3.11" and extra == "dev"
|
||||
Requires-Dist: vcrpy==4.4.0; python_version <= "3.8" and extra == "dev"
|
||||
Requires-Dist: aiohttp<4,>=3.9.0b0; python_version > "3.11" and extra == "dev"
|
||||
Requires-Dist: vcrpy==7.0.0; python_version > "3.8" and extra == "dev"
|
||||
Provides-Extra: httpx
|
||||
Requires-Dist: httpx<1,>=0.23.1; extra == "httpx"
|
||||
Provides-Extra: requests
|
||||
Requires-Dist: requests<3,>=2.26; extra == "requests"
|
||||
Requires-Dist: requests-toolbelt<2,>=1.0.0; extra == "requests"
|
||||
Provides-Extra: test
|
||||
Requires-Dist: requests<3,>=2.26; extra == "test"
|
||||
Requires-Dist: requests-toolbelt<2,>=1.0.0; extra == "test"
|
||||
Requires-Dist: httpx<1,>=0.23.1; extra == "test"
|
||||
Requires-Dist: websockets<12,>=10; extra == "test"
|
||||
Requires-Dist: botocore<2,>=1.21; extra == "test"
|
||||
Requires-Dist: parse==1.15.0; extra == "test"
|
||||
Requires-Dist: pytest==7.4.2; extra == "test"
|
||||
Requires-Dist: pytest-asyncio==0.21.1; extra == "test"
|
||||
Requires-Dist: pytest-console-scripts==1.3.1; extra == "test"
|
||||
Requires-Dist: pytest-cov==3.0.0; extra == "test"
|
||||
Requires-Dist: mock==4.0.2; extra == "test"
|
||||
Requires-Dist: aiofiles; extra == "test"
|
||||
Requires-Dist: aiohttp<4,>=3.8.0; python_version <= "3.11" and extra == "test"
|
||||
Requires-Dist: vcrpy==4.4.0; python_version <= "3.8" and extra == "test"
|
||||
Requires-Dist: aiohttp<4,>=3.9.0b0; python_version > "3.11" and extra == "test"
|
||||
Requires-Dist: vcrpy==7.0.0; python_version > "3.8" and extra == "test"
|
||||
Provides-Extra: test_no_transport
|
||||
Requires-Dist: parse==1.15.0; extra == "test-no-transport"
|
||||
Requires-Dist: pytest==7.4.2; extra == "test-no-transport"
|
||||
Requires-Dist: pytest-asyncio==0.21.1; extra == "test-no-transport"
|
||||
Requires-Dist: pytest-console-scripts==1.3.1; extra == "test-no-transport"
|
||||
Requires-Dist: pytest-cov==3.0.0; extra == "test-no-transport"
|
||||
Requires-Dist: mock==4.0.2; extra == "test-no-transport"
|
||||
Requires-Dist: aiofiles; extra == "test-no-transport"
|
||||
Requires-Dist: vcrpy==4.4.0; python_version <= "3.8" and extra == "test_no_transport"
|
||||
Requires-Dist: vcrpy==7.0.0; python_version > "3.8" and extra == "test_no_transport"
|
||||
Provides-Extra: websockets
|
||||
Requires-Dist: websockets<12,>=10; extra == "websockets"
|
||||
|
||||
# GQL
|
||||
|
||||
This is a GraphQL client for Python 3.7+.
|
||||
Plays nicely with `graphene`, `graphql-core`, `graphql-js` and any other GraphQL implementation compatible with the spec.
|
||||
|
||||
GQL architecture is inspired by `React-Relay` and `Apollo-Client`.
|
||||
|
||||
[![GitHub-Actions][gh-image]][gh-url]
|
||||
[![pyversion][pyversion-image]][pyversion-url]
|
||||
[![pypi][pypi-image]][pypi-url]
|
||||
[![Anaconda-Server Badge][conda-image]][conda-url]
|
||||
[![codecov][codecov-image]][codecov-url]
|
||||
|
||||
[gh-image]: https://github.com/graphql-python/gql/workflows/Tests/badge.svg
|
||||
[gh-url]: https://github.com/graphql-python/gql/actions?query=workflow%3ATests
|
||||
[pyversion-image]: https://img.shields.io/pypi/pyversions/gql
|
||||
[pyversion-url]: https://pypi.org/project/gql/
|
||||
[pypi-image]: https://img.shields.io/pypi/v/gql.svg?style=flat
|
||||
[pypi-url]: https://pypi.org/project/gql/
|
||||
[conda-image]: https://img.shields.io/conda/vn/conda-forge/gql.svg
|
||||
[conda-url]: https://anaconda.org/conda-forge/gql
|
||||
[codecov-image]: https://codecov.io/gh/graphql-python/gql/branch/master/graph/badge.svg
|
||||
[codecov-url]: https://codecov.io/gh/graphql-python/gql
|
||||
|
||||
## Documentation
|
||||
|
||||
The complete documentation for GQL can be found at
|
||||
[gql.readthedocs.io](https://gql.readthedocs.io).
|
||||
|
||||
## Features
|
||||
|
||||
* Execute GraphQL queries using [different protocols](https://gql.readthedocs.io/en/latest/transports/index.html):
|
||||
* http
|
||||
* websockets:
|
||||
* apollo or graphql-ws protocol
|
||||
* Phoenix channels
|
||||
* AWS AppSync realtime protocol (experimental)
|
||||
* Possibility to [validate the queries locally](https://gql.readthedocs.io/en/latest/usage/validation.html) using a GraphQL schema provided locally or fetched from the backend using an instrospection query
|
||||
* Supports GraphQL queries, mutations and [subscriptions](https://gql.readthedocs.io/en/latest/usage/subscriptions.html)
|
||||
* Supports [sync or async usage](https://gql.readthedocs.io/en/latest/async/index.html), [allowing concurrent requests](https://gql.readthedocs.io/en/latest/advanced/async_advanced_usage.html#async-advanced-usage)
|
||||
* Supports [File uploads](https://gql.readthedocs.io/en/latest/usage/file_upload.html)
|
||||
* Supports [Custom scalars / Enums](https://gql.readthedocs.io/en/latest/usage/custom_scalars_and_enums.html)
|
||||
* [gql-cli script](https://gql.readthedocs.io/en/latest/gql-cli/intro.html) to execute GraphQL queries or download schemas from the command line
|
||||
* [DSL module](https://gql.readthedocs.io/en/latest/advanced/dsl_module.html) to compose GraphQL queries dynamically
|
||||
|
||||
## Installation
|
||||
|
||||
You can install GQL with all the optional dependencies using pip:
|
||||
|
||||
```bash
|
||||
# Quotes may be required on certain shells such as zsh.
|
||||
pip install "gql[all]"
|
||||
```
|
||||
|
||||
> **NOTE**: See also [the documentation](https://gql.readthedocs.io/en/latest/intro.html#less-dependencies) to install GQL with less extra dependencies depending on the transports you would like to use or for alternative installation methods.
|
||||
|
||||
## Usage
|
||||
|
||||
### Basic usage
|
||||
|
||||
```python
|
||||
from gql import gql, Client
|
||||
from gql.transport.aiohttp import AIOHTTPTransport
|
||||
|
||||
# Select your transport with a defined url endpoint
|
||||
transport = AIOHTTPTransport(url="https://countries.trevorblades.com/")
|
||||
|
||||
# Create a GraphQL client using the defined transport
|
||||
client = Client(transport=transport, fetch_schema_from_transport=True)
|
||||
|
||||
# Provide a GraphQL query
|
||||
query = gql(
|
||||
"""
|
||||
query getContinents {
|
||||
continents {
|
||||
code
|
||||
name
|
||||
}
|
||||
}
|
||||
"""
|
||||
)
|
||||
|
||||
# Execute the query on the transport
|
||||
result = client.execute(query)
|
||||
print(result)
|
||||
```
|
||||
|
||||
Executing the above code should output the following result:
|
||||
|
||||
```
|
||||
$ python basic_example.py
|
||||
{'continents': [{'code': 'AF', 'name': 'Africa'}, {'code': 'AN', 'name': 'Antarctica'}, {'code': 'AS', 'name': 'Asia'}, {'code': 'EU', 'name': 'Europe'}, {'code': 'NA', 'name': 'North America'}, {'code': 'OC', 'name': 'Oceania'}, {'code': 'SA', 'name': 'South America'}]}
|
||||
```
|
||||
|
||||
> **WARNING**: Please note that this basic example won't work if you have an asyncio event loop running. In some
|
||||
> python environments (as with Jupyter which uses IPython) an asyncio event loop is created for you. In that case you
|
||||
> should use instead the [async usage example](https://gql.readthedocs.io/en/latest/async/async_usage.html#async-usage).
|
||||
|
||||
## Contributing
|
||||
See [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||
|
||||
## License
|
||||
|
||||
[MIT License](https://github.com/graphql-python/gql/blob/master/LICENSE)
|
||||
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
../../bin/gql-cli.exe,sha256=iViBHjdmuBA7xw-DUxBqOdPS1y4Xnwhl5Egu2S25rbc,108429
|
||||
gql-3.5.3.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
||||
gql-3.5.3.dist-info/LICENSE,sha256=ZxLYmwcNtY92zZ62jKtUGq3qczv4lsCVavMGN9G3Uq8,1081
|
||||
gql-3.5.3.dist-info/METADATA,sha256=u7Hiod5ASwVr_WT6sglJH1oNsRvBoysyCCsz53MocEY,9421
|
||||
gql-3.5.3.dist-info/RECORD,,
|
||||
gql-3.5.3.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
gql-3.5.3.dist-info/WHEEL,sha256=Kh9pAotZVRFj97E15yTA4iADqXdQfIVTHcNaZTjxeGM,110
|
||||
gql-3.5.3.dist-info/entry_points.txt,sha256=731McpICmzq9JgVXQ2JAB9t347UzZmRhjQcoYKUzc8g,45
|
||||
gql-3.5.3.dist-info/top_level.txt,sha256=4R0fCgjgYFQOsKkkZTswWPetUgR6U7ndzm5wQfs02_g,4
|
||||
gql/__init__.py,sha256=jCno8SqJhS9Tqu4xDyTr3otggp0YU6apGqWDyReiar0,529
|
||||
gql/__pycache__/__init__.cpython-311.pyc,,
|
||||
gql/__pycache__/__version__.cpython-311.pyc,,
|
||||
gql/__pycache__/cli.cpython-311.pyc,,
|
||||
gql/__pycache__/client.cpython-311.pyc,,
|
||||
gql/__pycache__/dsl.cpython-311.pyc,,
|
||||
gql/__pycache__/gql.cpython-311.pyc,,
|
||||
gql/__pycache__/graphql_request.cpython-311.pyc,,
|
||||
gql/__pycache__/utils.cpython-311.pyc,,
|
||||
gql/__version__.py,sha256=axYxxTD7GURTeHax9omW1InCvaLATzO-liNqSv8uzr4,22
|
||||
gql/cli.py,sha256=SXyZZTXuC-f7uPdbHOCc3ZGaTxRr6AWgzRTfTxFepJI,16695
|
||||
gql/client.py,sha256=B8tV2nOn7eew80Vbl2qSIOpE0DUvI7Ekq3Xg-l7Lesc,66650
|
||||
gql/dsl.py,sha256=9u9ZWKArLews8lLU_3gMQFQrvx6dy4AcAg2sHiPtiHk,36862
|
||||
gql/gql.py,sha256=m5HempIvxaeKrk5iAexyLfxwka86Ch1II6Ir6fpsn7w,932
|
||||
gql/graphql_request.py,sha256=wz9jooZv7vkwqYRsc2D6LagOD3aDWBi7OUO0vs7Qnuk,1112
|
||||
gql/py.typed,sha256=BT-FaCL_3xgplsSC2vCOimKq8XnfGlWd2TQh5q1Rtuc,62
|
||||
gql/transport/__init__.py,sha256=yRAfqNkhiXyWdEhsT2u3RDDxwUnAlEISYvf657csG4U,120
|
||||
gql/transport/__pycache__/__init__.cpython-311.pyc,,
|
||||
gql/transport/__pycache__/aiohttp.cpython-311.pyc,,
|
||||
gql/transport/__pycache__/appsync_auth.cpython-311.pyc,,
|
||||
gql/transport/__pycache__/appsync_websockets.cpython-311.pyc,,
|
||||
gql/transport/__pycache__/async_transport.cpython-311.pyc,,
|
||||
gql/transport/__pycache__/exceptions.cpython-311.pyc,,
|
||||
gql/transport/__pycache__/httpx.cpython-311.pyc,,
|
||||
gql/transport/__pycache__/local_schema.cpython-311.pyc,,
|
||||
gql/transport/__pycache__/phoenix_channel_websockets.cpython-311.pyc,,
|
||||
gql/transport/__pycache__/requests.cpython-311.pyc,,
|
||||
gql/transport/__pycache__/transport.cpython-311.pyc,,
|
||||
gql/transport/__pycache__/websockets.cpython-311.pyc,,
|
||||
gql/transport/__pycache__/websockets_base.cpython-311.pyc,,
|
||||
gql/transport/aiohttp.py,sha256=Us9fqg4OKmu1qWdMlH5pd_oSXKoBl1aG8nXVw2b_eLY,14065
|
||||
gql/transport/appsync_auth.py,sha256=uaO0L66jyMQt50LJ_tOrHG2iS0eCKARYvi-nOLBQLms,7515
|
||||
gql/transport/appsync_websockets.py,sha256=MHxPC14j2kl8z7uRUhb7NzfAuFIudlXL_lty4uw1CsA,7093
|
||||
gql/transport/async_transport.py,sha256=3GvR5MBdi8t1bP0FfR6QvY1zS73-tUM0Jfox-Vyha1M,1723
|
||||
gql/transport/exceptions.py,sha256=-ayw0Tv78SHHB8HMXw0Nf7hlg3oLPnbmGmrUnCtPR_I,1744
|
||||
gql/transport/httpx.py,sha256=g81cRHM3MQtxOlvDQ4L-ViaYdXPnGzyMefxJOQAvILw,10440
|
||||
gql/transport/local_schema.py,sha256=y7fegFcLI0ms4d4kyJyrA__F5FyQhUa0VThgGiUM_tU,2313
|
||||
gql/transport/phoenix_channel_websockets.py,sha256=tfUrW4vBA35jRwz83Rh8RcuKiPBOpPRJ6ZAz-xj8kW4,15179
|
||||
gql/transport/requests.py,sha256=rOZ_unQ-Nt7MO2c4BQxnXQWaefr98aP_t_Bmm1gxjZc,16043
|
||||
gql/transport/transport.py,sha256=VgIE0Mak7w3HhIbe_XPM0et3wMdOv6p8teTCtdKK6rQ,1619
|
||||
gql/transport/websockets.py,sha256=0t7zousc9tUdLkUgi91IJPf6E7ZFMt-elwoBsb3n1Us,19190
|
||||
gql/transport/websockets_base.py,sha256=hD-lMh3YRFa5_1goZGVwszeJPX8G6cwa8Yxgq5INPp0,24466
|
||||
gql/utilities/__init__.py,sha256=Bot2ZzMEWUbfVnMG6SWc6sj2o0jTSIKlPfEw3w12taU,659
|
||||
gql/utilities/__pycache__/__init__.cpython-311.pyc,,
|
||||
gql/utilities/__pycache__/build_client_schema.cpython-311.pyc,,
|
||||
gql/utilities/__pycache__/get_introspection_query_ast.cpython-311.pyc,,
|
||||
gql/utilities/__pycache__/node_tree.cpython-311.pyc,,
|
||||
gql/utilities/__pycache__/parse_result.cpython-311.pyc,,
|
||||
gql/utilities/__pycache__/serialize_variable_values.cpython-311.pyc,,
|
||||
gql/utilities/__pycache__/update_schema_enum.cpython-311.pyc,,
|
||||
gql/utilities/__pycache__/update_schema_scalars.cpython-311.pyc,,
|
||||
gql/utilities/build_client_schema.py,sha256=BxbffxZ4Qz8fy0o7_TU_APfeGroztXTTKp96X-H8vig,3165
|
||||
gql/utilities/get_introspection_query_ast.py,sha256=zlXu4ZgjCbkyCLykVwh_jbQmnCIDgZjfi1XhsZ19jKg,4279
|
||||
gql/utilities/node_tree.py,sha256=nTGc5A1R6GFlBq42iU6swN-DKDSIyTIY43tgE0eUucY,2831
|
||||
gql/utilities/parse_result.py,sha256=_1J47qhz3C-FheJCJzi1GSBXSeoFNDrtk3F_Mt7cBGw,14463
|
||||
gql/utilities/serialize_variable_values.py,sha256=s_SavaA1Z44kAR9BnSjIGEETe2VZNHYSyBsEmWE3UjA,4261
|
||||
gql/utilities/update_schema_enum.py,sha256=nAQ9gENlJbSzMRUjrrAl0or_5bWZ0-iSvdFfisWBupw,2392
|
||||
gql/utilities/update_schema_scalars.py,sha256=Og1VSVuEZqo1CTfZrRiIvjVOXWlQEfU2G3rD3tqdZSY,2280
|
||||
gql/utils.py,sha256=_n6XetEKU0wqecaXX94rbzrjP-4pMoBzimRiOhn6UtI,1850
|
||||
@@ -0,0 +1,6 @@
|
||||
Wheel-Version: 1.0
|
||||
Generator: bdist_wheel (0.45.1)
|
||||
Root-Is-Purelib: true
|
||||
Tag: py2-none-any
|
||||
Tag: py3-none-any
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
[console_scripts]
|
||||
gql-cli = gql.cli:gql_cli
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
gql
|
||||
Reference in New Issue
Block a user