From eb24e51ad6832ed870003094feabc1d1d0d6871e Mon Sep 17 00:00:00 2001 From: Gregor Aisch Date: Mon, 1 Apr 2013 22:40:34 +0200 Subject: [PATCH] api docs --- docs/api.rst | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 docs/api.rst diff --git a/docs/api.rst b/docs/api.rst new file mode 100644 index 0000000..61e2d07 --- /dev/null +++ b/docs/api.rst @@ -0,0 +1,34 @@ + +Contents: + +.. toctree:: + :maxdepth: 2 + + + +.. autofunction:: dataset.connect + + +Database +======== + +A Database is a simple wrapper around SQLAlchemy engines. Most of the time you want to use it to get instances to tables using *get_table* or the short-hand dict syntax:: + + # both statements return the same table + table = db['population'] + table = db.get_table('population') + +.. autoclass:: dataset.Database + :members: get_table, create_table, load_table, query + :undoc-members: + + + +Table +===== + +Using the *Table* class you can easily store and retreive data from database tables. + +.. autoclass:: dataset.Table + :members: + :undoc-members: