Skip to main content

Acinonyx

Asinoyx is a package which can simplify your multiprocessing implementation, also you can easily watch the progress of multiprocessing execution.

Usage

A simple sample:

import time
from random import random
from acinonyx import run

def log(val):
    time.sleep(random())
    return val

values = range(100)
print(run(log, values))

It will run with cpu_count processes and print progress bar, output is below:

1%|█       | 1/100 [00:01<00:40,  2.29it/s]
26%|██       | 26/100 [00:01<00:32,  21.29it/s]
100%|██████████| 100/100 [00:03<00:00, 26.86it/s]
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ..., 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99]

Also you can use multiple args:

import time
from random import random
from acinonyx import run

def add(a, b):
    time.sleep(random())
    return a + b

if __name__ == '__main__':
    values = [(i, i) for i in range(100)]
    print(run(add, values))

Also you can use it in other scenario such as web spider:

import requests
from random import random
import time
from acinonyx import irun

def fetch():
    delay = random()
    url = 'https://httpbin.org/uuid'
    time.sleep(delay)
    return requests.get(url).json().get('uuid')

if __name__ == '__main__':
    for result in irun(fetch, range(10), ordered=False):
        print(result)

Trouble Shooting

NSPlaceholderDate initialize error

objc[67206]: +[__NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called

Try to set env before execute script:

export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES

Metadata

Release files for acinonyx 0.1.0

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

Source distribution (sdist)

Source distribution for acinonyx 0.1.0
File Size Uploaded Provenance Actions
acinonyx-0.1.0.tar.gz 3.8 kB Without provenance Details for acinonyx-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for acinonyx 0.1.0
File Interpreter ABI Platform Actions
acinonyx-0.1.0-py2.py3-none-any.whl Python 3, Python 2 none any Details for acinonyx-0.1.0-py2.py3-none-any.whl

Total release size: 7.2 kB

Release files / acinonyx-0.1.0.tar.gz

Download URL acinonyx-0.1.0.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
07be7398ba9575316f02bce6620f5dd98c141a11bc2f0823d123a588d55dd66f
BLAKE2b-256 checksum
How to use checksums
581ccf0916aabc9d3736d8407ae3b85420d0b6de4f1e666783ad2339e78da219
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.3

Release files / acinonyx-0.1.0-py2.py3-none-any.whl

Download URL acinonyx-0.1.0-py2.py3-none-any.whl
Size 3.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
d1c4809720c51e34f59df041212cebc10308efe555e92c04c92bc721992c2ed8
BLAKE2b-256 checksum
How to use checksums
51f15d433d2f0d548dd210abcf9d3d0009b966c6d7480133e0bac5b396bc8b8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.3

Security for acinonyx 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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