This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
python-propeller
================

Pretty progress and load indicators.

Installation:

pip install python-propeller

$ python
>>> from propeller import demo, propeller
>>> demo()

Usage as spinner:

with propeller("spinning propeller") as p:
# do something
p.spin()

# do more
p.spin()

# print to console
p.println("without messing up the spinner")

# replace "spinning propeller"
p.msg("spinner")

...


Usage with progress indicator:

with propeller("progress propeller") as p:
n = 1000
for i in range(n):
# do something
p.progress(i, n)


Process a collections:

def preprocessor(item):
# preprocess

def finalizer(item):
# finalize

pre_processed = propeller("preprocessing").map(preprocess, in_list)
propeller("finalizing").process(finalizer, pre_processed)


If the length of your collections can be determined, a progress bar will be
displayed. If iterables are given, a spinner will be displayed. If you know
the size of your iterables, you can explicitly specify it with the `n`
keyword argument:

def doit(item):
# work

propeller().process(doit, a_iterable, b_iterable, n=42)


`python-propeller` uses threading and needs to be ended cleanly. This can be
done by using `process`, `map` or `imap` functions, using the `with` statement
or explicitly calling the `end` method when you are finished.

p = propeller()
try:
# do something
finally:
p.end()


Various measurements are optional:

with propeller(eta=False, ops=False, eta=False, percent=False) as plain_p:
plain_p.spin()


Customization
-------------

The classic propeller can be made like so:

from time import sleep

def noop(item):
sleep(0.01)

propeller(spinner="|/-\\").process(noop, iter(range(300)))


But this is also one of the many preconfigured styles:

propeller(spinner='lines').process(noop, iter(range(300)))


With progress bars the first character of the string is used for the unfilled
portion of the bar and the last character for the filled portion:

propeller(bar=' -+=').process(noop, range(300))

# produces something like this:
========- [ops: 99][eta: 2s][23%]


Included styles for both spinners and progress bars:

`shades` ┄░▒▓█ (default)
`hbar` ▁▂▃▄▅▆▇█
`vbar` ▏▎▍▌▋▊▉█
`dots` ⠀⠁⠃⠇⡇⣇⣧⣷⣿

# print all spinner and progress bar styles
from propeller import print_styles
print_styles()
Release History

Release History

0.2.6

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
python-propeller-0.2.6.tar.gz (6.0 kB) Copy SHA256 Checksum SHA256 Source Jul 4, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting