Help Page
Any time the code or inputs on a utility get changed, a new revision is created.
If you don't specify a revision when editing or running a utility, the latest revision
is used. Changing the description or writeup won't create a new revision.
You can view a list of revisions and compare revisions on the utilities' revisions page.
A sample revision page
Comparing two revisions
Every utility has a RESTful XML and JSON API for your pleasure. You can also
get a listing of all of the utilities.
Learn more about the API
You can import any library included with Python 2.5 for Linux.
Additionally for your programming pleasure you also have these third party libraries available for use in your
utilities:
- BeautifulSoup
-
Beautiful Soup(Home/Documentation)
is a Python HTML/XML parser designed for quick turnaround projects like screen-scraping.
Most importantly it won't choke if you give it bad markup.
- Crypto (Python Cryptography Toolkit) and ezPyCrypto
-
The Python Cryptography Toolkit(Home/Documentation) is a collection of cryptographic algorithms and protocols,
implemented for use from Python.
ezPyCrypto(Home/Documentation) is a wrapper around Crypto which makes
its more common functions MUCH easier to use.
- dateutil
-
The dateutil module(Home/Documentation)
provides powerful extensions to the standard datetime module such as generic parsing of dates in almost any string format,
and relative time deltas for units such as weeks and months.
- PyFacebook
-
PyFacebook(Home/Documentation) is
a thin wrapper for accessing Facebook's RESTful API through Python.
- Universal Feed Parser
-
Parse RSS and Atom feeds in Python.(Home/Documentation)
- GData Python Client Library
-
The Google data Python Client Library(Home/Documentation)
provides a library and source code that make it easy to access data through Google Data APIs.
- NumPy
-
NumPy(Home/Documentation)
includes a powerful N-dimensional array object, basic linear algebra functions,
basic Fourier transforms, and more.
- PIL (Python Imaging Library)
-
The Python Imaging Library(Home/Documentation) adds image processing
capabilities to your Python interpreter. This library supports many file formats, and provides powerful image processing
and graphics capabilities.
- pyExcelerator
-
Generate Excel files directly from Python.
Home/Documentation
A Useful Example
- Pyparsing
-
The Pyparsing module(Home/Documentation) is an alternative approach
to creating and executing simple grammars, vs. the traditional lex/yacc approach, or the use of regular expressions.
The pyparsing module provides a library of classes that client code uses to construct the grammar directly in Python code.
- pyPdf
-
pyPdf(Home/Documentation)
is a is a PDF toolkit capable of extracting document information (title, author, ...), splitting documents page by page,
merging documents page by page, cropping pages, merging multiple pages into a single page, and
encrypting and decrypting PDF files. Also see the Reportlab library for PDF generation.
- PyRSS2Gen
-
Beautiful Soup(Home/Documentation)
is a Python HTML/XML parser designed for quick turnaround projects like screen-scraping.
Most importantly it won't choke if you give it bad markup.
- ReportLab (PDF Generation)
-
The ReportLab PDF library(Home/Documentation) is a
proven industry-strength PDF generating solution, that you can use for meeting your requirements and deadlines
in enterprise reporting systems.
- Reverend Bayesian Classifier,
-
Reverend(Home/Documentation) is a general purpose Bayesian classifier,
Use the Reverend to quickly add Bayesian smarts to your app. Bayesian fun has never been so quick and easy.
- SciPy
-
Scientific, statistical, and machine learning functions for use in Python.
(Home/Documentation)
- simplejson
-
simplejson(Home/Documentation) is a simple,
fast, extensible JSON encoder/decoder for Python.
- Python Excel Tools: xlrd, xlwt, xlutils
-
These tools (Home/Documentation) let you read,
write, and manipulate Excel files. They're a huge improvement over pyExcelerator.
- PyYAML
-
PyYAML(Home/Documentation)
is a YAML parser and emitter for the Python programming language.
- Biopython
-
Biopython(Home/Documentation)
is a set of freely available tools for biological computation written in Python.
- How do I make a utility output a file such as an image or a spreadsheet?
-
Normally all of the printed output from a utility will end up in the output text area on the
utility's page. To return a file instead, simply make your first print statement provide a
content type. For example to return a PNG image file, the first print statement
run in your utility should be:
print 'Content-Type: image/PNG'
All of your print statements after that would make up the contents of that image.
If it's still not clear, here is a working example of a utility that outputs an image file.
- What file formats can I return?
-
Anything you want!
Here's a handy list of common content/MIME types.
- What if my utility needs to store a static file?
-
Sometimes a utility will need to access a static file to do its work. For example the
keyboard heatmap utility
needs an image of a keyboard which it can mark up with the heat map data.
The way to do this is to store the file right in your code. Use this
utility to get the code for your file and follow the instructions on that page to use
the encoded file in your code. (I don't recommend doing this for a file larger than say 500KB.)
- I have an idea for a utility but I don't want to program
-
You can request a utility here.
- I want to make a utility but I don't have any ideas
-
You see requested a utilities here.
- How can I suggest changes to the site or view planned changes?
-
You can view and vote on Utility Mill enhancements here.
- How does the Python code get executed safely?
-
This is by far the most popular question. Running Python code somewhat securely is no easy feat.
Here are some more resources on this topic
if you're curious.
Here is the basic idea for security on Utility Mill:
I have a Python daemon that maintains N child processes.
Each child process runs in a chroot jail and executes the Python code sent to it.
If a child process hits an error, runs too long, or uses too much memory the daemon will kill it and start a new child process to replace it.
The website code (web.py stuff, etc) sends code to be executed to the daemon over a socket and gets back the printed result, or an error message.
The current limitations on utilities are 2 real seconds of run time, and a memory limit of 28MB (including the interpreter session).
I'm considering offering premium accounts with higher limits to offset the cost. Email me if you're interested in purchasing one.
If I hear from over 20 people I'll definately do it.
Of course I'm no security expert, so I'm still waiting for someone to find a hole in the design :-)
Best to email me privately
if you find one.
- Have a frequently asked question?
-
If so, kindly Ask me.