Skip to main content

A Python library for making GraphQL requests easier!

Project description

gqlrequests - A Python library for making GraphQL requests easier!

Define GraphQL types in Python, then use them to build queries super easy:

class Episode(GraphQLType):
    name = str
    length = float

class Character(GraphQLType):
    name = str
    appearsIn = [Episode]

print(Character)

print(Character.query())
# {
#     name
#     appearsIn {
#         name
#         length
#     }
# } 

print(Character.query("name"))
# {
#     name
# } 

print(Character.query(indent=2)) # Default indent is 4
# {
#   name
#   appearsIn {
#     name
#     length
#   }
# } 

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gqlrequests-0.0.1.tar.gz (2.5 kB view hashes)

Uploaded Source

Built Distribution

gqlrequests-0.0.1-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page