Supports gremlinpython without asyncio
Project description
This package helps you use gremlinpython,
when you can't use asyncio.
Problem
In some settings, e.g. an eventlet
web server with monkey patching, you may run into errors if you try to run code
that relies on Python's asyncio framework.
(Demonstration here.)
If you want to use gremlinpython in such a setting, then you need an
alternative to the built-in AiohttpTransport class.
Solution
This package provides the WebsocketClientTransport class. It relies on the popular
websocket-client package,
which runs without asyncio.
Usage
from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection
from wsc_grempy_transport.transport import websocket_client_transport_factory
remote = DriverRemoteConnection(
'ws://localhost:8182/gremlin',
transport_factory=websocket_client_transport_factory)
Development
The WebsocketClientTransport class is very rudimentary. It is essentially
just a wrapper for the websocket.WebSocket class, and could probably benefit
from some error checking to make it more robust.
Contributions are welcome!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wsc-grempy-transport-0.1.0.tar.gz.
File metadata
- Download URL: wsc-grempy-transport-0.1.0.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be32e2e98973c25392498a61f519ec49d581bdaa9e448abd1b2f975d30f0ad58
|
|
| MD5 |
4a34ced45f7e635bec22a75ad26c4bf2
|
|
| BLAKE2b-256 |
cdb040edd4d8f7baf89a86645ddbe40ab71dc13cbc7aac80cb147c76af75cda0
|
File details
Details for the file wsc_grempy_transport-0.1.0-py3-none-any.whl.
File metadata
- Download URL: wsc_grempy_transport-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c24d1c0d164057935e5fe1dc8a74bc8c0cf937dac2cd5528d612b00d416a0b1
|
|
| MD5 |
dee6a54cfe1b84ef1f49b34d4bee0075
|
|
| BLAKE2b-256 |
69c79616d42a557de84acfeefd9963677f2c3681c6725356fde23a9a1ab076aa
|