Socket
Socket
Sign inDemoInstall

graphql-py

Package Overview
Dependencies
0
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    graphql-py

graphql-py: Parser for latest GraphQL specification


Maintainers
1

Readme

graphql-py

.. image:: https://travis-ci.org/ivelum/graphql-py.svg?branch=master :target: https://travis-ci.org/ivelum/graphql-py

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

.. _working draft of GraphQL specification: https://facebook.github.io/graphql/ .. _PLY: http://www.dabeaz.com/ply/

Installation

.. code:: shell

$ pip install graphql-py

Usage

.. code:: shell

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

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc