在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):graphql-python/gql开源软件地址(OpenSource Url):https://github.com/graphql-python/gql开源编程语言(OpenSource Language):Python 99.9%开源软件介绍(OpenSource Introduction):GQLThis is a GraphQL client for Python 3.6+.
Plays nicely with GQL architecture is inspired by DocumentationThe complete documentation for GQL can be found at gql.readthedocs.io. Features
InstallationYou can install GQL with all the optional dependencies using pip:
UsageBasic usagefrom 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)
ContributingSee CONTRIBUTING.md License |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论