asedb_sqlite3_backend package¶
Submodules¶
asedb_sqlite3_backend.asedb_sqlite3_backend module¶
-
class
asedb_sqlite3_backend.asedb_sqlite3_backend.
ASEdbSQlite3Backend
(database=None, user=None, password=None, remote=None)[source]¶ Bases:
abcd.backend.Backend
-
ASEdbSQlite3Backend.
connect_to_database
()[source]¶ Connnects to a database with given name. If it doesn’t exist, a new one is created. The method first looks in the “write” folder, and then in the “readonly” folder
-
asedb_sqlite3_backend.mongodb2asedb module¶
asedb_sqlite3_backend.remote module¶
Functions that are used to communicate with a remote server (server.py).
asedb_sqlite3_backend.server module¶
Interface for the ASEdb backend. Its purpose is to be triggered by the communicate_with_remote function from remote.py, communicate with the ASEdb backend and print results/data to standard output. The output is b64-encoded and should be in a form XYZ:OUTPUT, where XYZ is the response code which indicates what type of output was produced (see below).
Response codes: 201: b64encoded string 202: json and b64encoded list 203: json and b64encoded dictionary 204: json and b64encoded list of dictionaries 220: json and b64encoded InsertResult dictionary 221: json and b64encoded UpdateResult dictionary 222: json and b64encoded RemoveResult dictionary 223: json and b64encoded AddKvpResult dictionary 224: json and b64encoded RemoveKeysResult dictionary 400: b64encoded string - Error 401: b64encoded string - ReadError 402: b64encoded string - WriteError
asedb_sqlite3_backend.util module¶
-
asedb_sqlite3_backend.util.
add_user
(user)[source]¶ Adds a user and their public key to ~/.ssh/authorized_keys file and creates directories $databases/USER and $databases/USER_readonly.