Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wsc-grempy-transport-0.1.0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

wsc_grempy_transport-0.1.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

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

Hashes for wsc-grempy-transport-0.1.0.tar.gz
Algorithm Hash digest
SHA256 be32e2e98973c25392498a61f519ec49d581bdaa9e448abd1b2f975d30f0ad58
MD5 4a34ced45f7e635bec22a75ad26c4bf2
BLAKE2b-256 cdb040edd4d8f7baf89a86645ddbe40ab71dc13cbc7aac80cb147c76af75cda0

See more details on using hashes here.

File details

Details for the file wsc_grempy_transport-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for wsc_grempy_transport-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6c24d1c0d164057935e5fe1dc8a74bc8c0cf937dac2cd5528d612b00d416a0b1
MD5 dee6a54cfe1b84ef1f49b34d4bee0075
BLAKE2b-256 69c79616d42a557de84acfeefd9963677f2c3681c6725356fde23a9a1ab076aa

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page