Pyllelize
Easily parallelize your Python functions with pyllelize. Whether you're dealing with CPU-bound tasks or I/O-bound asynchronous functions, pyllelize offers a simple interface to distribute your workload efficiently.
Key Features
-
Thread-based Parallelization: Distribute CPU-bound tasks across multiple threads with ease.
-
Process-based Parallelization: Harness the full power of multi-core processors by distributing tasks across separate processes, bypassing Python's Global Interpreter Lock.
-
Asynchronous Execution: Seamlessly parallelize I/O-bound asynchronous tasks.
-
Error Handling: Safely capture and report errors without halting the execution of other tasks.
Installation
pip install pyllelize
Quick Start
Thread-based Execution
from pyllelize import parallel_execute_threads
def multiply(a, b):
return a * b
arguments = [(1, 2), (3, 4), (5, 6)]
results = parallel_execute_threads(multiply, arguments)
print(results) # Possible output: [2, 12, 30]
Process-based Execution
from pyllelize import parallel_execute_processes
def add(a, b):
return a + b
arguments = [(1, 2), (3, 4), (5, 6)]
results = parallel_execute_processes(add, arguments)
print(results) # Possible output: [3, 7, 11]
Asynchronous Execution
import asyncio
from pyllelize import parallel_execute_threads_async
async def fetch_data(a, b):
await asyncio.sleep(1) # Simulating async I/O operation
return a + b
arguments = [(1, 2), (3, 4), (5, 6)]
results = parallel_execute_threads_async(fetch_data, arguments)
print(results) # Possible output after 1 second: [3, 7, 11]
License
This project is licensed under the MIT License.
Metadata
Release files for pyllelize 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyllelize-0.2.1.tar.gz | 2.7 kB | Without provenance | Details for pyllelize-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyllelize-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for pyllelize-0.2.1-py3-none-any.whl |
Total release size: 6.8 kB
Release files / pyllelize-0.2.1.tar.gz
| Download URL | pyllelize-0.2.1.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e187dd640e5403d7cd72f2db5edd4fa691dfc46427b57448fa97d2bdd24b1695
|
|
BLAKE2b-256 checksum How to use checksums |
51e459ab871b65997697d5ef6782f46c782efef3c3ce0de12a7de1d8bc46a4ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.6.1 CPython/3.9.18 Linux/6.2.0-1014-azure
|
Release files / pyllelize-0.2.1-py3-none-any.whl
| Download URL | pyllelize-0.2.1-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b1ccea3b4a1d97f8d86f3e5eadeccdec954096d43cf74ec3e0bbd0291a9ac73a
|
|
BLAKE2b-256 checksum How to use checksums |
bc15f44ab477dfd8576ecde5108018e41e4d1186a29277c4d224fec867305d40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.6.1 CPython/3.9.18 Linux/6.2.0-1014-azure
|
Security for pyllelize 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.