API and Code

Below is the API documention for the the Stetl Python code.

Main Entry Points

There are several entry points through which Stetl can be called. The most common is to use the commandline script bin/stetl. This command should be available after doing an install.

In some contexts like integrations you may want to call Stetl via Python. The entries are then.

Core Framework

The core framework is directly under the directory src/stetl. Below are the main seven classes. Their interrelation is as follows:

One or more stetl.chain.Chain objects are built from a Stetl ETL configuration via the stetl.factory.Factory class. A stetl.chain.Chain consists of a set of connected stetl.component.Component objects. A stetl.component.Component is either an stetl.input.Input, an stetl.output.Output or a stetl.filter.Filter. Data and status flows as stetl.packet.Packet objects from an stetl.input.Input via zero or more stetl.filter.Filter objects to a final stetl.output.Output.

As a trivial example: an stetl.input.Input could be an XML file, a stetl.filter.Filter could represent an XSLT file and an stetl.output.Output a PostGIS database. This is effected by specialized classes in the subpackages inputs, filters, and outputs. New in 1.1.0: stetl.Splitter to split data to multiple Outputs and stetl.Merger to combine multiple Inputs.

Components: Inputs

Components: Filters

Components: Outputs