sqliteObj.py

Version 1.13.1 · Source: modules/sqliteObj.py

Synchronous SQLite access with dictionary filters, schema helpers, and text, CSV, and HTML export.

Setup and lifecycle

Place sqliteObj.py on the Python import path. Database operations use the standard-library sqlite3 package. Importing the module also imports pmblue_update and calls its self_update(); when absent, the bootstrap uses requests to download it over the legacy HTTP URL and writes pmblue_update.py in the working directory. Provision the updater before import when controlling deployment.

sqliteObj(filename, table=None) opens the connection immediately. Choose an existing default table with set_table(name), or supply table= to each operation. Call commit() to save data changes and close() when finished; close() does not commit pending changes.

Working example

This example initializes the schema with parameterized standard SQLite calls before constructing the wrapper, so its cached column lists start with the complete schema.

import sqlite3
import sqliteObj

with sqlite3.connect("contacts.db") as connection:
    connection.execute(
        "CREATE TABLE IF NOT EXISTS contacts "
        "(id INTEGER PRIMARY KEY, name TEXT, city TEXT)"
    )

db = sqliteObj.sqliteObj("contacts.db", table="contacts")
try:
    contact_id = db.insert({"name": "Ada", "city": "London"})
    db.commit()
    rows = db.select({"id": contact_id})
    print(rows[0]["name"])
    changed = db.update({"city": "Oxford"}, {"id": contact_id})
    db.commit()
    print(changed)
finally:
    db.close()

Query and return conventions

MethodBehavior / return
select_all(dict_mode=True, table=None, limit=None)All matching rows as a list of dictionaries; dict_mode=False returns sqlite3.Row values. Without a default table, this method selects the first available table.
select(select, orderDict=None, op_and=True, limit=None, case_insensitive=False, dict_mode=True, table=None)A filter dictionary or a complete SQL query string. Returns a list even for one row; no match gives [].
select_all_custom(key, ...), select_custom(key, select, ...)Fetch rows, then retain rows for which the Python callback returns an actual boolean True. Other callback return types raise InvalidKeyResponse; SQL limits apply before callback filtering.
insert(insert, table=None)Accepts a dictionary or positional list; returns the last inserted row ID. None values are omitted so column defaults may apply.
update(update, where, op_and=True, table=None)Updates columns selected by a filter dictionary or raw condition; returns affected-row count.
delete(delete, op_and=True, table=None)Deletes rows matching the filter; returns affected-row count.
cursor(), execute(query)Return a native SQLite cursor. The wrapper's execute has no parameters argument; use db.cursor().execute(sql, values) for bound parameters.

Dictionary filters support ordinary values and between(a, b), like(pattern), contains(text), case_insensitive(value), and is_not(value). List values produce an IN clause. op_and=False joins conditions with OR. Use one explicit ordering field, for example orderDict={"name": "ASC"}; the current multi-field builder overwrites earlier fields.

rows = db.select({"city": sqliteObj.contains("ford")}, limit=20)
rows = db.select({"name": sqliteObj.case_insensitive("ada")})
cursor = db.cursor()
cursor.execute("SELECT * FROM contacts WHERE name = ?", (submitted_name,))
rows = [dict(row) for row in cursor.fetchall()]

Schema and maintenance

tables() returns names; column_names(table=...) returns column names. create_table(name) creates an integer, autoincrementing id column. Add columns with add_column(name, datatype, current=None, table=None); types can be SQL strings or Integer, Real, Text, or TypeStr. current fills existing rows rather than defining a persistent SQL default. drop_table() removes a table. vacuum() commits and compacts; vacuum(to_file=...) requests a separate compacted database.

drop_column() is present but immediately raises an exception. Schema caches are not fully refreshed by every schema helper: reopening the wrapper after schema changes avoids stale col_names_exact lists, particularly with positional inserts or explicit table arguments.

Reports and export

