mpservice#

(Generated on Apr 16, 2024 for mpservice version 0.15.0.)

The package mpservice provides utilities for Python concurrency, including most notably

  1. Serving with multiprocessing to make full use of multiple cores, and batching to take advantage of vectorized computation if some components of the service have that capability.

    One use case is machine learning model serving, although the code is generic and not restricted to this particular use case.

    A mpservice.mpserver.Server or mpservice.mpserver.AsyncServer object could be used either in “embedded” mode or to back a service. Utilities are provided in mpservice.http, mpservice.socket, and mpservice.pipe for the latter use case.

  2. Stream processing, i.e. processing a long, possibly infinite stream of input data, with multiple operators in the pipeline. A main use case is that one or more of the operators is I/O bound or compute intensive, hence can benefit from concurrency.

  3. Utilities in mpservice.multiprocessing to enhance or customize Python’s standard multiprocessing module.

To install, do

python3 -m pip install mpservice

Indices and tables#