Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install sprout

How to install Sprout

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install sprout
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
1.0.4
1.1.1Never BuiltWhy not?
1.0.4 Available View build log
1.0.3 Available View build log
Windows (64-bit)
1.0.4
1.1.1Never BuiltWhy not?
1.0.4 Available View build log
1.0.3 Available View build log
Mac OS X (10.5+)
1.0.4
1.1.1Never BuiltWhy not?
1.0.4 Available View build log
1.0.3 Available View build log
Linux (32-bit)
1.0.5
1.1.1Never BuiltWhy not?
1.0.5 Available View build log
1.0.4 Available View build log
1.0.3 Available View build log
Linux (64-bit)
1.1.1 Available View build log
1.0.5 Available View build log
1.0.4 Available View build log
1.0.3 Available View build log
 
License
BSD, GPL and PythonLicence
Lastest release
version 1.1.1 on Jan 9th, 2014

This is a common Python library which contains reusable components, developed at Infrae.

Sprout, while mainly XML related, does not have a functional goal as such. Its goals instead are organizational:

  • Enable code reuse between projects, such as Silva and Infrae's topicmaps implementation
  • Allow us to write modern, pure Python code without external dependencies -- it only depends on the Python standard library.
  • Allow us to write solid code, covered by a large unit test suite. The lack of external dependencies and focus on modern code makes this easier.

While Sprout's aim is mainly for use within Infrae at present, the code inside should be general enough for use in your own projects as well.

Sprout's focus is mainly currently XML related. It features:

  • sprout.saxext, a library to make writing SAX-based code more easy.
  • htmlsubset, a system to easily create HTML-ish subsets that are secure and robust to wrong user input.

Code repository

The code for this extension can be found in Mercurial: https://hg.infrae.com/Sprout

Changes

1.1.1 (23/05/2013)
  • Improve sprout.saxext xmlimport getData and clearData that wipe all data associated with the importer in one pass.
1.1 (05/03/2013)

Improve sprout.saxext xmlimport and xmlexport classes:

  • To make available user-defined options to the handlers. Those options have to be defined with the help of registerOption before being usuable.
  • To support work on temporary files and already opened files. This is more efficient on large import and export, and prevent to create large StringIO objects.

Every piece of code using those classes will need to be updated to work with this new version.

1.0.5 (03/09/2012)
  • Add two misisng methods for prefix mapping on the handler, in order to follow the SAX handler.
  • The xmlexport handler takes now arguments and keyword arguments that it passes along to child handlers.
1.0.4 (07/11/2011)
  • Add a missing method characters to xmlexport handler, in order to follow the SAX protocol.
1.0.3 (15/07/2010)
  • Remove deprecated silvasubset,
  • Add support to register producers with adapters,
  • saxify as now a validate option to verify the validity of the incoming XML to work on before doing anything,
  • Update and clean tests.
1.0.2 (03/11/2009)
  • Fix thread safety in xml importer.
1.0.1 (05/10/2009)
  • Use builtin set instead of the deprecated sets module (when available).
1.0 (25/09/2008)
  • Package extension as an egg.
0.9
  • When title attributes are added to <a> tags, they are now recognized but nothing is done with them. Previously, the presence of a 'title' attribute corrupted the link.
0.8
  • no changes logged.
0.7
  • Added support for hex entities (e.g. &#xa0; for a non-breaking space) to html2sax.
  • Added support for limiting HTML, taking safe, well-formed snippets out of larger HTML strings. Can deal with HTML that is not well-formed.
0.6.2
  • set sprout up as a Python package in a much simpler, and less wrong way.
0.6.1
  • sax2html handles empty attributes in HTML now, so that <option selected> gets turned into <option selected="selected">.
0.6
  • in Silva subset, accept nested <b>, <i> and <a href=""> in those.
  • Allow optional filtering handler that events get passed through before import happens.
0.5.1
  • In silva subset, treat \n as <br>.
  • In html2sax, we're now making sure that any tags that cannot be singletons in HTML are kept open, by adding an extra space character event.
0.5
  • Initial public release.

Subscribe to package updates

Last updated Jan 9th, 2014

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.