跳转到主要内容

将Kenneth Reitz的Tablib提供给PlominoUtils。

项目描述

简介

使Kenneth Reitz的tablib可用于PlominoUtils。

安装

在您的buildout的eggs部分包含plomino.tablib

eggs =
    ...
    plomino.tablib

当此包存在时,Plomino公式可使用dataset函数。

示例

# Create a table from a list of lists:
mytable = dataset([[1,2], [3,4]])

# Create a table and specify headers:
mytable = dataset([[1,2], [3,4]], headers=['col1', 'col2'])

# Create a table from a list of dicts (sets headers):
mytable = dataset([{'col1': 1, 'col2': 2]}, {'col1': 3, 'col2': 4}])

# Get the table as CSV or JSON:
mytable.csv
mytable.json

# Get the table as HTML or Excel:
mytable.html
mytable.xls

更多内容请参见tablib

贡献者

  • Jean Jordaan

变更日志

1.1 (2014-07-28)

  • 修复打包 [Jean Jordaan]

1.0 (2013-01-24)

  • 使用templer创建的包 [Jean Jordaan]

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源分布

plomino.tablib-1.1.zip (14.1 kB 查看散列)

上传时间:

由以下支持