You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SQLite](https://www.sqlite.org/index.html) is a lightweight database written in C.
12
12
The Python programming language has in-built support to interact with the database (locally) which is either stored on disk or in memory.
13
13
14
-
## sqlite_rx
14
+
## Introduction
15
15
With `sqlite_rx`, clients should be able to communicate with an `SQLiteServer` in a fast, simple and secure manner and execute queries remotely.
16
16
17
17
Key Features
@@ -20,7 +20,7 @@ Key Features
20
20
- Authentication using [ZeroMQ Authentication Protocol (ZAP)](https://rfc.zeromq.org/spec:27/ZAP/)
21
21
- Encryption using [CurveZMQ](http://curvezmq.org/)
22
22
- Generic authorization policy during server startup
23
-
- Schedule regular backups for on-disk database (Not supported on Windows and Python version < 3.7)
23
+
- Schedule regular backups for on-disk database (Not supported on Windows and for Python versions older than 3.7)
24
24
25
25
26
26
# Install
@@ -38,8 +38,6 @@ pip install sqlite_rx
38
38
- CPython 3.6, 3.7, 3.8, 3.9
39
39
- PyPy3.6
40
40
41
-
# Examples
42
-
43
41
## Server
44
42
45
43
`SQLiteServer` runs in a single thread and follows an event-driven concurrency model (using `tornado's` event loop) which minimizes the cost of concurrent client connections.
@@ -66,8 +64,8 @@ def main():
66
64
67
65
if__name__=='__main__':
68
66
main()
69
-
```
70
67
68
+
```
71
69
72
70
## Client
73
71
@@ -84,8 +82,6 @@ The `execute` method reacts to the following keyword arguments:
84
82
4.`retries`: Number of times to retry before abandoning the request. Default is 5
result = client.execute("SELECT * FROM stocks WHERE symbol = ?", *args)
263
+
264
+
```
265
+
266
+
## Backup
267
+
268
+
With `sqlite-rx`, database backup can be regularly peformed. The backup function can be configured to run as a background thread during server startup. Use `backup_interval` argument to specify how frequently backup should be performed in seconds.
269
+
270
+
```python
271
+
272
+
defmain():
273
+
274
+
# database is a path-like object giving the pathname
275
+
# of the database file to be opened.
276
+
277
+
# You can use ":memory:" to open a database connection to a database
0 commit comments