@@ -16,6 +16,7 @@ A lightweight Python client around [sqlite-vec](https://github.com/asg017/sqlite
1616- ** Filtering helpers** : Fetch by ` rowid ` , ` text ` , or ` metadata ` .
1717- ** Pagination & sorting** : List records with ` limit ` , ` offset ` , and order.
1818- ** Bulk operations** : Efficient ` update_many() ` , ` get_all() ` generator, and transaction support.
19+ - ** Backup tooling** : High-level ` backup() ` and ` restore() ` helpers for disaster recovery workflows.
1920
2021## Requirements
2122- Python 3.9+
@@ -97,6 +98,20 @@ client.import_from_json("backup.jsonl")
9798
9899See [ examples/export_import_example.py] ( examples/export_import_example.py ) for more examples.
99100
101+ ### Quick backup & restore helpers
102+
103+ ``` python
104+ # Create a JSONL backup
105+ client.backup(" backup.jsonl" )
106+
107+ # Restore later (optionally skip duplicates)
108+ client.restore(" backup.jsonl" , skip_duplicates = True )
109+
110+ # Work with CSV
111+ client.backup(" backup.csv" , format = " csv" , include_embeddings = True )
112+ client.restore(" backup.csv" , format = " csv" , skip_duplicates = True )
113+ ```
114+
100115## Metadata Filtering
101116
102117Efficiently filter records by metadata fields using SQLite's JSON functions:
@@ -227,10 +242,11 @@ pytest -m unit # Unit tests only
227242pytest -m integration # Integration tests only
228243```
229244
230- ** Run with coverage report :**
245+ ** Coverage (terminal + XML for CI) :**
231246``` bash
232- pytest --cov=sqlite_vec_client --cov-report=html
247+ pytest --cov=sqlite_vec_client --cov-report=term-missing --cov-report=xml
233248```
249+ The CI workflow uploads the generated ` coverage.xml ` as an artifact for downstream dashboards.
234250
235251** Run specific test file:**
236252``` bash
@@ -282,6 +298,7 @@ Edit [benchmarks/config.yaml](benchmarks/config.yaml) to customize:
282298- [ CONTRIBUTING.md] ( CONTRIBUTING.md ) - Contribution guidelines
283299- [ CHANGELOG.md] ( CHANGELOG.md ) - Version history
284300- [ TESTING.md] ( TESTING.md ) - Testing documentation
301+ - [ Docs site (MkDocs)] ( docs/index.md ) - Serve locally with ` mkdocs serve `
285302- [ Examples] ( examples/ ) - Usage examples
286303 - [ basic_usage.py] ( examples/basic_usage.py ) - Basic CRUD operations
287304 - [ metadata_filtering.py] ( examples/metadata_filtering.py ) - Metadata filtering and queries
0 commit comments