• Stars
    star
    149
  • Rank 248,619 (Top 5 %)
  • Language
    Python
  • License
    BSD 3-Clause "New...
  • Created over 13 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Little process-based workers to do your bidding.

littleworkers

Little process-based workers to do your bidding.

Deliberately minimalist, you provide the number of workers to use & a list of commands (to be executed at the shell) & littleworkers will eat through the list as fast as it can.

Why littleworkers?

littleworkers shines when you just want to parallelize something without a lot of fuss & when you care more about the data/commands to be run.

  • Tiny source
  • Easy to queue a set of actions
  • Works with any runnable commands
  • Uses processes
  • Non-blocking

Seriously, it's not a replacement for threading or multiprocessing if your application needs to share a ton of data with the children.

Usage

Usage is trivial:

from littleworkers import Pool

# Define your commands.
commands = [
    'ls -al',
    'cd /tmp && mkdir foo',
    'date',
    'echo "Hello There."',
    'sleep 2 && echo "Done."'
]

# Setup a pool. Since I have two cores, I'll use two workers.
lil = Pool(workers=2)

# Run!
lil.run(commands)

For more advanced uses, please see the API documentation.

Requirements

  • Python 2.6+
author:Daniel Lindsley
updated:2011/11/10
version:0.3.1
license:BSD

More Repositories

1

restless

A lightweight REST miniframework for Python.
Python
831
star
2

itty

The itty-bitty Python web framework.
Python
409
star
3

shell

A better way to run shell commands in Python.
Python
161
star
4

guide-to-testing-in-django

The example project for adding tests.
Python
146
star
5

microsearch

A small search library.
Python
108
star
6

pylev

A pure Python Levenshtein implementation that's not freaking GPL'd.
Python
97
star
7

django-budget

A personal budgeting application for use with Django.
JavaScript
48
star
8

multiresponse

A Python class for Django that allows a request to provide content-type aware responses.
Python
45
star
9

friendlydb

A small & fast following/followers database written in Python.
Python
41
star
10

lua-base64

Another base64 implementation.
Lua
35
star
11

quads

A pure Python Quadtree implementation
Python
31
star
12

django-rsvp

A simple RSVP app.
Python
31
star
13

wsgi_longpolling

Supporting materials for my blog post on WSGI long-polling apps with gevent.
Python
30
star
14

toastbot

A clean, extensible IRC bot using Python & gevent.
Python
30
star
15

definite

Simple finite state machines.
Python
28
star
16

alligator

Simple offline task queues. For Python.
Python
27
star
17

bitty

A tiny storage layer. (v0.4) Serious Python Programmersâ„¢ with Enterprise Requirements need not apply.
Python
26
star
18

pyskip

A pure Python skiplist implementation. For fun.
Python
23
star
19

feedme

A better (for me) RSS aggregator. Collects numerous RSS feeds and displays entries in chronological order. Similar to the "planet" concept.
Ruby
20
star
20

django-superflatpages

A capable, database-backed flatpages implementation.
Python
19
star
21

rose

A small library for keeping your version up-to-date easily & everywhere.
Python
19
star
22

deployable

A simple system for repeatable deploys. Language-agnostic, easy to use yet extensible, and above all, repeatable.
Python
18
star
23

piecrust

DEAD PROJECT - A REST layer for all Python applications
Python
16
star
24

sockless

A friendlier interface to `socket`.
Python
14
star
25

migrate_doctest_to_unittest

"In Django-land, unittests are much faster than doctests. Convert them."
Python
14
star
26

nanosearch

A tiny search engine.
JavaScript
13
star
27

boto3

**EXPERIMENTAL** Evolution of boto. Supports Py2/3.
Python
10
star
28

itty3

The itty-bitty Python web framework... **Now Rewritten For Python 3!**
Python
10
star
29

django-microapi

A tiny library to make writing CBV-based APIs easier in Django.
Python
8
star
30

todone

Todo lists done my way.
8
star
31

chrono

A (BSD licensed) context manager for timing execution.
Python
8
star
32

steamstalker

A Django pluggable app for stalking your Steam friends' activity.
JavaScript
8
star
33

pubsubittyhub

PubSubHubbub via webhooks. Mostly a port of watercoolr.
Python
8
star
34

dashbot

A node.js-powered IRC bot for the Django Dash.
JavaScript
7
star
35

colloquy_to_textual

Converts logs from Colloquy (XML) to Textual (plain text)
Python
6
star
36

dotfiles

Mah dotfiles + installer.
Shell
6
star
37

mathpractice

Math practice (for the kiddos)
Python
5
star
38

solidrocket

A fun little experimental datastore. Not interesting yet.
Lua
5
star
39

whisper

A toy micro-blog built on Node.js & Postgres.
JavaScript
5
star
40

localtable

A thin database-like wrapper over `window.localStorage`.
JavaScript
4
star
41

domicile

Programmatic creation of DOM elements. Vaguely similar to React's DOM bits.
JavaScript
4
star
42

euler

Project Euler (projecteuler.net) problems
Python
3
star
43

markov

A simple Markov chain generator done purely for fun.
Python
3
star
44

edgy

More NIH
3
star
45

filtering

Probably not useful to you.
Python
2
star
46

lilrocket

A Solr-alike for Whoosh.
Python
2
star
47

django-dashboard

Python
2
star
48

LAAS

It's Levenshtein-As-A-Service. You know, for the lulz.
Python
2
star
49

sciencemuseum

Nat + Simon's entry for the Science Museum's API competition
Python
2
star
50

goplayground

Experiments with Go.
Go
2
star
51

createproject

For creating new Python packages.
Python
2
star
52

django-dash

The code that powers the Django Dash.
Python
2
star
53

carrierpigeon

Contract-based messages.
Python
1
star
54

eliteracing

The source for the Elite Racing Federation website (edracers.com)
Python
1
star
55

GIS-Day

Hosted at KU
1
star
56

electronicinmyears

The Electronic In My Ears (Recommendations)
1
star
57

mistertest

You don't care about this.
Python
1
star
58

the-march-to-3

Python
1
star
59

bobbyblog

Python
1
star