Commits

Panagiotis Mavrogiorgos  committed 2c66a09

minor fix in documentation and readme update.

  • Participants
  • Parent commits b05cdf6

Comments (0)

Files changed (2)

 Abstract
 --------
 
-A Django-like declarative framework for reading/writing CSV files.
+A Django-like declarative framework for working with CSV files.
+
+CSVModels main features are:
+
+* a convenient way to read/write CSV files
+* *easy* validation of CSV data
+
+Apart from that, CSVModels, also features a small and easy to extend
+codebase and a comprehensive test-suite.
 
 Example
 -------
 In order to parse this file, all you have to do is to define a class that
 declares the structure of each csv's rows::
 
-    $ cat my_model.py
+    $ cat my_models.py
     from csvmodels import RowModel, StringColumn, IntegerColumn, FloatColumn
 
     class MyRow(RowModel):
 type of each column (string, integer, float etc)::
 
     from csvmodels import Reader
-    from models import MyRow
+    from my_models import MyRow
 
-    filename = "test.csv"
-    with open(filename, "r") as f:
+    with open("test.csv", "r") as f:
         reader = Reader(MyRow, f)
         for row in reader:
             print(row.node, row.load_case, row.moment)

File docs/tutorial.rst

 
 Sometimes an example works best. Suppose you have the following csv file::
 
+    $ cat test.csv
     Node;Load case;Moment;Shear
     1;LC1;123;23
     1;LC2;100;-23
 In order to parse this file, all you have to do is to define a class that
 declares the structure of each csv's rows::
 
+    $ cat my_models.py
     from csvmodels import RowModel, StringColumn, IntegerColumn, FloatColumn
 
     class MyRow(RowModel):
 csv data row by row::
 
     from csvmodels import Reader
-    from models import MyRow
+    from my_models import MyRow
 
-    filename = "test.csv"
-    with open(filename, "r") as f:
+    with open("test.csv", "r") as f:
         reader = Reader(MyRow, f)
-
-        for row in reader:
-            # Each row object is an instance of MyRow
+        for row in reader:          # Each row object is an instance of MyRow
             print("Node: %d, load case: %s, Moment=%.1f" % (row.node, row.load_case, row.moment))
 
 results in::