Skip to main content

processing is a package for the Python language which supports the spawning of processes using the API of the standard library’s threading module. It runs on both Unix and Windows.

Features:

  • Objects can be transferred between processes using pipes or multi-producer/multi-consumer queues.

  • Objects can be shared between processes using a server process or (for simple data) shared memory.

  • Equivalents of all the synchronization primitives in threading are available.

  • A Pool class makes it easy to submit tasks to a pool of worker processes.

Examples

The processing.Process class follows the API of threading.Thread. For example

from processing import Process, Queue

def f(q):
    q.put('hello world')

if __name__ == '__main__':
    q = Queue()
    p = Process(target=f, args=[q])
    p.start()
    print q.get()
    p.join()

Synchronization primitives like locks, semaphores and conditions are available, for example

>>> from processing import Condition
>>> c = Condition()
>>> print c
<Condition(<RLock(None, 0)>), 0>
>>> c.acquire()
True
>>> print c
<Condition(<RLock(MainProcess, 1)>), 0>

One can also use a manager to create shared objects either in shared memory or in a server process, for example

>>> from processing import Manager
>>> manager = Manager()
>>> l = manager.list(range(10))
>>> l.reverse()
>>> print l
[9, 8, 7, 6, 5, 4, 3, 2, 1, 0]
>>> print repr(l)
<Proxy[list] object at 0x00E1B3B0>

Tasks can be offloaded to a pool of worker processes in various ways, for example

>>> from processing import Pool
>>> def f(x): return x*x
...
>>> p = Pool(4)
>>> result = p.mapAsync(f, range(10))
>>> print result.get(timeout=1)
[0, 1, 4, 9, 16, 25, 36, 49, 64, 81]

Metadata

Release files for processing 0.52

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

Source distribution (sdist)

Source distribution for processing 0.52
File Size Uploaded
processing-0.52.zip 178.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for processing 0.52
File Interpreter ABI Platform
processing-0.52.win32-py2.5.exe Details
processing-0.52.win32-py2.4.exe Details

Total release size: 559.0 kB

Release files / processing-0.52.zip

Download URL processing-0.52.zip
Size 178.0 kB
Tags Source
SHA-256 checksum
How to use checksums
976fa4f8d30e8dc8216ae24d44c95587ae05ab39e9ac4bdc10691cab51fca11d
BLAKE2b-256 checksum
How to use checksums
3b2da6f17cc99d9c45c33eb3eccd6999505d9197b31f0845a845919032262a01
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / processing-0.52.win32-py2.5.exe

Download URL processing-0.52.win32-py2.5.exe
Size 191.2 kB
Tags Source
SHA-256 checksum
How to use checksums
027d91c0ddd2343d2b5d44aee0dbe42a1edb6d9a490870a8f86a741517a697d6
BLAKE2b-256 checksum
How to use checksums
f972746f2679800541e66e8950838c18a0eeb0d835a28447f6a116c8c66659b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / processing-0.52.win32-py2.4.exe

Download URL processing-0.52.win32-py2.4.exe
Size 189.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4818d99c24472421fc026ef66dbd8f9b3b991200ba77950f350a9910b6b1c840
BLAKE2b-256 checksum
How to use checksums
a7ebd505d4680fd925e363128ba7b8ea348a0b9a6f250477144ff1c38e3045b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.52 This release

3 release files

0.51

3 release files

0.50

3 release files

0.40

3 release files

0.39

3 release files

0.38

3 release files

0.37

3 release files

0.36

3 release files

0.35

3 release files

0.34

3 release files

0.33

3 release files

0.32

3 release files

0.31

3 release files

0.30

3 release files

0.21

3 release files

0.20

3 release files

0.11

1 release file

0.10

1 release file

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