graphql-py: Parser for latest GraphQL specification
Project description
GraphQL lexer and parser written in pure Python, produces AST. Features:
Complies with latest working draft of GraphQL specification;
Fast enough, built on PLY;
Tested vs. Python 2.7, 3.4 - 3.9, and PyPy
Installation
$ pip install graphql-py
Usage
from graphql.parser import GraphQLParser
parser = GraphQLParser()
ast = parser.parse("""
query UserQuery {
user(id: 4) {
id
name
profilePic
avatar: profilePic(width: 30, height: 30)
}
}
""")
print(ast)
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
graphql-py-0.8.1.tar.gz
(13.6 kB
view hashes)