Spare Cores Navigator Data
The Spare Cores Navigator Data is a Python package to make it easy to access the latest version of the Spare Cores Navigator data via a SQLite database file. This database file is compiled from an automatically downloaded, compressed SQLite database dump, periodically updated by a background thread.
Installation
Stable version from PyPI:
pip install sparecores-data
Most recent version from GitHub:
pip install "sparecores-data @ git+https://git@github.com/SpareCores/sc-data.git"
Usage
For easy access to the most recent version of the SQLite database file, import
the db object of the sc_data Python package, which runs an updater thread
in the background to keep the SQLite file up-to-date:
from sc_data import db
print(db.path)
The database is cached locally in a persistent directory and automatically updated when needed. On import, the package:
- Checks the local cache for a valid (non-stale) database
- If cached and fresh, uses it immediately
- Otherwise, downloads the latest version from our CDN
The cache is stored in a platform-specific location:
- Linux:
$XDG_CACHE_HOME/sparecores-data/or~/.cache/sparecores-data/ - macOS:
~/Library/Caches/sparecores-data/ - Windows:
%LOCALAPPDATA%/sparecores-data/
To enforce waiting for the update to complete, you can use the updated event:
db.updated.wait()
Command-line interface
To get the most recent version of the SQLite database file without writing any Python code, e.g. for use in other tools, run:
sc-data download /path/to/sc-data.db
This downloads and imports the data into the cache as described above, then copies the resulting SQLite file to the given path -- overwriting an already existing file, and creating missing parent directories.
Run sc-data download --help for the available options, e.g. --db-url,
--timeout, or --no-update to use the cached file without checking for a
newer version.
Configuration
The package comes with the following set of default parameters, which can be overridden by builtins or environment variables:
| Configuration | Description | Default Value | Builtin Name | Environment Variable |
|---|---|---|---|---|
| Custom Database Path | Custom file path for the database (bypasses cache) | - | sc_data_db_path |
SC_DATA_DB_PATH |
| Disable Updates | Whether to disable automatic updates | False |
sc_data_no_update |
SC_DATA_NO_UPDATE |
| Database URL | The URL of the most recent version of the database file (when unset, the default URL is used) | https://cdn.sparecores.net/sc-data/sc-data-all.sql.xz |
sc_data_db_url |
SC_DATA_DB_URL |
| HTTP Timeout | The timeout in seconds for downloading the database file | 30 |
sc_data_http_timeout |
SC_DATA_HTTP_TIMEOUT |
| Refresh Interval | The interval in seconds to check for database updates | 600 |
sc_data_db_refresh_seconds |
SC_DATA_DB_REFRESH_SECONDS |
| Suppress Data License Notice | Suppress the data license notice printed to stderr | - | sc_data_no_license_notice |
SC_DATA_NO_LICENSE_NOTICE |
Note: Setting SC_DATA_DB_PATH disables caching and uses the specified file directly.
Licensing
The source code of the sparecores-data package is released under the
MPL 2.0 license.
The default SQLite database dump file downloaded at runtime is published under the Business Source License 1.1 (BSL 1.1) license.
Details -- including the publisher, timestamped release date, license type,
additional usage terms, and a link to the full license text -- is available in
the _metadata table of the database, and printed to the stderr by default
on every Data instantialization.
References
Metadata
Release files for sparecores-data 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sparecores_data-0.5.1.tar.gz | 23.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sparecores_data-0.5.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 41.9 kB
Release files / sparecores_data-0.5.1.tar.gz
| Download URL | sparecores_data-0.5.1.tar.gz |
|---|---|
| Size | 23.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f95aee49850ef7ca269c451f764f089e1a45d32b9e7b1ac8f69be564c78f6f23
|
|
BLAKE2b-256 checksum How to use checksums |
a72552988f22beb6455bdc2e1c100033edecd806d8e10e7754e5e20b7edfc99c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.
Transparency logRelease files / sparecores_data-0.5.1-py3-none-any.whl
| Download URL | sparecores_data-0.5.1-py3-none-any.whl |
|---|---|
| Size | 18.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c285ca0ef3fea203d0cb0425bcffb36e6c676e9784ecae8296953b9129814b54
|
|
BLAKE2b-256 checksum How to use checksums |
1851e7b80a487113846a6fcb818c3b4470e101528466f153831bf18b5a4eeb9a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.
Transparency log