5.1. simplesqlite module contents

exception simplesqlite.AttributeNotFoundError[source]

Bases: exceptions.Exception

Raised when accessed the attribute that not exists in the table.

exception simplesqlite.NullDatabaseConnectionError[source]

Bases: exceptions.Exception

Raised when executing an operation of SimpleSQLite instance without connection to a SQLite database file.

exception simplesqlite.TableNotFoundError[source]

Bases: exceptions.Exception

Raised when accessed the table that not exists in the database.

simplesqlite.append_table(con_src, con_dst, table_name)[source]

Append the table from source to destination.

Parameters:
  • con_src (SimpleSQLite) – Source of the database.
  • con_dst (SimpleSQLite) – Destination of the database.
  • table_name (str) – Table name to copy.
Returns:

True if success.

Return type:

bool

Raises:
simplesqlite.connect_sqlite_db_mem()[source]
Returns:

Instance of a in memory database.

Return type:

SimpleSQLite

Examples:
>>> import simplesqlite
>>> con = simplesqlite.connect_sqlite_db_mem()
>>> con.database_path
':memory:'
simplesqlite.validate_table_name(name)[source]
Parameters:name (str) – Table name to validate.
Raises:ValueError – If the name is invalid for a SQLite table name.