summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Reitz <me@kennethreitz.com>2010-10-07 16:01:17 -0400
committerKenneth Reitz <me@kennethreitz.com>2010-10-07 16:01:17 -0400
commitd0b09f0fce9ed602c398a0381a0a171d1fe91d61 (patch)
treefb27cc8086e340f9f8650015b1e932e4cd4aa163
parent9efd982bfac2bc00877b0cf09cd8b28e1ddc07d5 (diff)
downloadtablib-d0b09f0fce9ed602c398a0381a0a171d1fe91d61.tar.gz
Doc upgrades.
-rw-r--r--tablib/core.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/tablib/core.py b/tablib/core.py
index 544c208..9658d67 100644
--- a/tablib/core.py
+++ b/tablib/core.py
@@ -49,7 +49,7 @@ class Dataset(object):
.. admonition:: About the Format Attributes
If you look at the code, the various output/import formats are not
- defined within the itself. To add support for a new format, see
+ defined within the :class:`Dataset` object. To add support for a new format, see
:ref:`Adding New Formats`.
.. attribute:: csv
@@ -58,7 +58,7 @@ class Dataset(object):
headers, if they have been set. Otherwise, the top row will contain
the first row of the dataset.
- A dataset object can also be imported by setting the `Dataset.csv` attribute: ::
+ A dataset object can also be imported by setting the:class:`Dataset.csv` attribute. ::
data = tablib.Dataset()
data.csv = 'age, first_name, last_name\\n90, John, Adams'
@@ -72,7 +72,7 @@ class Dataset(object):
set, a list of Python dictionaries will be returned. If no headers have been
set, a list of tuples (rows) will be returned instead.
- A dataset object can also be imported by setting the `Dataset.dict` attribute: ::
+ A dataset object can also be imported by setting the :class:`Dataset.dict` attribute. ::
data = tablib.Dataset()
data.dict = [{'age': 90, 'first_name': 'Kenneth', 'last_name': 'Reitz'}]
@@ -83,11 +83,12 @@ class Dataset(object):
An Excel Spreadsheet representation of the Dataset object, including
:ref:`seperators`.
- *Note:* `Dataset.xls` contains binary data, so make sure to write in binary
- mode::
+ .. admonition:: Binary Warning
+
+ :class:`Dataset.xls` contains binary data, so make sure to write in binary mode::
- with open('output.xls', 'wb') as f:
- f.write(data.xls)
+ with open('output.xls', 'wb') as f:
+ f.write(data.xls)
.. attribute:: yaml
@@ -96,7 +97,7 @@ class Dataset(object):
set, a YAML list of objects will be returned. If no headers have
been set, a YAML list of lists (rows) will be returned instead.
- A dataset object can also be imported by setting the `Dataset.json` attribute: ::
+ A dataset object can also be imported by setting the :class:`Dataset.json` attribute: ::
data = tablib.Dataset()
data.yaml = '- {age: 90, first_name: John, last_name: Adams}'