gql-actioncable
This is a graphql-python/gql transport for the ActionCable websockets protocol.
Installation
You can install the transport with:
pip install gqlactioncable
Usage
Here is an example using the sorare.com GraphQL websockets backend:
import asyncio
from gql import Client, gql
from gqlactioncable import ActionCableWebsocketsTransport
async def main():
transport = ActionCableWebsocketsTransport(
url="wss://ws.sorare.com/cable",
keep_alive_timeout=60,
)
async with Client(transport=transport) as session:
subscription = gql(
"""
subscription onAnyCardUpdated {
anyCardWasUpdated {
card {
name
grade
}
}
}
"""
)
async for result in session.subscribe(subscription):
print(result["anyCardWasUpdated"])
asyncio.run(main())
License
Metadata
Release files for gqlactioncable 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gqlactioncable-1.0.2.tar.gz | 6.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gqlactioncable-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.1 kB
Release files / gqlactioncable-1.0.2.tar.gz
| Download URL | gqlactioncable-1.0.2.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c2517ecb259c492183089bcbe13527cf2d9c53885486df27e309da102804ece7
|
|
BLAKE2b-256 checksum How to use checksums |
b4556753ab30f9c512596cc90d2aa18636b681f4b748fa4418f4432ea1b9eb57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / gqlactioncable-1.0.2-py3-none-any.whl
| Download URL | gqlactioncable-1.0.2-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0137aadbf4da8ccfd3ecf98f2b2f617419615363d19496049af6917a8be18f2a
|
|
BLAKE2b-256 checksum How to use checksums |
40f2a763fb849f6c39ad9f35130b0751f13a3a24aa2969e038d77f48bd29e5f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|