Skip to main content

Gevent-based WebSocket server for async job processing

Project description

k3wsjobd

Action-CI Build Status Documentation Status Package

This module is a gevent based websocket server. When the server receives a job description from a client, it runs that job asynchronously in a thread, and reports the progress back to the client periodically.

k3wsjobd is a component of pykit3 project: a python3 toolkit set.

This module is a gevent based websocket server. When the server receives a job description from a client, it runs that job asynchronously in a thread, and reports the progress back to the client periodically.

Install

pip install k3wsjobd

Synopsis

from geventwebsocket import Resource, WebSocketServer
import k3wsjobd
from k3wsjobd import logging


def run():
    k3wsjobd.run(ip='127.0.0.1', port=33445)


if __name__ == "__main__":
    logger = logging.getLogger()
    logger.setLevel(logging.INFO)

    file_handler = logging.FileHandler('wsjobd.log')
    formatter = logging.Formatter('[%(asctime)s, %(levelname)s] %(message)s')
    file_handler.setFormatter(formatter)
    logger.addHandler(file_handler)
    run()

Author

Zhang Yanpo (张炎泼) drdr.xp@gmail.com

Copyright and License

The MIT License (MIT)

Copyright (c) 2015 Zhang Yanpo (张炎泼) drdr.xp@gmail.com

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

k3wsjobd-0.1.1.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

k3wsjobd-0.1.1-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file k3wsjobd-0.1.1.tar.gz.

File metadata

  • Download URL: k3wsjobd-0.1.1.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for k3wsjobd-0.1.1.tar.gz
Algorithm Hash digest
SHA256 fbb8a72ea540b9debeb03471cbe79a15c3c568b1ce389d4b080ffa882f510510
MD5 df7e5c41a41152ecfbee5e0f4f59f8d2
BLAKE2b-256 4374dc8ffb4c2ce117fedc017d381e7bcbb1a7a76eaa0c922417b9ff33059126

See more details on using hashes here.

File details

Details for the file k3wsjobd-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: k3wsjobd-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for k3wsjobd-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2f9789fcec23ee6ad395d7213c00166c75c69676a77d484e6a5e1e59de600676
MD5 e27b5a1cfc30af43570763a071b7c1ed
BLAKE2b-256 9e92af9a0c17e47fedf378d19231e80527aeebb78f255091bf59151dae055f04

See more details on using hashes here.

Supported by

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