parallelize
parallelize is a Python package to simplify the process of parallelising your taks in Python. It takes advantage of the multiprocessing module to spawn new processes for your job.
Requirements
- Python 3.X
Installation
To install parallelize, you can either install from the source code or using pip.
To install from source code, first clone the repository. Then, run python setup.py install in the root directory.
Documentation
To build the documentation, run make html inside the docs/ folder. The documention will be found in the docs/build/html directory. Alternatively, view documentation here.
Usage
To parallelise a task in Python, you should wrap the entire code inside a function and have the first argument of your function receive the iterable your function will be operating over.
>>> from parallelize import parallelize
>>> def foo(iterable: list) -> int:
... output = 0
... for i in iterable:
... output = i**4
... return output
>>> numbers = list(range(50000000))
>>> %time foo(numbers)
Wall time: 21.5 s
>>> parallelize.parallel(foo, numbers, 6)
Completed 'parallel' in 6.2743 secs
Metadata
Release files for pyparallelize 0.1.0
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 |
|---|---|---|---|---|
| pyparallelize-0.1.0.tar.gz | 4.4 kB | Without provenance | Details for pyparallelize-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyparallelize-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pyparallelize-0.1.0-py3-none-any.whl |
Total release size: 9.6 kB
Release files / pyparallelize-0.1.0.tar.gz
| Download URL | pyparallelize-0.1.0.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5a2e4195fde08af9de89511516bce3d7193d16c78388a1eed8b6f6c85e5929e1
|
|
BLAKE2b-256 checksum How to use checksums |
53561abfc63f78719372103619f51b8269513294a4bcb54b2726b6281e718848
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.25.0 CPython/3.6.5
|
Release files / pyparallelize-0.1.0-py3-none-any.whl
| Download URL | pyparallelize-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2d5502f587a9b1d3bbd629626a5db0312189a835c0667c5345c003dfdbd6ae70
|
|
BLAKE2b-256 checksum How to use checksums |
cdb51fb39428fade37089774b96dd4cd03d23bdeefdae460f9b29a88ce095014
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.25.0 CPython/3.6.5
|
Security for pyparallelize 0.1.0
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.