to_txt(), to_csv(), and to_html() produce report text. to_txt_table() returns the included TxtTable object for further formatting. to_dict() returns a mapping of table names to row lists, including when one table is selected. flask_pagination(request, ...) provides Flask-oriented HTML pagination. TxtTable also supports columns, rows, text output, CSV, and HTML independently of a database.

Current limits and errors

This synchronous wrapper blocks the calling thread. Its internal queue does not change SQLite's connection thread restrictions. Most convenience queries interpolate values into SQL through custom escaping; use parameterized native cursors for arbitrary user text. Identifiers and raw SQL must come from trusted application code. Generated HTML is report markup and should not be assumed to escape arbitrary cell content.

Expect TableNotSet, ColumnNotFound, TableNotFound, or ModuleOperationError for supported validation paths; some methods still raise generic exceptions. ModuleOperationError includes the generated SQL and the underlying error text. The module-level exact setting controls its legacy quote-handling exception; it is not a substitute for bound SQL parameters.

For asynchronous applications, see aiosqliteObj. Its class names, schema types, and commit behavior differ.

Objects and connection state

The module contains three groups of objects: the sqliteObj connection wrapper, small SQL filter/type values, and TxtTable report objects. A SELECT returns row data rather than another database wrapper. Keep the connection alive while using its cursors; exported dictionaries and text no longer need the connection.

Object / attributeMeaning and use
db.filename, db.connOriginal database filename and open native sqlite3.Connection. The connection gives access to standard parameterized execution and rollback.
db.tableDefault table name, or None. set_table("contacts") validates an existing name and returns it. Pass an explicit name: the no-argument branch returns the first name but does not consistently set the stored default.
db.col_names, db.col_names_exactCached lowercase/exact column-name mappings created during construction. Treat them as metadata, not the schema-editing interface.
db.total_changesCounter maintained by the wrapper; raw native-cursor writes are not consistently included. Use the cursor's rowcount/lastrowid for a particular operation.
Integer, Real, Text, TypeStr(sql_type)Small SQL type descriptors exposing .type. Pass a descriptor instance or an SQL type string to add_column; these do not convert Python values.

Filter values

Create filter values through the module namespace, for example sqliteObj.between(10, 20). They only store values until a query consumes them. between has value1/value2; the other filter classes have value. like("A%") supplies an SQL LIKE pattern, whereas contains("Ada") adds percent signs around the supplied text. case_insensitive requests SQLite NOCASE comparison. is_not negates a supported condition.

The select, update, and delete arguments are different roles: update(values, where) takes new column values first and a row filter second. A string passed as where is appended verbatim and must include its own WHERE keyword. By contrast, strings passed to select or delete are complete statements. An empty dictionary in delete({}), or where={}/None in update, targets every row.

Report objects

TxtTable(format_numbers=False, totals=False, len_limit=100) owns columns and rows lists. add_column(name, length=None, str_convert=None, value=None) returns a TxtTable.Column; add_row(*values) returns a TxtTable.Row whose data contains Cell objects. Supply one value per column. A column's str_convert changes display text while preserving the underlying cell value.

table.print(send=False) returns text without printing. With the default send=True, it prints and also returns that text. to_csv() and to_html() return strings; table_only=True asks HTML export for a table fragment. Column positions accepted by insert_column/remove_column are one-based.

Worked example: filter data and build a report

This complete example uses an in-memory database, parameterized setup, dictionary filtering, and a text report. Closing the database discards its data.

import sqliteObj as sql

db = sql.sqliteObj(":memory:")
try:
    db.create_table("orders")
    db.add_column("customer", "TEXT")
    db.add_column("amount", "REAL")
    cursor = db.cursor()
    cursor.executemany(
        "INSERT INTO orders (customer, amount) VALUES (?, ?)",
        [("Ada", 120.0), ("Grace", 45.0), ("Linus", 80.0)],
    )
    db.commit()

    rows = db.select({"amount": sql.between(50, 150)}, orderDict={"amount": "DESC"})
    report = sql.TxtTable(format_numbers=True)
    report.add_column("Customer")
    report.add_column("Amount")
    for row in rows:
        report.add_row(row["customer"], row["amount"])
    print(report.print(send=False))
    print(db.to_dict()["orders"][0]["customer"])
