Skip to main content

Parallel function excutor interface

Project description

A simple interface of excuting python functions or shell commands parallelly

import os
from simpletaskrun import Runner

def task(cmd):
  #execute shell command and python code
  os.system(cmd)
  print('%s has been echoed' % cmd.split(' ')[-1])
	
# 10 is the max task num in same time
runner = Runner(10)
for i in range(100):
  cmd = 'echo %s' % i
  runner.add(task, [cmd])

runner.clear()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simpletaskrun-0.0.3.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simpletaskrun-0.0.3-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file simpletaskrun-0.0.3.tar.gz.

File metadata

  • Download URL: simpletaskrun-0.0.3.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.1

File hashes

Hashes for simpletaskrun-0.0.3.tar.gz
Algorithm Hash digest
SHA256 5f0166cbeaef5727ed140431fcbecdbfdc9ced450d2d18e9a2f1d0c260219ebd
MD5 27c25b1764de74e0935582993ff6c4d3
BLAKE2b-256 f44f60bf648493ed1c67cd8321c6cc228dd0ef6f053d87a58c038ef473627145

See more details on using hashes here.

File details

Details for the file simpletaskrun-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: simpletaskrun-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.1

File hashes

Hashes for simpletaskrun-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 900fd83bec3b891908f8a54f0a1f4d20b46edaab47eaf6b597e8633831b73271
MD5 4dd3f3e8183399cbfacbb4c37903405d
BLAKE2b-256 488aafa9625754284a7260bc99bd7d127c7554f344539ad4dd54f00c2557105c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page