sqlitedeploy 0.1.0rc2__py3-none-win_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sqlitedeploy/__init__.py +10 -0
- sqlitedeploy/__main__.py +6 -0
- sqlitedeploy/_bin/sqlitedeploy.exe +0 -0
- sqlitedeploy/_resolve.py +43 -0
- sqlitedeploy-0.1.0rc2.dist-info/METADATA +77 -0
- sqlitedeploy-0.1.0rc2.dist-info/RECORD +8 -0
- sqlitedeploy-0.1.0rc2.dist-info/WHEEL +4 -0
- sqlitedeploy-0.1.0rc2.dist-info/entry_points.txt +2 -0
sqlitedeploy/__init__.py
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"""sqlitedeploy: distributed SQLite with Litestream-backed replication.
|
|
2
|
+
|
|
3
|
+
This package is a thin wrapper that ships the prebuilt Go binary for the
|
|
4
|
+
host platform. All real logic lives in the Go CLI; this Python package
|
|
5
|
+
exists only so users can `pip install sqlitedeploy` and get the binary
|
|
6
|
+
on their PATH.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
__all__ = ["__version__"]
|
|
10
|
+
__version__ = "0.1.0-rc.2"
|
sqlitedeploy/__main__.py
ADDED
|
Binary file
|
sqlitedeploy/_resolve.py
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"""Locate the bundled sqlitedeploy binary and exec it with the user's args.
|
|
2
|
+
|
|
3
|
+
The Go CLI reads <cwd>/.sqlitedeploy/config.yml and <cwd>/data/app.db, so we
|
|
4
|
+
must not chdir. On POSIX we use os.execvp to replace the Python process so
|
|
5
|
+
signals (Ctrl-C while `sqlitedeploy run` is replicating) reach Litestream
|
|
6
|
+
directly. Windows has no execvp semantics, so we subprocess and forward
|
|
7
|
+
the return code.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from __future__ import annotations
|
|
11
|
+
|
|
12
|
+
import os
|
|
13
|
+
import subprocess
|
|
14
|
+
import sys
|
|
15
|
+
from pathlib import Path
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def _binary_path() -> Path:
|
|
19
|
+
bin_dir = Path(__file__).resolve().parent / "_bin"
|
|
20
|
+
name = "sqlitedeploy.exe" if os.name == "nt" else "sqlitedeploy"
|
|
21
|
+
return bin_dir / name
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def main() -> None:
|
|
25
|
+
binary = _binary_path()
|
|
26
|
+
if not binary.is_file():
|
|
27
|
+
sys.stderr.write(
|
|
28
|
+
f"sqlitedeploy: binary not found at {binary}.\n"
|
|
29
|
+
"This wheel was built without a bundled binary, which is a "
|
|
30
|
+
"packaging bug. Reinstall, or download a binary from "
|
|
31
|
+
"https://github.com/Khangdang1690/sqlitedeploy/releases\n"
|
|
32
|
+
)
|
|
33
|
+
sys.exit(1)
|
|
34
|
+
|
|
35
|
+
args = [str(binary), *sys.argv[1:]]
|
|
36
|
+
|
|
37
|
+
if os.name == "nt":
|
|
38
|
+
# No execvp on Windows — spawn and forward the exit code.
|
|
39
|
+
completed = subprocess.run(args, check=False)
|
|
40
|
+
sys.exit(completed.returncode)
|
|
41
|
+
else:
|
|
42
|
+
# Replace this process so signals propagate cleanly.
|
|
43
|
+
os.execvp(str(binary), args)
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sqlitedeploy
|
|
3
|
+
Version: 0.1.0rc2
|
|
4
|
+
Summary: Distributed SQLite with Litestream-backed object-storage replication. Installs the platform-native sqlitedeploy CLI binary.
|
|
5
|
+
Project-URL: Homepage, https://github.com/Khangdang1690/sqlitedeploy
|
|
6
|
+
Project-URL: Issues, https://github.com/Khangdang1690/sqlitedeploy/issues
|
|
7
|
+
Author: sqlitedeploy contributors
|
|
8
|
+
License: Apache-2.0
|
|
9
|
+
Keywords: backup,cli,database,litestream,r2,replication,s3,sqlite
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
|
+
Classifier: Operating System :: MacOS
|
|
14
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
15
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Topic :: Database
|
|
18
|
+
Classifier: Topic :: System :: Archiving :: Backup
|
|
19
|
+
Requires-Python: >=3.8
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
|
|
22
|
+
# sqlitedeploy
|
|
23
|
+
|
|
24
|
+
Distributed SQLite in one terminal command. Your master lives in your own
|
|
25
|
+
object-storage bucket (Cloudflare R2 / Backblaze B2 / S3); your working copy
|
|
26
|
+
lives next to your application. Any language with a SQLite driver connects
|
|
27
|
+
to it natively.
|
|
28
|
+
|
|
29
|
+
This package installs the prebuilt platform-native binary and exposes it as
|
|
30
|
+
the `sqlitedeploy` command.
|
|
31
|
+
|
|
32
|
+
## Install
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pip install sqlitedeploy
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
PyPI serves a platform-tagged wheel with the matching binary baked in —
|
|
39
|
+
no compilation, no postinstall scripts.
|
|
40
|
+
|
|
41
|
+
## Quick start
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
sqlitedeploy auth login # one-time Cloudflare R2 setup
|
|
45
|
+
sqlitedeploy init # creates ./data/app.db + ./.sqlitedeploy/
|
|
46
|
+
sqlitedeploy run # foreground replication loop
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Then connect from your app:
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
import sqlite3
|
|
53
|
+
db = sqlite3.connect("data/app.db")
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
You can also invoke as a module:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
python -m sqlitedeploy --help
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Supported platforms
|
|
63
|
+
|
|
64
|
+
linux x86_64, linux aarch64, macOS x86_64, macOS arm64, Windows x86_64,
|
|
65
|
+
Windows arm64.
|
|
66
|
+
|
|
67
|
+
For unsupported platforms (e.g. linux-riscv64, FreeBSD) download a binary
|
|
68
|
+
from <https://github.com/Khangdang1690/sqlitedeploy/releases>.
|
|
69
|
+
|
|
70
|
+
## Documentation
|
|
71
|
+
|
|
72
|
+
Full CLI reference, architecture, and limitations:
|
|
73
|
+
<https://github.com/Khangdang1690/sqlitedeploy>.
|
|
74
|
+
|
|
75
|
+
## License
|
|
76
|
+
|
|
77
|
+
Apache-2.0.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
sqlitedeploy/__init__.py,sha256=XmdrqTsdpZQ7VyUeHOxNqZpBOZsbustzSTVr3WyJMzk,361
|
|
2
|
+
sqlitedeploy/__main__.py,sha256=6FTuKLQ-eur52BRxzAHdtf02tOH1o5Q9AnQzRz7QO_Y,145
|
|
3
|
+
sqlitedeploy/_resolve.py,sha256=j4I9hjTcafPdc9HeqyH9OzvU1JEnZVDOXmRjMHyJ1VE,1419
|
|
4
|
+
sqlitedeploy/_bin/sqlitedeploy.exe,sha256=RAMFSwuPWOs3Tpxtj3e0siGRN135wpErDoWOamWn8BU,45837824
|
|
5
|
+
sqlitedeploy-0.1.0rc2.dist-info/METADATA,sha256=Te8Dys4jyIAmStShtM0vvBrJU78kKRCnSSOMDaM_Yyo,2245
|
|
6
|
+
sqlitedeploy-0.1.0rc2.dist-info/WHEEL,sha256=w7VOCnMnx9r5-lu2GjBVd6BdGrPc0Fm_UFMvUozKtTg,94
|
|
7
|
+
sqlitedeploy-0.1.0rc2.dist-info/entry_points.txt,sha256=tg8QqoZHctsO1TGEQXscnTbZinbskEtMdjr0SAR6vKE,60
|
|
8
|
+
sqlitedeploy-0.1.0rc2.dist-info/RECORD,,
|