finally:
    db.close()

Worked example: explicit commit or rollback

The wrapper does not define a transaction context manager. Use its native connection for rollback and explicitly commit after a successful group of writes. This temporary database demonstrates failure without leaving a file behind.

import os
import sqlite3
import tempfile
import sqliteObj

with tempfile.TemporaryDirectory() as directory:
    path = os.path.join(directory, "users.db")
    with sqlite3.connect(path) as connection:
        connection.execute("CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT UNIQUE)")
    db = sqliteObj.sqliteObj(path, table="users")
    try:
        try:
            cursor = db.cursor()
            cursor.execute("INSERT INTO users (name) VALUES (?)", ("Ada",))
            cursor.execute("INSERT INTO users (name) VALUES (?)", ("Ada",))
            db.commit()
        except sqlite3.IntegrityError:
            db.conn.rollback()
        print(db.select_all())  # []: neither insert persisted
    finally:
        db.close()

Complete source API

Generated from modules/sqliteObj.py; version 1.13.1. Includes public functions, classes, directly declared methods, properties, and Python protocol methods. Conditional APIs may require optional dependencies. Inherited members and dynamically assigned attributes are explained in the guide where relevant.

Signatures and docstrings are extracted without importing or running the module. A property or AsyncProperty decorator changes how a member is accessed; see its decorators and the guide.

Classes and objects

Module functions

class TableNotSet(Exception)

Source line 29

Exception raised when a table is not set.

Construct: TableNotSet()

Declared functions, properties, and nested objects:

TableNotSet.__init__(self)

Source line 31

No caller-supplied parameters are declared.

class ColumnNotFound(Exception)

Source line 33

Exception raised when a column provided is not found.

Construct: ColumnNotFound(given, table)

Declared functions, properties, and nested objects:

ColumnNotFound.__init__(self, given, table)

Source line 35

ParameterPassing conventionDefault / required
givenpositional or keywordrequired
tablepositional or keywordrequired
class TableNotFound(Exception)

Source line 37

Exception raised when a table is not found.

Construct: TableNotFound(table)

Declared functions, properties, and nested objects:

TableNotFound.__init__(self, table)

Source line 39

ParameterPassing conventionDefault / required
tablepositional or keywordrequired
class InvalidKeyResponse(Exception)

Source line 41

Exception raised when given key function gives invalid response in a custom method.

Construct: InvalidKeyResponse(given, key)

Declared functions, properties, and nested objects:

InvalidKeyResponse.__init__(self, given, key)

Source line 43

ParameterPassing conventionDefault / required
givenpositional or keywordrequired
keypositional or keywordrequired
class ModuleOperationError(Exception)

Source line 45

Exception raised when this module messes up essentially. When there is an error with an exection, the query that caused the error, and the exception itself, are returned.

Construct: ModuleOperationError(query, trc)

Declared functions, properties, and nested objects:

ModuleOperationError.__init__(self, query, trc)

Source line 47

ParameterPassing conventionDefault / required
querypositional or keywordrequired
trcpositional or keywordrequired
class WhatTheFuckAreYouDoing(Exception)

Source line 49

Exception raised when you become a psychopath, and have both a pair of 2 single quotes, and a pair of 2 double quotes, in a string.
Either do sqliteObj.exact = False, or just stop.

Construct: WhatTheFuckAreYouDoing()

Declared functions, properties, and nested objects:

WhatTheFuckAreYouDoing.__init__(self)

Source line 52

No caller-supplied parameters are declared.

sqltype(o)

Source line 59

ParameterPassing conventionDefault / required
opositional or keywordrequired
itemStr(item)

Source line 63

ParameterPassing conventionDefault / required
itempositional or keywordrequired
class Integer

Source line 80

Construct: Integer()

Fields assigned by the constructor: type. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

Integer.__init__(self)

Source line 83

No caller-supplied parameters are declared.

class Real

