[docs] More documentation rewriting.

This commit is contained in:
Romain Dorgueil
2018-01-14 16:11:49 +01:00
parent 9af5d80171
commit e998f9c989
17 changed files with 132 additions and 99 deletions

View File

@ -0,0 +1,9 @@
.. warning::
This extension is currently **ALPHA**.
Things will change, break, not work as expected, and the documentation is lacking some serious work.
This section is here to give a brief overview but is neither complete nor definitive.
You've been warned.

5
docs/extension/_beta.rst Normal file
View File

@ -0,0 +1,5 @@
.. note::
This extension is currently **BETA**.
Things will change, and although we use it on some real-world software, it may, or may not, satisfy your needs.

53
docs/extension/django.rst Normal file
View File

@ -0,0 +1,53 @@
Working with Django
===================
|bonobo| provides a lightweight integration with django, to allow to write management commands using |bonobo| graphs.
Management Command
::::::::::::::::::
To write a management command with |bonobo|, just extend the :class:`bonobo.contrib.django.ETLCommand` class and
override the `get_graph()` method.
Example:
.. code-block:: python
import bonobo
from bonobo.contrib.django import ETLCommand
class Command(ETLCommand):
def get_graph(self, **options):
graph = bonobo.Graph()
graph.add_chain(...)
return graph
You can also override the `get_services()` method.
One common recipe to do so is to import it from somewhere else and override it as a :obj:`staticmethod`:
.. code-block:: python
import bonobo
from bonobo.contrib.django import ETLCommand
from myproject.services import get_services
class Command(ETLCommand):
get_services = staticmethod(get_services)
def get_graph(...):
...
Source code
:::::::::::
https://github.com/python-bonobo/bonobo/tree/master/bonobo/contrib/django
Reference
:::::::::
.. automodule:: bonobo.contrib.django
:members:
:undoc-members:
:show-inheritance:

View File

@ -1,8 +1,14 @@
Docker Extension
================
Working with Docker
===================
.. todo:: The `bonobo-docker` package is at a very alpha stage, and things will change. This section is here to give a
brief overview but is neither complete nor definitive.
.. include:: _beta.rst
Read the introduction: https://www.bonobo-project.org/with/docker
Source code
:::::::::::
https://github.com/python-bonobo/bonobo-docker

View File

@ -8,6 +8,7 @@ Most of them are available as optional extra dependencies, and the maturity stag
.. toctree::
:maxdepth: 2
django
docker
jupyter
selenium

View File

@ -1,5 +1,7 @@
Jupyter Extension
=================
Working with Jupyter
====================
.. include:: _beta.rst
There is a builtin plugin that integrates (somewhat minimallistically, for now) bonobo within jupyter notebooks, so
you can read the execution status of a graph within a nice (ok, not so nice) html/javascript widget.
@ -37,3 +39,8 @@ webpack::
./node_modules/.bin/webpack
Source code
:::::::::::
https://github.com/python-bonobo/bonobo/tree/master/bonobo/contrib/jupyter

View File

@ -1,9 +1,7 @@
Selenium Extension
==================
.. todo:: The `bonobo-selenium` package is at a very alpha stage, and things will change. This section is here to give a
brief overview but is neither complete nor definitive.
Working with Selenium
=====================
.. include:: _alpha.rst
Writing web crawlers with Bonobo and Selenium is easy.

View File

@ -1,16 +1,37 @@
SQLAlchemy Extension
====================
Working with SQL Databases
==========================
.. todo:: The `bonobo-sqlalchemy` package is at a very alpha stage, and things will change. This section is here to
give a brief overview but is neither complete nor definitive.
.. include:: _beta.rst
Read the introduction: https://www.bonobo-project.org/with/sqlalchemy
Installation
::::::::::::
To install the extension, use the `sqlalchemy` extra:
.. code-block:: shell-session
$ pip install bonobo[sqlalchemy]
.. note:: You can install more than one extra at a time separating the names with commas.
Overview
::::::::
There are two main tools provided by this extension. One reader, one writer.
Details
:::::::
Reference
:::::::::
Source code
:::::::::::
https://github.com/python-bonobo/bonobo-sqlalchemy