equilibrator-cache-data
The mini compound cache and accession index that equilibrator-cache uses to answer lookups without downloading the full ~1.3 GB database.
It carries two files and no code beyond the three constants needed to locate them:
| file | size | contents |
|---|---|---|
mini_compounds.sqlite |
~62 MB | every compound in the KEGG and BiGG namespaces (~41k of ~694k), with their thermodynamic data and all their synonyms |
accessions.idx |
~6 MB | a Bloom filter over every accession in the full database |
Together they compress to roughly 24 MB in a wheel.
The index is what lets a miss against the mini cache be classified without a large transfer: it has no false negatives, so an identifier it rejects is genuinely unknown and the lookup can fail fast. Only an identifier it accepts, and that the mini cache does not hold, triggers the full download.
Usage
Installing this package is all that is needed; equilibrator-cache finds it on
its own.
import equilibrator_cache_data
equilibrator_cache_data.MINI_COMPOUND_CACHE_PATH
equilibrator_cache_data.ACCESSION_INDEX_PATH
equilibrator_cache_data.is_available()
Why this is a separate project
equilibrator-cache releases on every tag. If the databases rode inside it,
every patch release would upload ~24 MB and every user would re-download it for
a one-line code fix. Versioning the data separately means it is fetched once and
reused across many code releases. Its version therefore tracks the data: bump
it only when the databases are rebuilt.
Building
The databases are build artifacts and are not in git. Rebuild them from a local
copy of the full cache, which equilibrator-cache will have downloaded to
~/.cache/equilibrator/compounds.sqlite:
uv sync --group build
python scripts/build_mini_cache.py ~/.cache/equilibrator/compounds.sqlite
python -m build
The build script validates its own output: it checks that the index has no false negatives against the full cache, that no rows were orphaned by the compound filter, and that microspecies and synonyms both survived.
Building needs equilibrator-cache installed, for the accession index writer.
That is a development-time dependency only — the published wheel has no runtime
dependencies, so the two projects do not form an install-time cycle. Note that
the writer is not in the 0.7.1 release on PyPI, so the build group pins the
minidb branch until the tiered cache ships.
Releasing
Tagging runs build:databases, which downloads the full cache from Zenodo,
rebuilds both databases, and checks that the wheel it produced is not the empty
package a plain checkout would give. publish:pypi then uploads it, and is
manual: a version number can never be reused once taken.
Publishing uses PyPI trusted publishing, so no API token is stored in GitLab.
It needs a trusted publisher registered on PyPI for namespace equilibrator,
project equilibrator-cache-data, pipeline file .gitlab-ci.yml and
environment pypi.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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 equilibrator_cache_data-0.1.0.tar.gz.
File metadata
- Download URL: equilibrator_cache_data-0.1.0.tar.gz
- Upload date:
- Size: 24.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.14.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84b1b48b36971c97c22c8b8aff46d9c7495510d4a0c611131a3f9904e4b3f3eb
|
|
| MD5 |
2d7678ceff6015d5be6a6d0a8a6ea4f4
|
|
| BLAKE2b-256 |
6e206643d68f5ebe9b0f77dde73ae1dac4f26aaeebaca29e3698d6147711baa2
|
File details
Details for the file equilibrator_cache_data-0.1.0-py3-none-any.whl.
File metadata
- Download URL: equilibrator_cache_data-0.1.0-py3-none-any.whl
- Upload date:
- Size: 24.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.14.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
408081f2db0f1db585afe51bea06dfc2e41281c13ee5d573665ebfdb0470fcf2
|
|
| MD5 |
05566433f6e55ccbce17c0f1078e29c2
|
|
| BLAKE2b-256 |
ec95f14d5b36001cad9d51226da0ee63acb9a4d28f3b00f57c6210b1456acd4d
|