Source line 86

Construct: Real()

Fields assigned by the constructor: type. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

Real.__init__(self)

Source line 89

No caller-supplied parameters are declared.

class Text

Source line 92

Construct: Text()

Fields assigned by the constructor: type. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

Text.__init__(self)

Source line 95

No caller-supplied parameters are declared.

class TypeStr

Source line 98

Construct: TypeStr(value)

Fields assigned by the constructor: type. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

TypeStr.__init__(self, value)

Source line 99

ParameterPassing conventionDefault / required
valuepositional or keywordrequired
class between

Source line 102

Construct: between(value1, value2)

Fields assigned by the constructor: value1, value2. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

between.__init__(self, value1, value2)

Source line 103

ParameterPassing conventionDefault / required
value1positional or keywordrequired
value2positional or keywordrequired
class like

Source line 107

Construct: like(value)

Fields assigned by the constructor: value. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

like.__init__(self, value)

Source line 108

ParameterPassing conventionDefault / required
valuepositional or keywordrequired
class contains

Source line 111

Construct: contains(value)

Fields assigned by the constructor: value. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

contains.__init__(self, value)

Source line 112

ParameterPassing conventionDefault / required
valuepositional or keywordrequired
class case_insensitive

Source line 115

Construct: case_insensitive(value)

Fields assigned by the constructor: value. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

case_insensitive.__init__(self, value)

Source line 116

ParameterPassing conventionDefault / required
valuepositional or keywordrequired
class is_not

Source line 119

Construct: is_not(value)

Fields assigned by the constructor: value. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

is_not.__init__(self, value)

Source line 120

ParameterPassing conventionDefault / required
valuepositional or keywordrequired
class_name(c)

Source line 124

ParameterPassing conventionDefault / required
cpositional or keywordrequired
class Queue

Source line 135

Construct: Queue()

Fields assigned by the constructor: q. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

Queue.__init__(self)

Source line 136

No caller-supplied parameters are declared.

Queue.qm(self)

Source line 138

No caller-supplied parameters are declared.

class QueueManager

Source line 140

Construct: QueueManager(q)

Fields assigned by the constructor: q. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

QueueManager.__init__(self, q)

Source line 141

ParameterPassing conventionDefault / required
qpositional or keywordrequired
QueueManager.__enter__(self)

Source line 143

No caller-supplied parameters are declared.

QueueManager.__exit__(self, *args)

Source line 157

ParameterPassing conventionDefault / required
argsextra positional arguments (*args)optional collection
class sqliteObj

Source line 160

Construct: sqliteObj(filename, table=None)

Fields assigned by the constructor: col_names, col_names_exact, conn, filename, table, total_changes. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

sqliteObj.__init__(self, filename, table=None)

Source line 161

ParameterPassing conventionDefault / required
filenamepositional or keywordrequired
tablepositional or keywordNone
sqliteObj.col_exists(self, col_name, table)

Source line 185

ParameterPassing conventionDefault / required
col_namepositional or keywordrequired
tablepositional or keywordrequired
sqliteObj.col_names_update(self)

Source line 190

No caller-supplied parameters are declared.

sqliteObj.select_all_custom(self, key, dict_mode=True, table=None, limit=None)

Source line 201

ParameterPassing conventionDefault / required
keypositional or keywordrequired
dict_modepositional or keywordTrue
tablepositional or keywordNone
limitpositional or keywordNone
sqliteObj.select_custom(self, key, select, orderDict=None, op_and=True, limit=None, case_insensitive=False, dict_mode=True, table=None)

Source line 257

ParameterPassing conventionDefault / required
keypositional or keywordrequired
selectpositional or keywordrequired
orderDictpositional or keywordNone
op_andpositional or keywordTrue
limitpositional or keywordNone
case_insensitivepositional or keywordFalse
dict_modepositional or keywordTrue
tablepositional or keywordNone
sqliteObj.select_all(self, dict_mode=True, table=None, limit=None)

Source line 405

