diff options
author | CoprDistGit <infra@openeuler.org> | 2023-04-10 10:44:32 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-04-10 10:44:32 +0000 |
commit | a3f88da71593ea7848d29f3414c246cdc0fd691c (patch) | |
tree | 68937cf0ed150fde98d192ae18513ffbd90667a8 | |
parent | a14be12afa7d840fbfc0f4033ccbf592db6d8ddd (diff) |
automatic import of python-gql
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-gql.spec | 447 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 449 insertions, 0 deletions
@@ -0,0 +1 @@ +/gql-3.4.0.tar.gz diff --git a/python-gql.spec b/python-gql.spec new file mode 100644 index 0000000..afec94d --- /dev/null +++ b/python-gql.spec @@ -0,0 +1,447 @@ +%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 +* Mon Apr 10 2023 Python_Bot <Python_Bot@openeuler.org> - 3.4.0-1 +- Package Spec generated @@ -0,0 +1 @@ +d365aeabc3fa9ba53e057c6346088b28 gql-3.4.0.tar.gz |