https://github.com/hugodf/python-graphql-client-example
An example consuming a GraphQL API from Python using gql.
https://github.com/hugodf/python-graphql-client-example
graphql graphql-client python python-graphql-client
Last synced: about 1 month ago
JSON representation
An example consuming a GraphQL API from Python using gql.
- Host: GitHub
- URL: https://github.com/hugodf/python-graphql-client-example
- Owner: HugoDF
- Created: 2018-08-06T10:36:20.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T02:32:31.000Z (over 3 years ago)
- Last Synced: 2025-04-03T02:23:13.504Z (12 months ago)
- Topics: graphql, graphql-client, python, python-graphql-client
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Python GraphQL client example
An example consuming a GraphQL API from Python using gql.
## Run using virtualenv
```sh
$ virtualenv venv -p python3
```
```sh
$ source ./venv/bin/activate
```
```sh
$ pip install -r requirements.txt
```
```sh
$ python fetch.py
{'pokemon': {'attacks': {'special': [{'name': 'Discharge'}, {'name': 'Thunder'}, {'name': 'Thunderbolt'}]}}}
```