py-graphql-client:简单的GraphQL客户端,通过WebSocket进行订阅

时间:2021-05-24 04:48:02
【文件属性】:
文件名称:py-graphql-client:简单的GraphQL客户端,通过WebSocket进行订阅
文件大小:16KB
文件格式:ZIP
更新时间:2021-05-24 04:48:02
python graphql-client graphql websockets python3 py-graphql客户端 非常简单,可以通过websocket使用GraphQL客户端。 使用协议。 安装 pip install py-graphql-client 例子 设置订阅超级容易 from graphql_client import GraphQLClient query = """ subscription { notifications { id title content } } """ with GraphQLClient ( 'ws://localhost:8080/graphql' ) as client : sub_id = client . subscribe ( query , callback = callback ) # do other stuff # ... # later
【文件预览】:
py-graphql-client-master
----.github()
--------workflows()
----graphql_client()
--------__init__.py(9KB)
----LICENSE(1KB)
----setup.py(2KB)
----README.md(3KB)
----Makefile(359B)
----tests()
--------test.py(7KB)
--------websocket_server.py(12KB)
----.gitignore(2KB)
----example.py(1KB)
----CHANGELOG.md(1KB)

网友评论