sgqlc 16.2__tar.gz → 16.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. {sgqlc-16.2 → sgqlc-16.4}/LICENSE +0 -1
  2. {sgqlc-16.2/sgqlc.egg-info → sgqlc-16.4}/PKG-INFO +48 -40
  3. {sgqlc-16.2 → sgqlc-16.4}/README.rst +29 -30
  4. {sgqlc-16.2 → sgqlc-16.4}/doc/source/conf.py +3 -4
  5. {sgqlc-16.2 → sgqlc-16.4}/doc/source/sgqlc.endpoint.base.rst +0 -1
  6. {sgqlc-16.2 → sgqlc-16.4}/doc/source/sgqlc.rst +0 -1
  7. {sgqlc-16.2 → sgqlc-16.4}/doc/source/sgqlc.types.datetime.rst +0 -1
  8. {sgqlc-16.2 → sgqlc-16.4}/doc/source/sgqlc.types.relay.rst +0 -1
  9. {sgqlc-16.2 → sgqlc-16.4}/doc/source/sgqlc.types.uuid.rst +0 -1
  10. sgqlc-16.4/pyproject.toml +85 -0
  11. {sgqlc-16.2 → sgqlc-16.4}/sgqlc/__init__.py +1 -1
  12. {sgqlc-16.2 → sgqlc-16.4}/sgqlc/codegen/__init__.py +12 -6
  13. {sgqlc-16.2 → sgqlc-16.4}/sgqlc/codegen/operation.py +155 -77
  14. {sgqlc-16.2 → sgqlc-16.4}/sgqlc/codegen/schema.py +212 -122
  15. {sgqlc-16.2 → sgqlc-16.4}/sgqlc/endpoint/base.py +23 -13
  16. {sgqlc-16.2 → sgqlc-16.4}/sgqlc/endpoint/http.py +137 -78
  17. {sgqlc-16.2 → sgqlc-16.4}/sgqlc/endpoint/requests.py +170 -98
  18. {sgqlc-16.2 → sgqlc-16.4}/sgqlc/endpoint/websocket.py +25 -11
  19. sgqlc-16.4/sgqlc/introspection/__main__.py +92 -0
  20. {sgqlc-16.2 → sgqlc-16.4}/sgqlc/operation/__init__.py +127 -60
  21. {sgqlc-16.2 → sgqlc-16.4}/sgqlc/types/__init__.py +148 -72
  22. {sgqlc-16.2 → sgqlc-16.4}/sgqlc/types/datetime.py +17 -11
  23. {sgqlc-16.2 → sgqlc-16.4}/sgqlc/types/relay.py +9 -4
  24. {sgqlc-16.2 → sgqlc-16.4}/sgqlc/types/uuid.py +5 -5
  25. {sgqlc-16.2 → sgqlc-16.4}/tests/test-endpoint-http.py +145 -120
  26. {sgqlc-16.2 → sgqlc-16.4}/tests/test-endpoint-requests.py +168 -138
  27. {sgqlc-16.2 → sgqlc-16.4}/tests/test-endpoint-websocket.py +61 -69
  28. sgqlc-16.4/tests/test-operation-codegen.py +232 -0
  29. sgqlc-16.2/MANIFEST.in +0 -6
  30. sgqlc-16.2/PKG-INFO +0 -561
  31. sgqlc-16.2/pyproject.toml +0 -3
  32. sgqlc-16.2/setup.cfg +0 -53
  33. sgqlc-16.2/setup.py +0 -69
  34. sgqlc-16.2/sgqlc/introspection/__main__.py +0 -68
  35. sgqlc-16.2/sgqlc.egg-info/SOURCES.txt +0 -53
  36. sgqlc-16.2/sgqlc.egg-info/dependency_links.txt +0 -1
  37. sgqlc-16.2/sgqlc.egg-info/entry_points.txt +0 -2
  38. sgqlc-16.2/sgqlc.egg-info/requires.txt +0 -11
  39. sgqlc-16.2/sgqlc.egg-info/top_level.txt +0 -1
  40. sgqlc-16.2/sgqlc.egg-info/zip-safe +0 -1
  41. {sgqlc-16.2 → sgqlc-16.4}/AUTHORS +0 -0
  42. {sgqlc-16.2 → sgqlc-16.4}/doc/source/_static/.keepme +0 -0
  43. {sgqlc-16.2 → sgqlc-16.4}/doc/source/_static/logo-sgqlc.png +0 -0
  44. {sgqlc-16.2 → sgqlc-16.4}/doc/source/favicon-sgqlc.png +0 -0
  45. {sgqlc-16.2 → sgqlc-16.4}/doc/source/index.rst +0 -0
  46. {sgqlc-16.2 → sgqlc-16.4}/doc/source/sgqlc.codegen.rst +0 -0
  47. {sgqlc-16.2 → sgqlc-16.4}/doc/source/sgqlc.endpoint.http.rst +0 -0
  48. {sgqlc-16.2 → sgqlc-16.4}/doc/source/sgqlc.endpoint.requests.rst +0 -0
  49. {sgqlc-16.2 → sgqlc-16.4}/doc/source/sgqlc.endpoint.rst +0 -0
  50. {sgqlc-16.2 → sgqlc-16.4}/doc/source/sgqlc.endpoint.websocket.rst +0 -0
  51. {sgqlc-16.2 → sgqlc-16.4}/doc/source/sgqlc.introspection.rst +0 -0
  52. {sgqlc-16.2 → sgqlc-16.4}/doc/source/sgqlc.operation.rst +0 -0
  53. {sgqlc-16.2 → sgqlc-16.4}/doc/source/sgqlc.types.rst +0 -0
  54. {sgqlc-16.2 → sgqlc-16.4}/sgqlc/codegen/__main__.py +0 -0
  55. {sgqlc-16.2 → sgqlc-16.4}/sgqlc/endpoint/__init__.py +0 -0
  56. {sgqlc-16.2 → sgqlc-16.4}/sgqlc/introspection/__init__.py +0 -0
  57. {sgqlc-16.2 → sgqlc-16.4}/tests/test-introspection.py +0 -0
@@ -14,4 +14,3 @@ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14
14
  PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15
15
  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16
16
  PERFORMANCE OF THIS SOFTWARE.
17
-
@@ -1,28 +1,36 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sgqlc
3
- Version: 16.2
3
+ Version: 16.4
4
4
  Summary: Simple GraphQL Client
5
5
  Home-page: http://github.com/profusion/sgqlc
6
+ License: ISCL
7
+ Keywords: graphql,client,http,endpoint
6
8
  Author: Gustavo Sverzut Barbieri
7
9
  Author-email: barbieri@profusion.mobi
8
- License: ISCL
9
- Keywords: graphql client http endpoint
10
- Platform: any
10
+ Requires-Python: >=3.8,<3.13
11
11
  Classifier: Development Status :: 4 - Beta
12
12
  Classifier: Environment :: Console
13
13
  Classifier: Environment :: Web Environment
14
14
  Classifier: Intended Audience :: Developers
15
15
  Classifier: License :: OSI Approved :: ISC License (ISCL)
16
+ Classifier: License :: Other/Proprietary License
16
17
  Classifier: Operating System :: OS Independent
17
18
  Classifier: Programming Language :: Python
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.8
21
+ Classifier: Programming Language :: Python :: 3.9
22
+ Classifier: Programming Language :: Python :: 3.10
23
+ Classifier: Programming Language :: Python :: 3.11
24
+ Classifier: Programming Language :: Python :: 3.12
18
25
  Classifier: Topic :: Utilities
19
- Requires-Python: >=3.6
20
- Description-Content-Type: text/x-rst
21
- Provides-Extra: sphinx
22
- Provides-Extra: websocket
23
26
  Provides-Extra: requests
24
- License-File: LICENSE
25
- License-File: AUTHORS
27
+ Provides-Extra: websocket
28
+ Requires-Dist: graphql-core (>=3.2.4,<4.0.0)
29
+ Requires-Dist: requests ; extra == "requests"
30
+ Requires-Dist: websocket-client ; extra == "websocket"
31
+ Project-URL: Documentation, https://sgqlc.readthedocs.io/
32
+ Project-URL: Repository, http://github.com/profusion/sgqlc
33
+ Description-Content-Type: text/x-rst
26
34
 
27
35
  `sgqlc` - Simple GraphQL Client
28
36
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -39,18 +47,18 @@ Introduction
39
47
  This package offers an easy to use `GraphQL <http://graphql.org>`_
40
48
  client. It's composed of the following modules:
41
49
 
42
- - :literal:`sgqlc.types`: declare GraphQL in Python, base to generate and
43
- interpret queries. Submodule :literal:`sgqlc.types.datetime` will
44
- provide bindings for :literal:`datetime` and ISO 8601, while
45
- :literal:`sgqlc.types.relay` will expose ``Node``, ``PageInfo`` and
50
+ - ``sgqlc.types``: declare GraphQL in Python, base to generate and
51
+ interpret queries. Submodule ``sgqlc.types.datetime`` will
52
+ provide bindings for ``datetime`` and ISO 8601, while
53
+ ``sgqlc.types.relay`` will expose ``Node``, ``PageInfo`` and
46
54
  ``Connection``.
47
55
 
48
- - :literal:`sgqlc.operation`: use declared types to generate and
56
+ - ``sgqlc.operation``: use declared types to generate and
49
57
  interpret queries.
50
58
 
51
- - :literal:`sgqlc.endpoint`: provide access to GraphQL endpoints, notably
52
- :literal:`sgqlc.endpoint.http` provides :literal:`HTTPEndpoint` using
53
- :literal:`urllib.request.urlopen()`.
59
+ - ``sgqlc.endpoint``: provide access to GraphQL endpoints, notably
60
+ ``sgqlc.endpoint.http`` provides ``HTTPEndpoint`` using
61
+ ``urllib.request.urlopen()``.
54
62
 
55
63
 
56
64
  What's GraphQL?
@@ -208,8 +216,8 @@ interpret the results. So **what was the rationale to create sgqlc?**
208
216
  types, such as ``Date``, ``Time`` and ``DateTime``. Often these are
209
217
  serialized as ISO 8601 strings and the user must parse them in their
210
218
  application. We offer ``sgqlc.types.datetime`` to automatically
211
- generate :literal:`datetime.date`, :literal:`datetime.time` and
212
- :literal:`datetime.datetime`.
219
+ generate ``datetime.date``, ``datetime.time`` and
220
+ ``datetime.datetime``.
213
221
 
214
222
  - Make it easy to write dynamic queries, including nested. As seen,
215
223
  GraphQL can be used to fetch lots of information in one go; however
@@ -220,7 +228,7 @@ interpret the results. So **what was the rationale to create sgqlc?**
220
228
  "solve" this by parsing the query locally before sending it to
221
229
  server. However usually the indentation is screwed and reviewing it
222
230
  is painful. We change that approach: use
223
- :literal:`sgqlc.operation.Operation` and it will always generate valid
231
+ ``sgqlc.operation.Operation`` and it will always generate valid
224
232
  queries, which can be printed out and properly indented. Bonus point
225
233
  is that it can be used to later interpret the JSON results into native
226
234
  Python objects.
@@ -231,11 +239,11 @@ interpret the results. So **what was the rationale to create sgqlc?**
231
239
  and its widely used. To load more data, you need to extend the
232
240
  previous data with newly fetched information, updating not only the
233
241
  nodes and edges, but also page information. This is done
234
- automatically by :literal:`sgqlc.types.relay.Connection`.
242
+ automatically by ``sgqlc.types.relay.Connection``.
235
243
 
236
244
  It also helps with code-generation, ``sgqlc-codegen`` can generate both
237
245
  the classes matching a GraphQL Schema or functions to return
238
- :literal:`sgqlc.operation.Operation` based on executable documents
246
+ ``sgqlc.operation.Operation`` based on executable documents
239
247
  GraphQL Domain Specific Language (DSL).
240
248
 
241
249
 
@@ -275,7 +283,7 @@ However, writing GraphQL queries and later interpreting the results
275
283
  may be cumbersome. That's solved by our ``sgqlc.types``, which is
276
284
  usually paired with ``sgqlc.operation`` to generate queries and then
277
285
  interpret results (see more at ``examples/basic/02_schema_types.py``). The
278
- example below matches a subset of
286
+ example below matches a subset of
279
287
  `GitHub API v4 <https://developer.github.com/v4/query/>`_.
280
288
  In GraphQL syntax it would be::
281
289
 
@@ -410,7 +418,7 @@ introspection call:
410
418
  user@host$ sgqlc-codegen schema github_schema.json github_schema.py
411
419
 
412
420
  This generates ``github_schema`` that provides the
413
- :literal:`sgqlc.types.Schema` instance of the same name ``github_schema``.
421
+ ``sgqlc.types.Schema`` instance of the same name ``github_schema``.
414
422
  Then it's a matter of using that in your Python code, as in the example below
415
423
  from ``examples/github/github_agile_dashboard.py``:
416
424
 
@@ -449,7 +457,7 @@ You can also generate these operations given a GraphQL Domain Specific
449
457
  Language (DSL) operation:
450
458
 
451
459
  .. code-block::
452
-
460
+
453
461
  # sample_operations.gql
454
462
 
455
463
  query ListIssues($owner: String!, $name: String!) {
@@ -510,34 +518,33 @@ License
510
518
  Getting started developing
511
519
  --------------------------
512
520
 
513
- You need to use `pipenv <https://pipenv.readthedocs.io/en/latest>`_.
521
+ You need to use `poetry <https://python-poetry.org/docs/#installation>`_.
514
522
 
515
523
  ::
516
524
 
517
- pipenv install --dev
518
- pipenv shell
525
+ poetry install --all-extras --with dev
526
+ poetry shell
519
527
 
520
- Install the git hooks:
528
+ Install the `pre-commit <https://pre-commit.com/index.html#install>`_:
521
529
 
522
530
  ::
523
531
 
524
- ./utils/git/install-git-hooks.sh
532
+ pre-commit install -f
525
533
 
526
534
  Run the tests (one of the below):
527
535
 
528
536
  ::
529
537
 
530
- ./utils/git/pre-commit # flake8 and nose
531
-
532
- ./setup.py nosetests # only nose (unit/doc tests)
533
- flake8 --config setup.cfg . # style checks
538
+ pre-commit run -a # run all tests: flake8, pytest, ...
539
+ pre-commit run -a flake8 # run only flake8
540
+ pre-commit run -a tests # run only pytest (unit tests)
534
541
 
535
542
  Keep 100% coverage. You can look at the coverage report at
536
- ``cover/index.html``. To do that, prefer
537
- `doctest <https://docs.python.org/3.7/library/doctest.html>`_
543
+ ``cover/index.html``. To do that, prefer
544
+ `doctest <https://docs.python.org/3.12/library/doctest.html>`_
538
545
  so it serves as
539
- both documentation and test. However we use
540
- `nose <https://nose.readthedocs.io>`_ to write explicit tests that would be
546
+ both documentation and test. However we use
547
+ `pytest <https://docs.pytest.org/>`_ to write explicit tests that would be
541
548
  hard to express using ``doctest``.
542
549
 
543
550
  Build and review the generated Sphinx documentation, and validate if your
@@ -545,7 +552,7 @@ changes look right:
545
552
 
546
553
  ::
547
554
 
548
- ./setup.py build_sphinx
555
+ sphinx-build doc/source doc/build
549
556
  open doc/build/html/index.html
550
557
 
551
558
 
@@ -559,3 +566,4 @@ Public Schemas
559
566
  The following repositories provides public schemas generated using ``sgqlc-codegen``:
560
567
 
561
568
  - `Mogost/sgqlc-schemas <https://github.com/Mogost/sgqlc-schemas>`_ GitHub, Monday.com
569
+
@@ -13,18 +13,18 @@ Introduction
13
13
  This package offers an easy to use `GraphQL <http://graphql.org>`_
14
14
  client. It's composed of the following modules:
15
15
 
16
- - :mod:`sgqlc.types`: declare GraphQL in Python, base to generate and
17
- interpret queries. Submodule :mod:`sgqlc.types.datetime` will
18
- provide bindings for :mod:`datetime` and ISO 8601, while
19
- :mod:`sgqlc.types.relay` will expose ``Node``, ``PageInfo`` and
16
+ - ``sgqlc.types``: declare GraphQL in Python, base to generate and
17
+ interpret queries. Submodule ``sgqlc.types.datetime`` will
18
+ provide bindings for ``datetime`` and ISO 8601, while
19
+ ``sgqlc.types.relay`` will expose ``Node``, ``PageInfo`` and
20
20
  ``Connection``.
21
21
 
22
- - :mod:`sgqlc.operation`: use declared types to generate and
22
+ - ``sgqlc.operation``: use declared types to generate and
23
23
  interpret queries.
24
24
 
25
- - :mod:`sgqlc.endpoint`: provide access to GraphQL endpoints, notably
26
- :mod:`sgqlc.endpoint.http` provides :class:`HTTPEndpoint` using
27
- :mod:`urllib.request.urlopen()`.
25
+ - ``sgqlc.endpoint``: provide access to GraphQL endpoints, notably
26
+ ``sgqlc.endpoint.http`` provides ``HTTPEndpoint`` using
27
+ ``urllib.request.urlopen()``.
28
28
 
29
29
 
30
30
  What's GraphQL?
@@ -182,8 +182,8 @@ interpret the results. So **what was the rationale to create sgqlc?**
182
182
  types, such as ``Date``, ``Time`` and ``DateTime``. Often these are
183
183
  serialized as ISO 8601 strings and the user must parse them in their
184
184
  application. We offer ``sgqlc.types.datetime`` to automatically
185
- generate :class:`datetime.date`, :class:`datetime.time` and
186
- :class:`datetime.datetime`.
185
+ generate ``datetime.date``, ``datetime.time`` and
186
+ ``datetime.datetime``.
187
187
 
188
188
  - Make it easy to write dynamic queries, including nested. As seen,
189
189
  GraphQL can be used to fetch lots of information in one go; however
@@ -194,7 +194,7 @@ interpret the results. So **what was the rationale to create sgqlc?**
194
194
  "solve" this by parsing the query locally before sending it to
195
195
  server. However usually the indentation is screwed and reviewing it
196
196
  is painful. We change that approach: use
197
- :class:`sgqlc.operation.Operation` and it will always generate valid
197
+ ``sgqlc.operation.Operation`` and it will always generate valid
198
198
  queries, which can be printed out and properly indented. Bonus point
199
199
  is that it can be used to later interpret the JSON results into native
200
200
  Python objects.
@@ -205,11 +205,11 @@ interpret the results. So **what was the rationale to create sgqlc?**
205
205
  and its widely used. To load more data, you need to extend the
206
206
  previous data with newly fetched information, updating not only the
207
207
  nodes and edges, but also page information. This is done
208
- automatically by :class:`sgqlc.types.relay.Connection`.
208
+ automatically by ``sgqlc.types.relay.Connection``.
209
209
 
210
210
  It also helps with code-generation, ``sgqlc-codegen`` can generate both
211
211
  the classes matching a GraphQL Schema or functions to return
212
- :class:`sgqlc.operation.Operation` based on executable documents
212
+ ``sgqlc.operation.Operation`` based on executable documents
213
213
  GraphQL Domain Specific Language (DSL).
214
214
 
215
215
 
@@ -249,7 +249,7 @@ However, writing GraphQL queries and later interpreting the results
249
249
  may be cumbersome. That's solved by our ``sgqlc.types``, which is
250
250
  usually paired with ``sgqlc.operation`` to generate queries and then
251
251
  interpret results (see more at ``examples/basic/02_schema_types.py``). The
252
- example below matches a subset of
252
+ example below matches a subset of
253
253
  `GitHub API v4 <https://developer.github.com/v4/query/>`_.
254
254
  In GraphQL syntax it would be::
255
255
 
@@ -384,7 +384,7 @@ introspection call:
384
384
  user@host$ sgqlc-codegen schema github_schema.json github_schema.py
385
385
 
386
386
  This generates ``github_schema`` that provides the
387
- :class:`sgqlc.types.Schema` instance of the same name ``github_schema``.
387
+ ``sgqlc.types.Schema`` instance of the same name ``github_schema``.
388
388
  Then it's a matter of using that in your Python code, as in the example below
389
389
  from ``examples/github/github_agile_dashboard.py``:
390
390
 
@@ -423,7 +423,7 @@ You can also generate these operations given a GraphQL Domain Specific
423
423
  Language (DSL) operation:
424
424
 
425
425
  .. code-block::
426
-
426
+
427
427
  # sample_operations.gql
428
428
 
429
429
  query ListIssues($owner: String!, $name: String!) {
@@ -484,34 +484,33 @@ License
484
484
  Getting started developing
485
485
  --------------------------
486
486
 
487
- You need to use `pipenv <https://pipenv.readthedocs.io/en/latest>`_.
487
+ You need to use `poetry <https://python-poetry.org/docs/#installation>`_.
488
488
 
489
489
  ::
490
490
 
491
- pipenv install --dev
492
- pipenv shell
491
+ poetry install --all-extras --with dev
492
+ poetry shell
493
493
 
494
- Install the git hooks:
494
+ Install the `pre-commit <https://pre-commit.com/index.html#install>`_:
495
495
 
496
496
  ::
497
497
 
498
- ./utils/git/install-git-hooks.sh
498
+ pre-commit install -f
499
499
 
500
500
  Run the tests (one of the below):
501
501
 
502
502
  ::
503
503
 
504
- ./utils/git/pre-commit # flake8 and nose
505
-
506
- ./setup.py nosetests # only nose (unit/doc tests)
507
- flake8 --config setup.cfg . # style checks
504
+ pre-commit run -a # run all tests: flake8, pytest, ...
505
+ pre-commit run -a flake8 # run only flake8
506
+ pre-commit run -a tests # run only pytest (unit tests)
508
507
 
509
508
  Keep 100% coverage. You can look at the coverage report at
510
- ``cover/index.html``. To do that, prefer
511
- `doctest <https://docs.python.org/3.7/library/doctest.html>`_
509
+ ``cover/index.html``. To do that, prefer
510
+ `doctest <https://docs.python.org/3.12/library/doctest.html>`_
512
511
  so it serves as
513
- both documentation and test. However we use
514
- `nose <https://nose.readthedocs.io>`_ to write explicit tests that would be
512
+ both documentation and test. However we use
513
+ `pytest <https://docs.pytest.org/>`_ to write explicit tests that would be
515
514
  hard to express using ``doctest``.
516
515
 
517
516
  Build and review the generated Sphinx documentation, and validate if your
@@ -519,7 +518,7 @@ changes look right:
519
518
 
520
519
  ::
521
520
 
522
- ./setup.py build_sphinx
521
+ sphinx-build doc/source doc/build
523
522
  open doc/build/html/index.html
524
523
 
525
524
 
@@ -1,4 +1,3 @@
1
- #!/usr/bin/env python3
2
1
  # -*- coding: utf-8 -*-
3
2
  #
4
3
  # This file is execfile()d with the current directory set to its
@@ -62,16 +61,16 @@ author = 'ProFUSION Sistemas e Solucoes LTDA'
62
61
  # built documents.
63
62
  #
64
63
  # The short X.Y version.
65
- version = '1'
64
+ version = '16.4'
66
65
  # The full version, including alpha/beta/rc tags.
67
- release = '1'
66
+ release = '16.4'
68
67
 
69
68
  # The language for content autogenerated by Sphinx. Refer to documentation
70
69
  # for a list of supported languages.
71
70
  #
72
71
  # This is also used if you do content translation via gettext catalogs.
73
72
  # Usually you set "language" from the command line for these cases.
74
- language = None
73
+ language = 'en'
75
74
 
76
75
  # List of patterns, relative to source directory, that match files and
77
76
  # directories to ignore when looking for source files.
@@ -6,4 +6,3 @@
6
6
  :special-members:
7
7
  :show-inheritance:
8
8
  :private-members:
9
-
@@ -5,4 +5,3 @@
5
5
  :members:
6
6
  :special-members:
7
7
  :show-inheritance:
8
-
@@ -5,4 +5,3 @@
5
5
  :members:
6
6
  :special-members:
7
7
  :show-inheritance:
8
-
@@ -5,4 +5,3 @@
5
5
  :members:
6
6
  :special-members:
7
7
  :show-inheritance:
8
-
@@ -5,4 +5,3 @@
5
5
  :members:
6
6
  :special-members:
7
7
  :show-inheritance:
8
-
@@ -0,0 +1,85 @@
1
+ [tool.black]
2
+ line-length = 79
3
+ skip-string-normalization = true
4
+ target-version = ['py38', 'py39', 'py310', 'py311', 'py312']
5
+ force-exclude = '/(doc/|examples/.*(schema|operations)[.]py)'
6
+
7
+ [tool.pytest.ini_options]
8
+ addopts = '--import-mode=importlib --doctest-modules --cov=sgqlc --cov-fail-under=100 --cov-report=term-missing --cov-report=xml --cov-report=html:cover'
9
+ python_files = ['test-*.py', 'test_*.py']
10
+ testpaths = [
11
+ 'sgqlc',
12
+ 'tests',
13
+ ]
14
+ norecursedirs = [
15
+ '.eggs',
16
+ '.git',
17
+ '.github',
18
+ '.venv',
19
+ '*.egg-info',
20
+ 'build',
21
+ 'cover',
22
+ 'dist',
23
+ 'doc',
24
+ 'examples',
25
+ 'utils',
26
+ ]
27
+
28
+ [tool.poetry]
29
+ name = 'sgqlc'
30
+ version = '16.4'
31
+ description = 'Simple GraphQL Client'
32
+ readme = 'README.rst'
33
+ authors = [
34
+ 'Gustavo Sverzut Barbieri <barbieri@profusion.mobi>',
35
+ ]
36
+ homepage = 'http://github.com/profusion/sgqlc'
37
+ repository = 'http://github.com/profusion/sgqlc'
38
+ documentation = 'https://sgqlc.readthedocs.io/'
39
+ license = 'ISCL'
40
+ keywords = ['graphql', 'client', 'http', 'endpoint']
41
+ classifiers=[
42
+ 'Development Status :: 4 - Beta',
43
+ 'Environment :: Console',
44
+ 'Environment :: Web Environment',
45
+ 'Intended Audience :: Developers',
46
+ 'License :: OSI Approved :: ISC License (ISCL)',
47
+ 'Operating System :: OS Independent',
48
+ 'Programming Language :: Python',
49
+ 'Topic :: Utilities',
50
+ ]
51
+ packages = [{ include = 'sgqlc' }]
52
+ include = [
53
+ { path = 'AUTHORS', format = 'sdist' },
54
+ { path = 'doc/source', format = 'sdist' },
55
+ { path = 'tests', format = 'sdist' },
56
+ ]
57
+
58
+ [tool.poetry.scripts]
59
+ sgqlc-codegen = 'sgqlc.codegen:main'
60
+
61
+ [tool.poetry.dependencies]
62
+ # <3.13 is to enable coveralls 4, which requires python >=3.8,<3.13
63
+ python = '>=3.8,<3.13'
64
+ graphql-core = '^3.2.4'
65
+ websocket-client = { version = '*', optional = true }
66
+ requests = { version = '*', optional = true }
67
+
68
+ [tool.poetry.extras]
69
+ websocket = ['websocket-client']
70
+ requests = ['requests']
71
+
72
+ [tool.poetry.group.dev.dependencies]
73
+ coveralls = '*'
74
+ pytest = '*'
75
+ pytest-cov = '*'
76
+ sphinx = '*'
77
+ sphinx-argparse = '*'
78
+
79
+ [tool.poetry.group.docs.dependencies]
80
+ sphinx = '*'
81
+ sphinx-argparse = '*'
82
+
83
+ [build-system]
84
+ requires = ['poetry-core']
85
+ build-backend = 'poetry.core.masonry.api'
@@ -25,4 +25,4 @@ modules:
25
25
  '''
26
26
 
27
27
  __docformat__ = 'reStructuredText en'
28
- __version__ = '16.2'
28
+ __version__ = '16.4'
@@ -118,13 +118,19 @@ def main():
118
118
  continue
119
119
  elif arg not in subcommands:
120
120
  raw_args.insert(i, 'schema')
121
- sys.stderr.writelines((
122
- 'WARNING: ', sys.argv[0],
123
- ' now requires a "command" specifier. Assuming "schema". '
124
- 'Please update your usage as this automatic conversion '
125
- 'will be removed in the future!\n'
126
- ))
121
+ sys.stderr.writelines(
122
+ (
123
+ 'WARNING: ',
124
+ sys.argv[0],
125
+ ' now requires a "command" specifier. Assuming "schema". '
126
+ 'Please update your usage as this automatic conversion '
127
+ 'will be removed in the future!\n',
128
+ )
129
+ )
127
130
  break
128
131
 
129
132
  args = ap.parse_args(raw_args)
133
+ if 'func' not in args:
134
+ ap.error('missing command')
135
+
130
136
  args.func(args)