Package s3 :: Module s3export :: Class S3Exporter
[frames] | no frames]

Class S3Exporter

source code

object --+
         |
        S3Exporter

Exporter toolkit

Instance Methods
 
csv(self, resource)
Export resource as CSV
source code
 
json(self, resource, start=None, limit=None, fields=None, orderby=None, represent=False, tooltip=None)
Export a resource as JSON
source code
 
pdf(self, *args, **kwargs) source code
 
pdfcard(self, *args, **kwargs) source code
 
shp(self, *args, **kwargs) source code
 
svg(self, *args, **kwargs) source code
 
xls(self, *args, **kwargs) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

csv(self, resource)

source code 

Export resource as CSV

Parameters:
  • resource - the resource to export

Note: export does not include components!

To Do: implement audit

json(self, resource, start=None, limit=None, fields=None, orderby=None, represent=False, tooltip=None)

source code 

Export a resource as JSON

Parameters:
  • resource - the resource to export from
  • start - index of the first record to export
  • limit - maximum number of records to export
  • fields - list of field selectors for fields to include in the export (None for all fields)
  • orderby - ORDERBY expression
  • represent - whether values should be represented
  • tooltip - additional tooltip field, either a field selector or an expression "f(k,v)" where f is a function name that can be looked up from s3db, and k,v are field selectors for the row, f will be called with a list of tuples (k,v) for each row and is expected to return a dict {k:tooltip} => used by filterOptionsS3 to extract onhover-tooltips for Ajax-update of options

pdf(self, *args, **kwargs)

source code 

pdfcard(self, *args, **kwargs)

source code 

shp(self, *args, **kwargs)

source code 

svg(self, *args, **kwargs)

source code 

xls(self, *args, **kwargs)

source code