ParameterPassing conventionDefault / required
dict_modepositional or keywordTrue
tablepositional or keywordNone
limitpositional or keywordNone
sqliteObj.select(self, select, orderDict=None, op_and=True, limit=None, case_insensitive=False, dict_mode=True, table=None)

Source line 449

ParameterPassing conventionDefault / required
selectpositional or keywordrequired
orderDictpositional or keywordNone
op_andpositional or keywordTrue
limitpositional or keywordNone
case_insensitivepositional or keywordFalse
dict_modepositional or keywordTrue
tablepositional or keywordNone
sqliteObj.set_table(self, table=None)

Source line 582

ParameterPassing conventionDefault / required
tablepositional or keywordNone
sqliteObj.tables(self)

Source line 612

No caller-supplied parameters are declared.

sqliteObj.vacuum(self, to_file=None)

Source line 632

Vacuums the database, making the file smaller.

to_file - If set to the path to a new file, it will create a new, vacuumed version of this database seperate from the current database.
ParameterPassing conventionDefault / required
to_filepositional or keywordNone
sqliteObj.update(self, update, where, op_and=True, table=None)

Source line 646

ParameterPassing conventionDefault / required
updatepositional or keywordrequired
wherepositional or keywordrequired
op_andpositional or keywordTrue
tablepositional or keywordNone
sqliteObj.insert(self, insert, table=None)

Source line 768

ParameterPassing conventionDefault / required
insertpositional or keywordrequired
tablepositional or keywordNone
sqliteObj.column_names(self, table=None)

Source line 857

ParameterPassing conventionDefault / required
tablepositional or keywordNone
sqliteObj.add_column(self, column, datatype, current=None, table=None)

Source line 889

ParameterPassing conventionDefault / required
columnpositional or keywordrequired
datatypepositional or keywordrequired
currentpositional or keywordNone
tablepositional or keywordNone
sqliteObj.drop_column(self, column, table=None)

Source line 924

ParameterPassing conventionDefault / required
columnpositional or keywordrequired
tablepositional or keywordNone
sqliteObj.create_table(self, table)

Source line 951

ParameterPassing conventionDefault / required
tablepositional or keywordrequired
sqliteObj.drop_table(self, table=None)

Source line 972

ParameterPassing conventionDefault / required
tablepositional or keywordNone
sqliteObj.delete(self, delete, op_and=True, table=None)

Source line 997

ParameterPassing conventionDefault / required
deletepositional or keywordrequired
op_andpositional or keywordTrue
tablepositional or keywordNone
sqliteObj.commit(self)

Source line 1099

No caller-supplied parameters are declared.

sqliteObj.cursor(self)

Source line 1102

No caller-supplied parameters are declared.

sqliteObj.execute(self, query)

Source line 1115

ParameterPassing conventionDefault / required
querypositional or keywordrequired
sqliteObj.close(self)

Source line 1121

No caller-supplied parameters are declared.

sqliteObj.to_txt(self, table=None, len_limit=30, limit=None)

Source line 1130

ParameterPassing conventionDefault / required
tablepositional or keywordNone
len_limitpositional or keyword30
limitpositional or keywordNone
sqliteObj.to_txt_table(self, table=None, len_limit=100, limit=None, format_numbers=False)

Source line 1145

ParameterPassing conventionDefault / required
tablepositional or keywordNone
len_limitpositional or keyword100
limitpositional or keywordNone
format_numberspositional or keywordFalse
sqliteObj.to_csv(self, table=None)

Source line 1160

ParameterPassing conventionDefault / required
tablepositional or keywordNone
sqliteObj.to_html(self, table=None, max_len=100, condensed=True, row_range=None, to_body_top='', to_body_bottom='', to_head='', own_rows=None, table_only=False)

Source line 1200

ParameterPassing conventionDefault / required
tablepositional or keywordNone
max_lenpositional or keyword100
condensedpositional or keywordTrue
row_rangepositional or keywordNone
to_body_toppositional or keyword''
to_body_bottompositional or keyword''
to_headpositional or keyword''
own_rowspositional or keywordNone
table_onlypositional or keywordFalse
sqliteObj.to_dict(self, table=None, dict_mode=True)

Source line 1350

ParameterPassing conventionDefault / required
tablepositional or keywordNone
dict_modepositional or keywordTrue
sqliteObj.flask_pagination(self, request, per_page=50, max_len=100, table=None)

Source line 1378

ParameterPassing conventionDefault / required
requestpositional or keywordrequired
per_pagepositional or keyword50
max_lenpositional or keyword100
tablepositional or keywordNone
class TxtTable

Source line 1467

Construct: TxtTable(format_numbers=False, totals=False, len_limit=100)

Fields assigned by the constructor: col_amt, columns, format_int, len_limit, row_amt, rows, totals. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

TxtTable.row(txt, rl=8)

Source line 1468

ParameterPassing conventionDefault / required
txtpositional or keywordrequired
rlpositional or keyword8
TxtTable.numbFormat(number)

Source line 1478

ParameterPassing conventionDefault / required
numberpositional or keywordrequired
TxtTable.formattedToNumb(number)

Source line 1487

ParameterPassing conventionDefault / required
numberpositional or keywordrequired
TxtTable.__init__(self, format_numbers=False, totals=False, len_limit=100)

Source line 1489

ParameterPassing conventionDefault / required
format_numberspositional or keywordFalse
totalspositional or keywordFalse
len_limitpositional or keyword100
TxtTable.add_column(self, name, length=None, str_convert=None, value=None)

Source line 1497

ParameterPassing conventionDefault / required
namepositional or keywordrequired
lengthpositional or keywordNone
str_convertpositional or keywordNone
valuepositional or keywordNone
TxtTable.insert_column(self, name, loc, length=None, str_convert=None, value=None)

Source line 1514

ParameterPassing conventionDefault / required
namepositional or keywordrequired
locpositional or keywordrequired
lengthpositional or keywordNone
str_convertpositional or keywordNone
valuepositional or keywordNone
TxtTable.add_row(self, *args)

Source line 1541

ParameterPassing conventionDefault / required
argsextra positional arguments (*args)optional collection
TxtTable.remove_column(self, col_num)

Source line 1549

ParameterPassing conventionDefault / required
col_numpositional or keywordrequired
TxtTable.print(self, limit=None, send=True)

Source line 1560

ParameterPassing conventionDefault / required
limitpositional or keywordNone
sendpositional or keywordTrue
TxtTable.to_html(self, max_len=100, condensed=True, row_range=None, to_body_top='', to_body_bottom='', to_head='', own_rows=None, table_only=False, row_colors=[['#f0eceb', '#000000'], ['#e6e2e1', '#000000']], background_color='#f7f2f2', header_color='#000000')

Source line 1600

ParameterPassing conventionDefault / required
max_lenpositional or keyword100
condensedpositional or keywordTrue
row_rangepositional or keywordNone
to_body_toppositional or keyword''
to_body_bottompositional or keyword''
to_headpositional or keyword''
own_rowspositional or keywordNone
table_onlypositional or keywordFalse
row_colorspositional or keyword[['#f0eceb', '#000000'], ['#e6e2e1', '#000000']]
background_colorpositional or keyword'#f7f2f2'
header_colorpositional or keyword'#000000'
TxtTable.flask_pagination(self, request, per_page=50, max_len=100, page_colors=['#ffffff', '#000000'], to_body_top='', querystring='', search_ignore=None, custom_sort={}, **kwargs)

Source line 1754

ParameterPassing conventionDefault / required
requestpositional or keywordrequired
per_pagepositional or keyword50
max_lenpositional or keyword100
page_colorspositional or keyword['#ffffff', '#000000']
to_body_toppositional or keyword''
querystringpositional or keyword''
search_ignorepositional or keywordNone
custom_sortpositional or keyword{}
kwargsextra keyword arguments (**kwargs)optional collection
TxtTable.to_csv(self)

Source line 2115

No caller-supplied parameters are declared.

