PySQLiteFS Bindings
This project provides bindigs for sqlitefs project. You can create a file system inside sqlite database. With key you can encript the whole database including sqlite headers.
Supported functions
- pwd - print working directory
- mkdir - create a new folder
- cd - change wirking directory
- ls - list files and folders
- cp - copy file. (Works with files only)
- mv - move node (file or folder)
- rm - remove node
- write - write file to the db
- read - read file from the db
- path - get full path for the sqlitefs node
- stats - recursively gets the count of all files in a directory, indicating the total size in compressed and raw form.
Read/write algorithms
To add your own modifications check Custom save and load functions section below. You can modify your data as you want, for example you can encrypt/compress and decrypt/decompress in save and load respectively.
Examples
A simple example
from pysqlitefs import SQLiteFS
fs = SQLiteFS("test.db", "secret")
raw_content = "Raw data content"
fs.write("file.txt", raw_content.encode())
content = fs.read("file.txt")
print(f"Content of file.txt: {content}")
assert content.decode() == raw_content, "Content mismatch after save and load"
Custom save and load functions
NOTE: you can specify only one of them if you want to read or write only. So you can write data at your own pc with registered write function and send file with load function only. In this case user can read the data, but cannot modify it (only remove).
from pysqlitefs import SQLiteFS
def save(data: bytes) -> bytes:
return data[-1::-1]
def load(data: bytes) -> bytes:
return data[-1::-1]
with open("file.dat", "rb") as f:
raw_content = f.read()
fs = SQLiteFS("test.db")
fs.register_save_func("reverse", save)
fs.register_load_func("reverse", load)
for name in fs.getSaveFuncs():
print(f"Test function: {name}")
fs.write(f"{name}.dat", raw_content, name)
content = fs.read(f"{name}.dat")
assert content == raw_content, "Content mismatch after save and load"
Release files for pysqlitefs 1.6.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 26.3 MB
Release files / pysqlitefs-1.6.2-cp314-cp314-win_amd64.whl
| Download URL | pysqlitefs-1.6.2-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
8eeb781d49f6d768e90e5554970a707c523aba92151806bb7701ac1359cb3262
|
|
BLAKE2b-256 checksum How to use checksums |
90133095f2fc68148c5909afbdfc8e0d1051a7bdbdf1a8e1f3cbef798a28a7fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|
Release files / pysqlitefs-1.6.2-cp314-cp314-musllinux_1_2_x86_64.whl
| Download URL | pysqlitefs-1.6.2-cp314-cp314-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.14 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
0ac9bbfb5cf2f6f1c5ac9ec67cbc40050eb41a4c5091180179113cf326bc6cc6
|
|
BLAKE2b-256 checksum How to use checksums |
ca4e168107e5bef82ea5c66844926afb2ce961b339b76e076ddab9361560afbb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|
Release files / pysqlitefs-1.6.2-cp314-cp314-manylinux_2_36_x86_64.whl
| Download URL | pysqlitefs-1.6.2-cp314-cp314-manylinux_2_36_x86_64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.14 Linux glibc 2.36+ x86-64 |
|
SHA-256 checksum How to use checksums |
26c28bd06b83a642e8d344e559702bfad99858e8e1b0aa66cd3f391db8bd459f
|
|
BLAKE2b-256 checksum How to use checksums |
310c5c61968fec61511654ad67ff594708794ba360b8f0e608c2030d2268c839
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|
Release files / pysqlitefs-1.6.2-cp313-cp313-win_amd64.whl
| Download URL | pysqlitefs-1.6.2-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
da1bb9492fe6ba2fd09b0f905ff5cb69ab1c8ca14e5f66fd19b262d2660b29b0
|
|
BLAKE2b-256 checksum How to use checksums |
95046794bbfb34b86919837b4c16f5bbc0ba0ce026dcb0959ac4d0caa1fc1c2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|
Release files / pysqlitefs-1.6.2-cp313-cp313-musllinux_1_2_x86_64.whl
| Download URL | pysqlitefs-1.6.2-cp313-cp313-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.13 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
33e9764186108d9eb3ada45c70604156d83c846ccc95be4571e583216b1c5d9d
|
|
BLAKE2b-256 checksum How to use checksums |
54279e70c3b55edd3498c1246a4df38d4bcfd3b86aa621b0e110c36721269a65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|
Release files / pysqlitefs-1.6.2-cp313-cp313-manylinux_2_36_x86_64.whl
| Download URL | pysqlitefs-1.6.2-cp313-cp313-manylinux_2_36_x86_64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.13 Linux glibc 2.36+ x86-64 |
|
SHA-256 checksum How to use checksums |
1f4287634fd1d4c020f1ad0d82213b7a8680bbb4a360cf4f1d8ed035afc80ff8
|
|
BLAKE2b-256 checksum How to use checksums |
4bc95eaf818435af869e1cc123a6b4601a5e3efa2eacfb9ffdcd0caecca0f69a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|
Release files / pysqlitefs-1.6.2-cp312-cp312-win_amd64.whl
| Download URL | pysqlitefs-1.6.2-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
dcecd689a5a1c6064f9e2907609218befee930d728a7ae8e73d92640c0016046
|
|
BLAKE2b-256 checksum How to use checksums |
8e5376ee61ceade5a4f20d04a256529d5ec52e7f0361c14d927a6b8bc794648e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|
Release files / pysqlitefs-1.6.2-cp312-cp312-musllinux_1_2_x86_64.whl
| Download URL | pysqlitefs-1.6.2-cp312-cp312-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.12 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
20aa5a72bcd7aa18370a56e32049680c3fc1e83d7bdf17c7275e6d0e081ec1db
|
|
BLAKE2b-256 checksum How to use checksums |
7e1dca0bc9f1335f094036d46cdf75e34dd555f2ce029946a8197bd38f680601
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|
Release files / pysqlitefs-1.6.2-cp312-cp312-manylinux_2_36_x86_64.whl
| Download URL | pysqlitefs-1.6.2-cp312-cp312-manylinux_2_36_x86_64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.12 Linux glibc 2.36+ x86-64 |
|
SHA-256 checksum How to use checksums |
139012d03140348dd5da126ba5498a2d55234b7b34be2399ae944d7b7718b7bf
|
|
BLAKE2b-256 checksum How to use checksums |
1d9259f17e4eda65491e993dedb6fb4a33c11dbf500b9b5573e5897a82753300
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|
Release files / pysqlitefs-1.6.2-cp311-cp311-win_amd64.whl
| Download URL | pysqlitefs-1.6.2-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
0c88dac57d7f36f353a6d0db416c3d8e303021c46d2156799383103030fe5fa5
|
|
BLAKE2b-256 checksum How to use checksums |
51d255d263c6687e630868b8c13d0df0800e7da1f2ecfc95e9079970826040da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|
Release files / pysqlitefs-1.6.2-cp311-cp311-musllinux_1_2_x86_64.whl
| Download URL | pysqlitefs-1.6.2-cp311-cp311-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.11 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
6405e587522875a85be5aae7d90701151bdd5cfd2cf1c912d1f6cf4a8193873c
|
|
BLAKE2b-256 checksum How to use checksums |
e00830dc5a76e13d94007f621980bc08690b7200b18692e0b549b00ee2256338
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|
Release files / pysqlitefs-1.6.2-cp311-cp311-manylinux_2_36_x86_64.whl
| Download URL | pysqlitefs-1.6.2-cp311-cp311-manylinux_2_36_x86_64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.11 Linux glibc 2.36+ x86-64 |
|
SHA-256 checksum How to use checksums |
a3439de60813b0dc67bab33c0c97dde5670a8dca4e969bf73fc30199bfba6b2d
|
|
BLAKE2b-256 checksum How to use checksums |
4273460debeabdd8e1e08fa0b6217d46ed1df553b3c665609ab455030c3126af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|
Release files / pysqlitefs-1.6.2-cp310-cp310-win_amd64.whl
| Download URL | pysqlitefs-1.6.2-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
8b84cb16dd66864cfc7dd07146831496ddc593ffdde3ff9229444e4bfdc1205c
|
|
BLAKE2b-256 checksum How to use checksums |
6a04dbb17b54a1449affec07de6a10f1883860f62e9f00edce04a799d664bc0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|
Release files / pysqlitefs-1.6.2-cp310-cp310-musllinux_1_2_x86_64.whl
| Download URL | pysqlitefs-1.6.2-cp310-cp310-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.10 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
b4541d0acff157895066d1cb399ea7d2d748fe5d88820ee51117d5a479361d75
|
|
BLAKE2b-256 checksum How to use checksums |
57dffda6edeeb7ac9f67521884a1db0013eabe0cd44e042ef0b36b101dc96d34
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|
Release files / pysqlitefs-1.6.2-cp310-cp310-manylinux_2_36_x86_64.whl
| Download URL | pysqlitefs-1.6.2-cp310-cp310-manylinux_2_36_x86_64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.10 Linux glibc 2.36+ x86-64 |
|
SHA-256 checksum How to use checksums |
86a3b27ad5fb1363ab68edf2b20f66ac168256d964aa36e9bbcb1ba9c73e1221
|
|
BLAKE2b-256 checksum How to use checksums |
a102fea094e594d51ccb564447d19de3496eaba2b3dc25c9b91511f36da31eed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|