Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

graphql-py

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-py

graphql-py: Parser for latest GraphQL specification

  • 0.8.1
  • PyPI
  • Socket score

Maintainers
1

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

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc