%global _empty_manifest_terminate_build 0 Name: python-gql Version: 3.4.0 Release: 1 Summary: GraphQL client for Python License: MIT URL: https://github.com/graphql-python/gql Source0: https://mirrors.nju.edu.cn/pypi/web/packages/f6/1e/e7f0231f05127466a1fc63c4a9e69a95676f4729a80f1c3b5106e5c42cf9/gql-3.4.0.tar.gz BuildArch: noarch Requires: python3-graphql-core Requires: python3-yarl Requires: python3-backoff Requires: python3-aiohttp Requires: python3-aiohttp Requires: python3-requests Requires: python3-requests-toolbelt Requires: python3-urllib3 Requires: python3-botocore Requires: python3-websockets Requires: python3-websockets Requires: python3-botocore Requires: python3-aiohttp Requires: python3-requests Requires: python3-requests-toolbelt Requires: python3-urllib3 Requires: python3-botocore Requires: python3-black Requires: python3-check-manifest Requires: python3-flake8 Requires: python3-isort Requires: python3-mypy Requires: python3-sphinx Requires: python3-sphinx-rtd-theme Requires: python3-sphinx-argparse Requires: python3-types-aiofiles Requires: python3-types-mock Requires: python3-types-requests Requires: python3-parse Requires: python3-pytest Requires: python3-pytest-asyncio Requires: python3-pytest-console-scripts Requires: python3-pytest-cov Requires: python3-mock Requires: python3-vcrpy Requires: python3-aiofiles Requires: python3-websockets Requires: python3-websockets Requires: python3-requests Requires: python3-requests-toolbelt Requires: python3-urllib3 Requires: python3-aiohttp Requires: python3-requests Requires: python3-requests-toolbelt Requires: python3-urllib3 Requires: python3-botocore Requires: python3-parse Requires: python3-pytest Requires: python3-pytest-asyncio Requires: python3-pytest-console-scripts Requires: python3-pytest-cov Requires: python3-mock Requires: python3-vcrpy Requires: python3-aiofiles Requires: python3-websockets Requires: python3-websockets Requires: python3-parse Requires: python3-pytest Requires: python3-pytest-asyncio Requires: python3-pytest-console-scripts Requires: python3-pytest-cov Requires: python3-mock Requires: python3-vcrpy Requires: python3-aiofiles Requires: python3-websockets Requires: python3-websockets %description # GQL This is a GraphQL client for Python 3.6+. 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: 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) %package -n python3-gql Summary: GraphQL client for Python Provides: python-gql BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-gql # GQL This is a GraphQL client for Python 3.6+. 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: 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) %package help Summary: Development documents and examples for gql Provides: python3-gql-doc %description help # GQL This is a GraphQL client for Python 3.6+. 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: 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) %prep %autosetup -n gql-3.4.0 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-gql -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Fri Apr 21 2023 Python_Bot - 3.4.0-1 - Package Spec generated