TxtTable.__repr__(self)

Source line 2150

No caller-supplied parameters are declared.

class TxtTable.Column

Source line 2153

Construct: TxtTable.Column(name, length, table, col_num, str_convert=None)

Fields assigned by the constructor: col_num, length, name, str_convert, table. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

TxtTable.Column.__init__(self, name, length, table, col_num, str_convert=None)

Source line 2154

ParameterPassing conventionDefault / required
namepositional or keywordrequired
lengthpositional or keywordrequired
tablepositional or keywordrequired
col_numpositional or keywordrequired
str_convertpositional or keywordNone
TxtTable.Column.__len__(self)

Source line 2160

No caller-supplied parameters are declared.

TxtTable.Column.rows_len(self, rows)

Source line 2177

ParameterPassing conventionDefault / required
rowspositional or keywordrequired
TxtTable.Column.__repr__(self)

Source line 2194

No caller-supplied parameters are declared.

TxtTable.Column.total(self)

Source line 2196

No caller-supplied parameters are declared.

TxtTable.Column.is_numb(self)

Source line 2219

No caller-supplied parameters are declared.

TxtTable.Column.is_datetime(self)

Source line 2225

No caller-supplied parameters are declared.

TxtTable.Column.cells(self)

Source line 2231

No caller-supplied parameters are declared.

class TxtTable.Row

Source line 2241

Construct: TxtTable.Row(row_number, format_numbs, table, *args)

Fields assigned by the constructor: data, format_numbs, row_num, table. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

TxtTable.Row.__init__(self, row_number, format_numbs, table, *args)

Source line 2242

ParameterPassing conventionDefault / required
row_numberpositional or keywordrequired
format_numbspositional or keywordrequired
tablepositional or keywordrequired
argsextra positional arguments (*args)optional collection
TxtTable.Row.remove_column(self, col_num)

Source line 2256

ParameterPassing conventionDefault / required
col_numpositional or keywordrequired
TxtTable.Row.__repr__(self)

Source line 2266

No caller-supplied parameters are declared.

TxtTable.Row.__eq__(self, other)

Source line 2268

ParameterPassing conventionDefault / required
otherpositional or keywordrequired
TxtTable.Row.__contains__(self, other)

Source line 2272

ParameterPassing conventionDefault / required
otherpositional or keywordrequired
TxtTable.Row.__len__(self)

Source line 2274

No caller-supplied parameters are declared.

TxtTable.Row.__iter__(self)

Source line 2276

No caller-supplied parameters are declared.

TxtTable.Row.__next__(self)

Source line 2279

No caller-supplied parameters are declared.

TxtTable.Row.__getitem__(self, item)

Source line 2281

ParameterPassing conventionDefault / required
itempositional or keywordrequired
class TxtTable.Cell

Source line 2301

Construct: TxtTable.Cell(value, print_value, col_num, row_num, format_numbs)

Fields assigned by the constructor: col_num, format_numbs, print_value, row_num, type, value. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

TxtTable.Cell.__init__(self, value, print_value, col_num, row_num, format_numbs)

Source line 2302

ParameterPassing conventionDefault / required
valuepositional or keywordrequired
print_valuepositional or keywordrequired
col_numpositional or keywordrequired
row_numpositional or keywordrequired
format_numbspositional or keywordrequired
TxtTable.Cell.__len__(self)

Source line 2319

No caller-supplied parameters are declared.

TxtTable.Cell.__str__(self)

Source line 2321

No caller-supplied parameters are declared.

TxtTable.Cell.__contains__(self, other)

Source line 2327

ParameterPassing conventionDefault / required
otherpositional or keywordrequired
TxtTable.Cell.__eq__(self, other)

Source line 2329

ParameterPassing conventionDefault / required
otherpositional or keywordrequired
TxtTable.Cell.__repr__(self)

Source line 2331

No caller-supplied parameters are declared.

TxtTable.to_numb(s)

Source line 2336

ParameterPassing conventionDefault / required
spositional or keywordrequired