sugaroid.backend package

Submodules

sugaroid.backend.sql module

Sugaroid Backend is a SQL Database handler which stores incoming messages into an sqlite3 database, which is later used for analytics and usage history. With this, it will be possible to chart out the most used command / adapters and accordingly move them above / increase their preference of processing.

exception sugaroid.backend.sql.PossibleSQLInjectionPanicError[source]

Bases: ValueError

Raises PossibleSQLInjectionPanicError in case of possible SQL Injection. SQL Injection is an attempt to change the data by altering data within the string by attempting to manipulate the database entry by multiple semicolons for example

class sugaroid.backend.sql.SqlDatabaseManagement(path_to_db, table='sugaroid_hist')[source]

Bases: object

Sugaroid stores some data for analytics and research in an sqlite3 database

append(statement, in_reponse_to, time, processing_time)[source]
close()[source]

Closes the connection to the mysql database

property database_path: str

Return the path to the database

Returns

path to the database

Return type

str

property table

Return the table name on target

sugaroid.backend.sql.convert_data_escaped_string(data: tuple)[source]

Converts data from tuple form to a string statement to a SQL string statement

data: tuple return: a SQL formatted string rtype: str

Module contents