ANN: Amara XML Toolkit 1.2.0.1

2007-01-06 Thread Uche Ogbuji
Amara 1.2 was released to Cheeseshop New Year's Eve, but in all the
festivities and travel I forgot the announcements.  Just as well because
I'd forgotten to include a minor fix, and so here is 1.2.0.1.

http://uche.ogbuji.net/tech/4suite/amara
http://cheeseshop.python.org/pypi/Amara/
ftp://ftp.4suite.org/pub/Amara/

Changes since Amara 1.1.9:

* Add omit_nodetype_rule bindery rule
* Add force_nsdecls parameter to bindery node xml() method
* 4Suite 1.0 compatibility (requires 4Suite 1.0.2, in fact)
* Add support for attribute patterns to pushdom/pushbind
* Add experimental (not very reliable) xml_xslt() method to bindery object
  to apply transforms
* Improvements to trimxml command line
* Turn off DTD validation by default
* Add support for DTD validation  custom binding classes to convenience APIs
* Add custom binding demo
* Updates to the manual
* Bug fixes

Amara XML Toolkit is a collection of Python tools for XML processing--
not just tools that happen to be written in Python, but tools built from
the ground up to use Python's conventions and take advantage of the many
advantages of the language.

Amara builds on 4Suite [http://4Suite.org], but whereas 4Suite offers
more on literal implementation of XML standards in Python, Amara
focuses on Pythonic idiom.  It provides tools you can trust to conform
with XML standards without losing the familiar Python feel.

The components of Amara are:

* Bindery: data binding tool (a very Pythonic XML API)
* Scimitar: implementation of the ISO Schematron schema language for
XML; converts Schematron files to Python scripts
* domtools: set of tools to augment Python DOMs
* saxtools: set of tools to make SAX easier to use in Python
* Flextyper: user-defined datatypes in Python for XML processing

There's a lot in Amara, but here are highlights:

Amara Bindery: XML as easy as py


Bindery reads an XML document and it returns a data structure of
Python objects corresponding to the vocabulary used in the XML document,
for maximum clarity.

Bindery turns the document

monty
  python spam=eggsWhat do you mean bleh/python
  python ministry=abuseBut I was looking for argument/python
/monty

Would become a set of objects so that you could write

binding.monty.python.spam

In order to get the value eggs (as a Python Unicode object) or 

binding.monty.python[1]

In order to get the element object with the contents But I was looking for 
argument. 

There are other such tools for Python, and what makes Bindery unique is
that it's driven by a very declarative rules-based system for binding
XML to the Python data.  You can register rules that are triggered by
XPattern expressions specialized binding behavior.  It includes XPath
support and is very efficient, using SAX to generate bindings.

See the user documentation, manual.html, for more details.

Scimitar: exceptional schema language for an exceptional programming language
-

Scimitar is an implementation of ISO Schematron that compiles a Schematron
schema into a Python validator script.  You typically use scimitar in two
phases.  Say you have a schematron schema schema1.stron and you want to
validate multiple XML files against it, instance1.xml, instance2.xml,
instance3.xml.

First you run schema1.stron through the scimitar compiler script,
scimitar.py:

scimitar.py schema1.stron

A file, schema1-stron.py, is generated in the current working directory.
If you'd prefer a different location or file name, use the -o option.
The generated file is a validator script in Python.  It checks the
schematron rules specified in schema1.stron.

Run this validator on each XML file you wish to validate:

python schema1.py instance1.xml

The validation report is generated on standard output by default, or you
can use the -o option to redirect it to a file.

The validation report is an XML external parsed entity, a format much like
a well-formed XML document, but with some restrictions relaxed.

Amara DOM Tools: giving DOM a more Pythonic face


Amara DOM Tools features pushdom, similar to xml.dom.pulldom, but easier
to use, and a function to return an XPath location for any DOM node.

Amara SAX Tools: SAX without the brain explosion


Tenorsax (amara.saxtools.tenorsax) is a framework for linerarizing SAX logic
so it flows a bit more naturally, needing much less state machine wizardry.

License
---

Amara is open source, provided under the 4Suite variant of the Apache
license.  See the file COPYING for details.

Installation


Amara requires Python 2.4 or more recent and 4Suite-XML 1.0 or more
recent.  The easiest way to install it is:

easy_install amara

If this does not work you are probably not set up for easy_install and I
suggest you follow the simple instructions at


FlightFeather Social Networking Platform, Release 0.2.6

2007-01-06 Thread George Belotsky
FlightFeather's goal is social networking for everyone.  This means
that *anyone* should have a chance to run a *popular* social
networking site -- on minimal hardware, and without wasting bandwidth.

Release 0.2.6 fixes a bug, which could cause the FlightFeather server
to hang if excessively long words appeared in posts or comments.  You
can download this release (free/open source under the GPL) from the
BoSStats site, which runs on FlightFeather.

 http://www.bosstats.com/flightfeather.html


A Brief Overview of FlightFeather and BoSStats
--
FlightFeather is in its early stages, but it is functional.  You can
see the system in action on the BoSStats site.  BoSStats is
dedicated to improving the world of work: you can discuss what makes a
good boss, or share your experiences of office politics. You can also
comment and vote on the posts made by others.  The application does
not set cookies, and no registration is required for anything except
voting.


 http://www.bosstats.com/


BoSStats is a good testbed for FlightFeather, and has value of its
own, since meaningful advice about work-related problems is very hard
to find.  A Wisdom of Crowds solution -- particularly with strong
privacy protection (see below) -- is a necessary addition to this
field.

FlightFeather's most important feature is that all write requests
generate (or modify) HTML files.  In consequence, a pure read (the
most common operation) merely serves static pages.

The major design focus for FlightFeather are responsiveness and
performance; the system should eventually support very high traffic
volumes.  In addition, FlightFeather allows for a great deal of user
privacy -- a critical, rapidly emerging problem in the social
networking realm.
-- 
http://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations.html


ANN: webstring 0.5 [correction]

2007-01-06 Thread L. C. Rees
[correction: CheeseShop URL pointed to the incorrect package]

webstring is a template engine for programmers whose favorite template
language is Python. webstring can be used to generate any text output
with the additional advantages of advanced XML and HTML templating
using the lxml and cElementTree libraries. webstring includes a
TurboGears/Buffet template API compatible plugin and support for using
webstring as WSGI middleware.

This release of webstring replaces the standalone packages webstring,
lwebstring, TurboWebstring, and LturboWebstring.

 webstring was designed to meet the following goals:

   1. To separate model and view logic from controller logic.
   2. To separate template logic from template data.
   3. To require only Python for templating.
   4. To use Python syntax, idiom, and patterns.
   5. To play well with other Python software.

webstring's XML and HTML templating was designed to meet the following
goals:

   1. To use XML as a data format, not a programming language.
   2. To use existing XML formats.
   3. To hide the parts of an XML document that are not being used.
   4. To use the best Python XML libraries.
   5. To bridge HTML and XML.

webstring can be downloaded from its Python CheeseShop page at:

http://cheeseshop.python.org/pypi/webstring/

or installed using setuptools' easy_install:

easy_install webstring

More information on webstring including documentation and an
introduction is available at:

http://psilib.sourceforge.net/webstring.html

An introduction to webstring's plaintext templating is available at:

http://psilib.sourceforge.net/text.html

Highlights of the 0.5 release include:

- templating support for non-XML text formats
- the ability to use lxml as the XML processing library for XML
templates
- the inclusion of a TurboGears/Buffet compatible template plug-in
- XInclude support (using lxml as the XML processing library)
- can apply XSLT stylesheets to any part of an XML template using the
transform method (using lxml as the XML processing library)
- the replication operator (*) now repeats the current state of a
template instead of the default state
- the order in which XML elements are concatenated (+) with other XML
elements is now preserved
- decorators for WSGI templating middleware
- cElementTree and lxml-based XML templates pickle and unpickle properly

-- 
http://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations.html