Skip to main content

eoq3autobahnws - Websocket domain client and host using autobahn

A domain server makes a local domain accessible via a WS port.

A domain host connects to a remote domain using WS.

client and server are based on autobahn: https://autobahn.readthedocs.io/en/latest/index.html

Usage

Define serialization and timeouts

config = Config()
config.remoteCmdTxSerializer = "TXT" #or JSO
config.remoteCmdRxSerializers = ["TXT","JSO"] #or e.g. ["TXT"]
config.remoteFrmTxSerializer = "TXT" #or JSO
config.remoteFrmRxSerializer = "TXT" #or JSO
config.connectTimeout = 40

Host

Imports:

from eoq3autobahnws.autobahnwsdomainhost import AutobahnWsDomainHost

Create an SSL factory (optional):

def ServerSslFactory(sslFactoryArgs:dict):
    return CreateSelfSignedServerSslContext("ssl/certificate.pem", "ssl/key.pem", "ILS-admin")

Creating a TCP host domain that provides acces to another domain "localDomain", e.g. DomainWithMdb:

server = AutobahnWsDomainHost(localDomain, True, '127.0.0.1', 5141, nWorkers=N_THREADS, config=config) #no ssh

server = AutobahnWsDomainHost(localDomain, True, '127.0.0.1', 5141, sslContextFactory=ServerSslFactory, nWorkers=N_THREADS, config=config) #with ssh

Client

Imports:

from eoq3autobahnws.autobahnwsdomainclient import AutobahnWsDomainClient
from eoq3autobahnws.util.ssl import CreateClientSslContextForSelfSignedServerCert

Create an SSL factory (optional):

def ClientSslFactory(domainFactoryArgs:dict): 
    return CreateClientSslContextForSelfSignedServerCert("ssl/certificate.pem")

Connecting to a remote domain:

domain = AutobahnWsDomainClient('127.0.0.1',5141) #no ssl

domain = AutobahnWsDomainClient('127.0.0.1',5141,sslContextFactory=ClientSslFactory) #with ssl

Examples

See

  • pyeoq/Examples/Eoq3/BasicWebsocketServer.py and
  • pyeoq/Examples/Eoq3/BasicWebsocketDomain.py

Documentation

For more information see EOQ3 documentation: https://eoq.gitlab.io/doc/eoq3/

Author

2024 Bjoern Annighoefer

Release files for eoq3autobahnws 2.9.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for eoq3autobahnws 2.9.5
File Size Uploaded
eoq3autobahnws-2.9.5.tar.gz 9.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for eoq3autobahnws 2.9.5
File Interpreter ABI Platform
eoq3autobahnws-2.9.5-py3-none-any.whl Python 3 none any Details

Total release size: 22.1 kB

Release files / eoq3autobahnws-2.9.5.tar.gz

Download URL eoq3autobahnws-2.9.5.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f228e0595adda9bbfda4eb4de0550dc8e49dc4b72f123d945f7a1c410fcb01ae
BLAKE2b-256 checksum
How to use checksums
d500de4d58a7a7f8384fdba3b506d06f341da27870abf7916a9ab2244868ccea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / eoq3autobahnws-2.9.5-py3-none-any.whl

Download URL eoq3autobahnws-2.9.5-py3-none-any.whl
Size 12.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
28dbcb7b14453219aeae509b5d42c238462ec3d7f00093d7a3617fb9445dc1c2
BLAKE2b-256 checksum
How to use checksums
f1ef3315188268527cda33d879317b911f4ab14465a7ac711248b046edb25893
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.2

Release history Release notifications | RSS feed

This release

2.9.5 This release

2 release files

2.9.4

2 release files

2.9.3

2 release files

2.9.2

2 release files

2.9.1

2 release files

2.9.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page