[docs] rewriting the tutorial.

This commit is contained in:
Romain Dorgueil
2018-01-14 14:25:42 +01:00
parent 8900c567d9
commit c311b05a42
19 changed files with 207 additions and 534 deletions

View File

@ -233,22 +233,16 @@ bonobo send the data to your transformation.
.. code-block:: python
from bonobo.constants import BEGIN, END
from bonobo.execution import NodeExecutionContext
with NodeExecutionContext(
JsonWriter(filename), services={'fs': ...}
) as context:
# Write a list of rows, including BEGIN/END control messages.
context.write(
BEGIN,
Bag({'foo': 'bar'}),
Bag({'foo': 'baz'}),
END
context.write_sync(
{'foo': 'bar'},
{'foo': 'baz'},
)
# Out of the bonobo main loop, we need to call `step` explicitely.
context.step()
context.step()
.. include:: _next.rst