Read and query compressed .egg database files
Project description
eggdb
Read and query compressed .egg database files from Python.
EggDB converts SQLite databases into highly compressed columnar .egg files.
This package lets you query them directly — no decompression step needed.
Install
pip install eggdb
Usage
import eggdb
# Open an .egg file
egg = eggdb.open("data.egg")
# List tables
print(egg.tables) # ['users', 'orders', ...]
# File summary
print(egg.summary())
# {'file_size': 176000000, 'original_size': 1500000000, 'compression_ratio': '8.5x', ...}
# Query with SQL
rows = egg.query("SELECT * FROM users WHERE status = 'active' LIMIT 10")
for row in rows:
print(row) # {'id': 1, 'name': 'Alice', 'status': 'active'}
# Query with YQL (a friendlier syntax)
rows = egg.query("count orders by status")
for row in rows:
print(row) # {'status': 'shipped', 'count': 4200}
# Column metadata
cols = egg.columns("users")
for col in cols:
print(f"{col['name']}: {col['encoding']}") # id: Delta, name: Dict, ...
Encrypted files
egg = eggdb.open("encrypted.egg", passphrase="secret")
rows = egg.query("SELECT * FROM users LIMIT 5")
Development
To build from source and test locally:
cd python
python3 -m venv .venv
source .venv/bin/activate
pip install maturin
maturin develop --release
Then run the test script from the repo root with any .egg file:
python test_python.py path/to/file.egg
This prints a full summary (tables, row counts, schema, encoding details, sample data) and drops into an interactive SQL/YQL query prompt:
=== Summary ===
Tables: 11
Total rows: 1,497,017
Ratio: 8.5x
=== Tables ===
Book: 2,601 rows
Chapter: 46,104 rows
ChapterVerse: 1,219,609 rows
...
=== Interactive Query ===
Enter SQL or YQL queries (empty line to quit):
> SELECT count(*) AS cnt FROM ChapterVerse WHERE bookId = 'ROM'
{'cnt': 9320}
(1 row)
> count Book by translationId sort count desc limit 5
{'translationId': 'eng_abt', 'count': 84}
...
Requirements
- Python 3.9+ (CPython only)
- Platforms: Linux (x86_64, aarch64), macOS (Apple Silicon, Intel)
- Memory: The entire
.eggfile is loaded into memory when opened. For a 300 MB.eggfile, expect ~300 MB of RAM usage. Plan accordingly for multi-GB files.
How it works
Under the hood, eggdb uses a SQLite virtual table extension compiled from Rust.
When you call query(), it:
- Opens an in-memory SQLite connection
- Registers the egg virtual table module
- Creates virtual tables pointing to your
.eggfile - Runs your query through SQLite's optimizer
- Only decompresses the columns you actually reference
This means joins, aggregations, window functions — everything SQLite supports — works out of the box. Column pruning ensures only referenced columns are decompressed.
License
MIT OR Apache-2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file eggdb-0.1.0.tar.gz.
File metadata
- Download URL: eggdb-0.1.0.tar.gz
- Upload date:
- Size: 84.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e33184c5d3f1746d231f8e74ec4c350f4adadea64838643d5a87188fb719832
|
|
| MD5 |
8a5f86bc178e49ac2d81b202b65a7c94
|
|
| BLAKE2b-256 |
355a3f108f9f2ac381c781b1d828742e6d4abaaa908efbcdb4abdd7240f2b39b
|
Provenance
The following attestation bundles were made for eggdb-0.1.0.tar.gz:
Publisher:
publish-python.yml on Nazareneism/eggdb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
eggdb-0.1.0.tar.gz -
Subject digest:
3e33184c5d3f1746d231f8e74ec4c350f4adadea64838643d5a87188fb719832 - Sigstore transparency entry: 943131874
- Sigstore integration time:
-
Permalink:
Nazareneism/eggdb@0af11b825c958997f4320cf998585ca33d6da4ce -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Nazareneism
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@0af11b825c958997f4320cf998585ca33d6da4ce -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file eggdb-0.1.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: eggdb-0.1.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 1.5 MB
- Tags: PyPy, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54aecca1a2656d5eb6ecbf8d46c04162a4c04710ef886427a25c1f1e1ccfc2d5
|
|
| MD5 |
275add7ef6d8adbc65a947ac7b6feb85
|
|
| BLAKE2b-256 |
49418f7e81e745ea7a1c1e802675da01e39bf804036e934dae6256127a095da5
|
Provenance
The following attestation bundles were made for eggdb-0.1.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
publish-python.yml on Nazareneism/eggdb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
eggdb-0.1.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
54aecca1a2656d5eb6ecbf8d46c04162a4c04710ef886427a25c1f1e1ccfc2d5 - Sigstore transparency entry: 943131883
- Sigstore integration time:
-
Permalink:
Nazareneism/eggdb@0af11b825c958997f4320cf998585ca33d6da4ce -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Nazareneism
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@0af11b825c958997f4320cf998585ca33d6da4ce -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file eggdb-0.1.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: eggdb-0.1.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 1.5 MB
- Tags: PyPy, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1e91c73e619fd6cabd39282449d2cd9292a368886bda81dd46d721c2d658034
|
|
| MD5 |
e92c07b7ccd31a71398323955f0af4b3
|
|
| BLAKE2b-256 |
8a3b38269ce2a149a7c2e6f0288f8e95a431daf11339d5000df289a6641fc50a
|
Provenance
The following attestation bundles were made for eggdb-0.1.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
publish-python.yml on Nazareneism/eggdb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
eggdb-0.1.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
a1e91c73e619fd6cabd39282449d2cd9292a368886bda81dd46d721c2d658034 - Sigstore transparency entry: 943131877
- Sigstore integration time:
-
Permalink:
Nazareneism/eggdb@0af11b825c958997f4320cf998585ca33d6da4ce -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Nazareneism
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@0af11b825c958997f4320cf998585ca33d6da4ce -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file eggdb-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: eggdb-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7cd59914ef95e1cf9b62c4d2dc54973d37ba85c48ffad971323c3172623ee1bf
|
|
| MD5 |
219a5ae01dd8ae54de7c0faaad5d9dec
|
|
| BLAKE2b-256 |
9104c0285c34aaaff0469a78b074f7f1854bf60f898b8b35f9d6cf374982b633
|
Provenance
The following attestation bundles were made for eggdb-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
publish-python.yml on Nazareneism/eggdb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
eggdb-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
7cd59914ef95e1cf9b62c4d2dc54973d37ba85c48ffad971323c3172623ee1bf - Sigstore transparency entry: 943131881
- Sigstore integration time:
-
Permalink:
Nazareneism/eggdb@0af11b825c958997f4320cf998585ca33d6da4ce -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Nazareneism
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@0af11b825c958997f4320cf998585ca33d6da4ce -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file eggdb-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: eggdb-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
245189c04bdd7858a1a126d947134db46df311aff8639e9c8b1bdf4d51f8e477
|
|
| MD5 |
251b17908fe429a667dc499c63aa8451
|
|
| BLAKE2b-256 |
88f9dc4a97774d6cd32a9bde12152751ac7dc267b15df9fa536f6b10d005f489
|
Provenance
The following attestation bundles were made for eggdb-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
publish-python.yml on Nazareneism/eggdb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
eggdb-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
245189c04bdd7858a1a126d947134db46df311aff8639e9c8b1bdf4d51f8e477 - Sigstore transparency entry: 943131885
- Sigstore integration time:
-
Permalink:
Nazareneism/eggdb@0af11b825c958997f4320cf998585ca33d6da4ce -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Nazareneism
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@0af11b825c958997f4320cf998585ca33d6da4ce -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file eggdb-0.1.0-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: eggdb-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d394b342e439c9f81863c3a7489e0be0d96677d3fca981b9620b332c6855eea
|
|
| MD5 |
80341a7a64924af48f52ecf3fae424e0
|
|
| BLAKE2b-256 |
ac3bef58e876e229ffc56bda3097283429d196b0927f72bc277dde990c4d963a
|
Provenance
The following attestation bundles were made for eggdb-0.1.0-cp39-abi3-macosx_11_0_arm64.whl:
Publisher:
publish-python.yml on Nazareneism/eggdb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
eggdb-0.1.0-cp39-abi3-macosx_11_0_arm64.whl -
Subject digest:
0d394b342e439c9f81863c3a7489e0be0d96677d3fca981b9620b332c6855eea - Sigstore transparency entry: 943131884
- Sigstore integration time:
-
Permalink:
Nazareneism/eggdb@0af11b825c958997f4320cf998585ca33d6da4ce -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Nazareneism
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@0af11b825c958997f4320cf998585ca33d6da4ce -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file eggdb-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: eggdb-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.9+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cfe2cdd075519c5eb4bb4fa70c3c4c35efbc306504fa55ad0b4cab3739b2b5b
|
|
| MD5 |
fb4adf3bfc29e435e06043b515531aa1
|
|
| BLAKE2b-256 |
63e11864a2c02e509bcb1dac8728dbe79981c3d1cb0e16194c913a238c987eff
|
Provenance
The following attestation bundles were made for eggdb-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl:
Publisher:
publish-python.yml on Nazareneism/eggdb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
eggdb-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl -
Subject digest:
6cfe2cdd075519c5eb4bb4fa70c3c4c35efbc306504fa55ad0b4cab3739b2b5b - Sigstore transparency entry: 943131879
- Sigstore integration time:
-
Permalink:
Nazareneism/eggdb@0af11b825c958997f4320cf998585ca33d6da4ce -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Nazareneism
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@0af11b825c958997f4320cf998585ca33d6da4ce -
Trigger Event:
workflow_dispatch
-
Statement type: