🌐🐍 gql.py
-------
_GraphQL Client for Pythonistas_
gql.py is a Pythonic interface around graphQL APIs.
You've got a graphQL API, and you want to talk to it, right?
GraphQL's use of HTTP is questionable at best, for those of us who love HTTP standards. But you can't deny graphQL's usefulness. The goal of this library is to remove the fuss of HTTP so you can deal with graphQL directly. Just how graphQL's developers intended.
[![PyPi][pypi-image]][pypi-link]
[![CircleCI][circle-image]][circle-link]
[![Coverage Status][codecov-image]][codecov-link]
[![Landscape Status][landscape-image]][landscape-link]
```python
from gql_py import Gql
gql = Gql(api='https://graphql.org/swapi-graphql')
query = '''
query ($bookId: ID!) {
book(id: $bookId) {
id
title
author
}
}
'''
variables = {
'book_id': '654'
}
response = qgl.send(query=query, variables=variables)
response.ok
>>> True
response.errors
>>> None
response.data
>>> {'book': {'id': '654', 'title': 'Ursula K. Le Guin', 'title': 'A Wizard of Earthsea'}}
```
📖 Features
--------
- No need to handle the HTTP layer. (You can still set HTTP headers, though!)
- Responses come back as named tuples - even errors!
- Python 3.6+
✨ Future goals
---------------
- Draw graphQL queries & mutations with Python code.
- Hydrate API responses into Python objects.
🏗 Status
----------
gql.py is currently under development.
🎥 Credits
---------
This package was created with [Cookiecutter](https://github.com/audreyr/cookiecutter).
We use [Python Requests](http://docs.python-requests.org/en/master/) for talking HTTP.
[pypi-image]: https://img.shields.io/pypi/v/gql_py.svg
[pypi-link]: https://pypi.python.org/pypi/gql_py
[pypi-dl-image]: https://img.shields.io/pypi/dm/gql_py.png
[circle-image]: https://circleci.com/gh/phalt/gql_py/tree/master.svg?style=svg
[circle-link]: https://circleci.com/gh/phalt/gql_py/tree/master
[codecov-image]: https://codecov.io/gh/phalt/gql_py/branch/master/graph/badge.svg?token=T9mYPv0Ep2
[codecov-link]: http://codecov.io/github/phalt/gql_py?branch=master
[landscape-image]: https://landscape.io/github/phalt/gql_py/master/landscape.svg?style=flat&badge_auth_token=0cce4803ec014cf4ad889498bba7e7e7
[landscape-link]: https://landscape.io/github/phalt/gql_py/master
-------
_GraphQL Client for Pythonistas_
gql.py is a Pythonic interface around graphQL APIs.
You've got a graphQL API, and you want to talk to it, right?
GraphQL's use of HTTP is questionable at best, for those of us who love HTTP standards. But you can't deny graphQL's usefulness. The goal of this library is to remove the fuss of HTTP so you can deal with graphQL directly. Just how graphQL's developers intended.
[![PyPi][pypi-image]][pypi-link]
[![CircleCI][circle-image]][circle-link]
[![Coverage Status][codecov-image]][codecov-link]
[![Landscape Status][landscape-image]][landscape-link]
```python
from gql_py import Gql
gql = Gql(api='https://graphql.org/swapi-graphql')
query = '''
query ($bookId: ID!) {
book(id: $bookId) {
id
title
author
}
}
'''
variables = {
'book_id': '654'
}
response = qgl.send(query=query, variables=variables)
response.ok
>>> True
response.errors
>>> None
response.data
>>> {'book': {'id': '654', 'title': 'Ursula K. Le Guin', 'title': 'A Wizard of Earthsea'}}
```
📖 Features
--------
- No need to handle the HTTP layer. (You can still set HTTP headers, though!)
- Responses come back as named tuples - even errors!
- Python 3.6+
✨ Future goals
---------------
- Draw graphQL queries & mutations with Python code.
- Hydrate API responses into Python objects.
🏗 Status
----------
gql.py is currently under development.
🎥 Credits
---------
This package was created with [Cookiecutter](https://github.com/audreyr/cookiecutter).
We use [Python Requests](http://docs.python-requests.org/en/master/) for talking HTTP.
[pypi-image]: https://img.shields.io/pypi/v/gql_py.svg
[pypi-link]: https://pypi.python.org/pypi/gql_py
[pypi-dl-image]: https://img.shields.io/pypi/dm/gql_py.png
[circle-image]: https://circleci.com/gh/phalt/gql_py/tree/master.svg?style=svg
[circle-link]: https://circleci.com/gh/phalt/gql_py/tree/master
[codecov-image]: https://codecov.io/gh/phalt/gql_py/branch/master/graph/badge.svg?token=T9mYPv0Ep2
[codecov-link]: http://codecov.io/github/phalt/gql_py?branch=master
[landscape-image]: https://landscape.io/github/phalt/gql_py/master/landscape.svg?style=flat&badge_auth_token=0cce4803ec014cf4ad889498bba7e7e7
[landscape-link]: https://landscape.io/github/phalt/gql_py/master
Release files for gql-py 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gql_py-0.3.0.tar.gz | 6.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gql_py-0.3.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 12.7 kB
Release files / gql_py-0.3.0.tar.gz
| Download URL | gql_py-0.3.0.tar.gz |
|---|---|
| Size | 6.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e105377a603416452049c8206d6a8eedc30fdaeaac67b3df98be322ec6efa147
|
|
BLAKE2b-256 checksum How to use checksums |
1ecedff8e6def657457eb1c145026099ac722243b5656c155985edc230f623d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.10.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5
|
Release files / gql_py-0.3.0-py2.py3-none-any.whl
| Download URL | gql_py-0.3.0-py2.py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
f9200ff04afb88ae74cbdabaa1418af69f2aaf524ecd136ae848e2a0cb40315d
|
|
BLAKE2b-256 checksum How to use checksums |
007e1d319cde1afd7b9b5c7ede044ffe9d43a82f8b67566c800ea10c22e748f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.10.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5
|