File tree Expand file tree Collapse file tree 2 files changed +35
-2
lines changed Expand file tree Collapse file tree 2 files changed +35
-2
lines changed Original file line number Diff line number Diff line change 1
1
# python-graphql-client
2
2
Simple GraphQL client for Python 2.7+
3
+
4
+ ## Install
5
+
6
+ ``` sh
7
+ pip install graphqlclient
8
+ ```
9
+
10
+ ## Usage
11
+
12
+
13
+ ``` py
14
+ from graphqlclient import GraphQLClient
15
+
16
+ client = GraphQLClient(' http://graphql-swapi.parseapp.com/' )
17
+
18
+ result = client.execute('''
19
+ {
20
+ allFilms {
21
+ films {
22
+ title
23
+ }
24
+ }
25
+ }
26
+ ''' )
27
+
28
+ print (result)
29
+ ```
30
+
31
+ ## License
32
+
33
+ [ MIT License] ( http://opensource.org/licenses/MIT )
Original file line number Diff line number Diff line change 5
5
def main ():
6
6
client = GraphQLClient ('http://graphql-swapi.parseapp.com/' )
7
7
8
- print ( client .execute ('''
8
+ result = client .execute ('''
9
9
{
10
10
allFilms {
11
11
films {
12
12
title
13
13
}
14
14
}
15
15
}
16
- ''' ))
16
+ ''' )
17
+
18
+ print (result )
17
19
18
20
if __name__ == '__main__' :
19
21
main ()
You can’t perform that action at this time.
0 commit comments