Examples

There are a few examples bundled with bonobo.

You’ll find them under the bonobo.examples package, and you can run them directly as modules:

$ bonobo run -m bonobo.examples.module

or

$ python -m bonobo.examples.module

Datasets

The bonobo.examples.datasets package contains examples that generates datasets locally for other examples to use. As of today, we commit the content of those datasets to git, even if that may be a bad idea, so all the examples are easily runnable. Later, we’ll see if we favor a “missing dependency exception” approach.

Coffeeshops

get_graph(graph=None, *, _limit=(), _print=())[source]

Extracts a list of cafes with on euro in Paris, renames the name, address and zipcode fields, reorders the fields and formats to json and csv files.

Fablabs

Extracts a list of fablabs in the world, restricted to the ones in france, then format its both for a nice console output and a flat txt file.

digraph { rankdir = LR; stylesheet = "../_static/graphs.css"; BEGIN [shape="point"]; BEGIN -> "ODS()" -> "normalize" -> "filter_france" -> "Tee()" -> "JsonWriter()"; }

get_graph(graph=None, *, _limit=(), _print=())[source]
normalize(row)[source]

Types

Strings

Example on how to use symple python strings to communicate between transformations.

digraph { rankdir = LR; stylesheet = "../_static/graphs.css"; BEGIN [shape="point"]; BEGIN -> "extract()" -> "transform(s: str)" -> "load(s: str)"; }

extract()[source]
transform(s)[source]
load(s)[source]

Dicts

Bags

Utils

Count