From 265548997badde685f05a930e7ede7f80e808845 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Tue, 20 Jun 2023 03:55:11 +0000 Subject: automatic import of python-sgqlc-schemas --- .gitignore | 1 + python-sgqlc-schemas.spec | 187 ++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 189 insertions(+) create mode 100644 python-sgqlc-schemas.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..15cc8ea 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/sgqlc_schemas-0.1.0.tar.gz diff --git a/python-sgqlc-schemas.spec b/python-sgqlc-schemas.spec new file mode 100644 index 0000000..1cbf201 --- /dev/null +++ b/python-sgqlc-schemas.spec @@ -0,0 +1,187 @@ +%global _empty_manifest_terminate_build 0 +Name: python-sgqlc-schemas +Version: 0.1.0 +Release: 1 +Summary: A set of schemas for sgqlc package +License: MIT +URL: https://github.com/Mogost/sgqlc-schemas +Source0: https://mirrors.aliyun.com/pypi/web/packages/32/9b/8f01382a9b213955d34f2f1a2d5ad16fe7a045f25a8672717c564c1aa36e/sgqlc_schemas-0.1.0.tar.gz +BuildArch: noarch + +Requires: python3-sgqlc + +%description +[![PyPI version](https://badge.fury.io/py/sgqlc-schemas.svg)](https://badge.fury.io/py/sgqlc-schemas) +## About + +This package was created so that when using [sgqlc (Simple GraphQL Client)](https://github.com/profusion/sgqlc "sgqlc (Simple GraphQL Client)") you do not need to create schemas for popular APIs. + +## How to use + +#### Installation + +You can install this package either via the Python Package Index (PyPI) or from source. + +To install using ``pip``: +``` +$ pip install -U sgqlc-schemas +``` + +#### Import schema and simple query +```python +from sgqlc.endpoint.http import HTTPEndpoint +from sgqlc.operation import Operation +from sgqlc_schemas import github_schema + +op = Operation(github_schema.query_type) +op.viewer().login() +endpoint = HTTPEndpoint('https://api.github.com/graphql', {'Authorization': f'bearer {token}'}) +data = endpoint(op) +``` + +## Current schemas + +- [GitHub](http://github.com "GitHub") +- [Monday.com](http://monday.com "Monday.com") + +## Contribution + +This package welcomes any new contribution. Please create [pull requests on GitHub](https://github.com/Mogost/sgqlc-schemas/pulls "pull requests on GitHub"). + + + + +%package -n python3-sgqlc-schemas +Summary: A set of schemas for sgqlc package +Provides: python-sgqlc-schemas +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-sgqlc-schemas +[![PyPI version](https://badge.fury.io/py/sgqlc-schemas.svg)](https://badge.fury.io/py/sgqlc-schemas) +## About + +This package was created so that when using [sgqlc (Simple GraphQL Client)](https://github.com/profusion/sgqlc "sgqlc (Simple GraphQL Client)") you do not need to create schemas for popular APIs. + +## How to use + +#### Installation + +You can install this package either via the Python Package Index (PyPI) or from source. + +To install using ``pip``: +``` +$ pip install -U sgqlc-schemas +``` + +#### Import schema and simple query +```python +from sgqlc.endpoint.http import HTTPEndpoint +from sgqlc.operation import Operation +from sgqlc_schemas import github_schema + +op = Operation(github_schema.query_type) +op.viewer().login() +endpoint = HTTPEndpoint('https://api.github.com/graphql', {'Authorization': f'bearer {token}'}) +data = endpoint(op) +``` + +## Current schemas + +- [GitHub](http://github.com "GitHub") +- [Monday.com](http://monday.com "Monday.com") + +## Contribution + +This package welcomes any new contribution. Please create [pull requests on GitHub](https://github.com/Mogost/sgqlc-schemas/pulls "pull requests on GitHub"). + + + + +%package help +Summary: Development documents and examples for sgqlc-schemas +Provides: python3-sgqlc-schemas-doc +%description help +[![PyPI version](https://badge.fury.io/py/sgqlc-schemas.svg)](https://badge.fury.io/py/sgqlc-schemas) +## About + +This package was created so that when using [sgqlc (Simple GraphQL Client)](https://github.com/profusion/sgqlc "sgqlc (Simple GraphQL Client)") you do not need to create schemas for popular APIs. + +## How to use + +#### Installation + +You can install this package either via the Python Package Index (PyPI) or from source. + +To install using ``pip``: +``` +$ pip install -U sgqlc-schemas +``` + +#### Import schema and simple query +```python +from sgqlc.endpoint.http import HTTPEndpoint +from sgqlc.operation import Operation +from sgqlc_schemas import github_schema + +op = Operation(github_schema.query_type) +op.viewer().login() +endpoint = HTTPEndpoint('https://api.github.com/graphql', {'Authorization': f'bearer {token}'}) +data = endpoint(op) +``` + +## Current schemas + +- [GitHub](http://github.com "GitHub") +- [Monday.com](http://monday.com "Monday.com") + +## Contribution + +This package welcomes any new contribution. Please create [pull requests on GitHub](https://github.com/Mogost/sgqlc-schemas/pulls "pull requests on GitHub"). + + + + +%prep +%autosetup -n sgqlc_schemas-0.1.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-sgqlc-schemas -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Jun 20 2023 Python_Bot - 0.1.0-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..22bfcdd --- /dev/null +++ b/sources @@ -0,0 +1 @@ +0023b08a49f9becc9d9df57193ab454b sgqlc_schemas-0.1.0.tar.gz -- cgit v1.2.3