dql.output module

Formatting and displaying output

class dql.output.BaseFormat(width=100, pagesize=1000)[source]

Bases: object

Base class for formatters

format(result, ostream)[source]

Format a single result and stick it in an output stream

format_field(field)[source]

Format a single Dynamo value

write(results, ostream)[source]

Write results to an output stream

class dql.output.ColumnFormat(width=100, pagesize=1000)[source]

Bases: dql.output.BaseFormat

A layout that puts item attributes in columns

format(results, columns, ostream)[source]
write(results, ostream)[source]
class dql.output.ExpandedFormat(width=100, pagesize=1000)[source]

Bases: dql.output.BaseFormat

A layout that puts item attributes on separate lines

format(result, ostream)[source]
class dql.output.SmartFormat(*args, **kwargs)[source]

Bases: dql.output.ColumnFormat

A layout that chooses column/expanded format intelligently

format(results, columns, ostream)[source]
dql.output.get_default_display()[source]

Get the default display function for this system

dql.output.less_display(*args, **kwds)[source]

Use smoke and mirrors to acquire ‘less’ for pretty paging

dql.output.stdout_display(*args, **kwds)[source]

Print results straight to stdout

dql.output.truncate(string, length, ellipsis=u'...')[source]

Truncate a string to a length, ending with ‘...’ if it overflows

dql.output.wrap(string, length, indent)[source]

Wrap a string at a line length

Read the Docs v: 0.1.0
Versions
latest
0.1.0
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.