Storq logoStorq
docsgetting-started.md
Edit / View on GitHub

Install and Use Storq

Source repository: https://github.com/kingmon6996/Storq

Storq is used through its Python SDK. Install the published Python distribution with pip; the C++ implementation is included internally in supported wheels and is not a separate user API.

Install

Install the storq distribution:

shell
python -m pip install storq

For visualization and PDF export support, install the optional dependencies:

shell
python -m pip install "storq[full-reporting]"

Wheels are built for CPython 3.10–3.14 on Linux, Windows, and macOS. Prefer a wheel installation; no build tools are needed when pip can install a compatible prebuilt wheel. The release workflow publishes the storq distribution.

Verify the installation

python
import storq
import storq._native

print(storq.__file__)
print(storq._native.__file__)
assert callable(storq.inspect_format)

The native module path should end with the platform extension suffix (such as .pyd on Windows or .so on Linux/macOS). Native operations are unavailable if Python loaded the source fallback instead.

For examples of the other supported APIs, see the Python API reference, workflow and test guide, and reports and benchmarks guide.

Inspect a SQLite database

python
import storq

result = storq.inspect_format("sample.sqlite")
print(result.format)
print(result.page_size, result.page_count)
print(result.header_valid, result.structure_valid)

This Python API performs basic read-only format inspection. It does not modify the file or expose all the lower-level analysis functions in Storq's internal implementation.

Create and use a Storq file

The Storq format is experimental and should not be used as a production database. Create a file, then open a record manager for it:

python
import storq

path = "demo.storq"
storq.create_storq_database(path, 4096)

records = storq.RecordManager(path)
records.open()
try:
    record_id = records.insert({
        "name": "sample",
        "active": True,
        "score": 12.5,
        "notes": None,
        "blob": b"\x01\x02",
    })
    print(record_id, records.read(record_id))
finally:
    records.close()

Supported record values are null, boolean, integer, float, string, and bytes. Record operations are not transactions and are not automatically journaled.

Explore the SDK