当前位置: 首页 > 软件库 > 大数据 > 数据查询 >

gql

A GraphQL client in Python
授权协议 MIT License
开发语言 Java
所属分类 大数据、 数据查询
软件类型 开源软件
地区 不详
投 递 者 皇甫聪
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

GQL

This is a GraphQL client for Python 3.6+.Plays nicely with graphene, graphql-core, graphql-js and any other GraphQL implementation compatible with the spec.

GQL architecture is inspired by React-Relay and Apollo-Client.

WARNING: Please note that the following documentation describes the current version which is currently only available as a pre-releaseThe documentation for the 2.x version compatible with python<3.6 is available in the 2.x branch

GitHub-Actions

Documentation

The complete documentation for GQL can be found atgql.readthedocs.io.

Features

The main features of GQL are:

Installation

WARNING: Please note that the following documentation describes the current version which is currently only available as a pre-release and needs to be installed with

$ pip install --pre gql[all]

NOTE: See also the documentation to install GQL with less extra dependencies

Usage

Basic usage

from gql import gql, Client
from gql.transport.aiohttp import AIOHTTPTransport

# Select your transport with a defined url endpoint
transport = AIOHTTPTransport(url="https://countries.trevorblades.com/")

# Create a GraphQL client using the defined transport
client = Client(transport=transport, fetch_schema_from_transport=True)

# Provide a GraphQL query
query = gql(
    """
    query getContinents {
      continents {
        code
        name
      }
    }
"""
)

# Execute the query on the transport
result = client.execute(query)
print(result)

WARNING: Please note that this basic example won't work if you have an asyncio event loop running. In somepython environments (as with Jupyter which uses IPython) an asyncio event loop is created for you. In that case youshould use instead the async usage example.

Contributing

See CONTRIBUTING.md

License

MIT License

  • http://wapbaike.baidu.com/view/8965981.htm?uid=D0604A052A48B0F5013EC29A99F19073&bd_page_type=1&st=3&step=2&net=0&ldr=0 概述 GQL 是一种类似于 SQL 的查询语言,适用于查询 App Engine 数据库。有关 GQL 语法和功能的完整讨论,请参阅 GQL 参考。 GqlQue

  • 问题说明 在Spring整合Mybatis时,遇到此问题。 Caused by: java.lang.NoSuchMethodException: com.gql.pojo.User.<init>() at java.lang.Class.getConstructor0(Class.java:2892) at java.lang.Class.getDeclaredConstructor(Cla