Fetch-build-cache dataset loaders for kglite — SEC EDGAR, Sodir (Norwegian Offshore Directorate), and Wikidata as queryable knowledge graphs.
Project description
kglite-datasets
Fetch-build-cache dataset loaders for kglite —
pull a public registry, build it into a queryable kglite KnowledgeGraph, cache
the result. Extracted from kglite::datasets into a standalone crate + wheel so
the kglite engine links zero network code.
Bundled sources:
- SEC EDGAR — quarterly index, bulk submissions, per-form fetchers, XBRL company facts.
- Sodir — Norwegian Offshore Directorate registry.
- Wikidata — dump download / cache orchestration (heavy ingestion stays engine-side).
Install
pip install kglite-datasets # ships the loaders + Python interface; pulls kglite
The single wheel bundles the Rust loaders and the Python interface; the graph
engine is reused from kglite (a runtime dependency), not forked.
Usage
Each loader fetches its source, builds it into a kglite KnowledgeGraph, and
caches the result under a workdir — returning a graph ready to query:
# SEC EDGAR — name a form, a company, a span:
from kglite_datasets.sec import SEC
g = SEC.fetch(workdir, "13F-HR", "TSLA", years=2, user_agent="Name email@dom")
# Sodir (Norwegian Offshore Directorate):
from kglite_datasets import sodir
g = sodir.open(workdir)
# Wikidata truthy dump (cache-managed download + N-Triples build):
from kglite_datasets import wikidata
g = wikidata.open(workdir)
g.cypher_query("MATCH (c:Company) RETURN c.name LIMIT 5")
Importing sec never drags in sodir/wikidata's optional stack (lazy
submodules), so the SEC path stays light.
Rust
Rust embedders use the crate-root modules directly (they mirror kglite's former
api::datasets::<loader> surface): kglite_datasets::{sec, sodir, wikidata}.
Status
Alpha — extraction complete. Followed the codingest handover playbook:
copy → prove parity → freeze goldens + bench baseline (while kglite still had its
in-tree copy) → kglite removed its loaders (2026-07-16). With the in-tree copy
gone, the frozen goldens (tests/goldens/) and the frozen bench baseline
(benchmarks/baseline.json) are the sole oracles carrying that verified-correct
authority forward. See dev-docs/plans/dataset-loader-extraction.md.
Development
make gate # CI-equivalent local gate: lint · build · test · determinism · bench-smoke
make lint # cargo fmt --check + clippy -D warnings (+ ruff if installed)
make develop # maturin develop — build the extension into the active venv
make pytest # offline Python suite (live-API tests behind the `live` marker)
The Rust workspace: crates/kglite-datasets (engine-free loaders) +
crates/kglite-datasets-py (PyO3 wrapper → the wheel). Loaders fetch → parse →
emit CSV/blueprint/dump; the graph build reuses kglite's from_blueprint /
load_ntriples. All tests are offline (recorded HTTP fixtures); live-API
smokes are opt-in.
Links
- Documentation: https://kglite-datasets.readthedocs.io
- PyPI: https://pypi.org/project/kglite-datasets/ (
pip install kglite-datasets) - crates.io: https://crates.io/crates/kglite-datasets (
cargo add kglite-datasets) - kglite engine: https://github.com/kkollsga/kglite
Badges and links point at the initial 0.1.0 release; there are no prior
published versions.
License
MIT © Kristian dF Kollsgård
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 Distributions
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 kglite_datasets-0.1.0-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: kglite_datasets-0.1.0-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0fc2dbe548d65b4683fedaca743dd43bd1ca2645263a1217631a5af15953472
|
|
| MD5 |
a904592d29c7ec865574d3187d84ccc6
|
|
| BLAKE2b-256 |
e3ce8b6f37a2087eb5f2ad29875ed7afe632407981227cc8f50e3465fe4125e1
|
Provenance
The following attestation bundles were made for kglite_datasets-0.1.0-cp310-abi3-win_amd64.whl:
Publisher:
release.yml on kkollsga/kglite-datasets
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kglite_datasets-0.1.0-cp310-abi3-win_amd64.whl -
Subject digest:
e0fc2dbe548d65b4683fedaca743dd43bd1ca2645263a1217631a5af15953472 - Sigstore transparency entry: 2185054423
- Sigstore integration time:
-
Permalink:
kkollsga/kglite-datasets@16347106cb7a9611816249f1b336f486c80518aa -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/kkollsga
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@16347106cb7a9611816249f1b336f486c80518aa -
Trigger Event:
push
-
Statement type:
File details
Details for the file kglite_datasets-0.1.0-cp310-abi3-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: kglite_datasets-0.1.0-cp310-abi3-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.10+, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b74e7a22a8387d71d2f29bcd6b837831f79a6b3492553366e2d9e34a6edf2a98
|
|
| MD5 |
3f73f4e9a286bbd4ab557987e0256889
|
|
| BLAKE2b-256 |
5f34a94ebc9dfaad9740342c8736f9dd84632a57c8e11c2568288a587b9b0c4a
|
Provenance
The following attestation bundles were made for kglite_datasets-0.1.0-cp310-abi3-manylinux_2_28_aarch64.whl:
Publisher:
release.yml on kkollsga/kglite-datasets
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kglite_datasets-0.1.0-cp310-abi3-manylinux_2_28_aarch64.whl -
Subject digest:
b74e7a22a8387d71d2f29bcd6b837831f79a6b3492553366e2d9e34a6edf2a98 - Sigstore transparency entry: 2185054295
- Sigstore integration time:
-
Permalink:
kkollsga/kglite-datasets@16347106cb7a9611816249f1b336f486c80518aa -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/kkollsga
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@16347106cb7a9611816249f1b336f486c80518aa -
Trigger Event:
push
-
Statement type:
File details
Details for the file kglite_datasets-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: kglite_datasets-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 2.0 MB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23b593889c13a95adc10a184ecc5cf483e951c66d98daae5ea5fe01aaec29d26
|
|
| MD5 |
7a302015a9dc1d16b596772f71dca252
|
|
| BLAKE2b-256 |
6264e568d2652272d28b7b6e40809024b517e8df0f6e09f89a76544a2910845a
|
Provenance
The following attestation bundles were made for kglite_datasets-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on kkollsga/kglite-datasets
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kglite_datasets-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
23b593889c13a95adc10a184ecc5cf483e951c66d98daae5ea5fe01aaec29d26 - Sigstore transparency entry: 2185054842
- Sigstore integration time:
-
Permalink:
kkollsga/kglite-datasets@16347106cb7a9611816249f1b336f486c80518aa -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/kkollsga
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@16347106cb7a9611816249f1b336f486c80518aa -
Trigger Event:
push
-
Statement type:
File details
Details for the file kglite_datasets-0.1.0-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: kglite_datasets-0.1.0-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8179228eff2e533a1d1273f07cb309356b980d7b79110dc2c7214871a67605f1
|
|
| MD5 |
33592996c5e07719651775f647bff016
|
|
| BLAKE2b-256 |
a37d40c271cdce19654dcd770c5e2ad68223f169c2258d4a021eb5129cb94b9c
|
Provenance
The following attestation bundles were made for kglite_datasets-0.1.0-cp310-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on kkollsga/kglite-datasets
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kglite_datasets-0.1.0-cp310-abi3-macosx_11_0_arm64.whl -
Subject digest:
8179228eff2e533a1d1273f07cb309356b980d7b79110dc2c7214871a67605f1 - Sigstore transparency entry: 2185054725
- Sigstore integration time:
-
Permalink:
kkollsga/kglite-datasets@16347106cb7a9611816249f1b336f486c80518aa -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/kkollsga
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@16347106cb7a9611816249f1b336f486c80518aa -
Trigger Event:
push
-
Statement type:
File details
Details for the file kglite_datasets-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: kglite_datasets-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.10+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aaf6891c66decca8f4a8131b35aa4ec5ef90da2194bdd34ab3b70abc0ee186ae
|
|
| MD5 |
f08d245baaf9396011603436ec70d9bb
|
|
| BLAKE2b-256 |
78fd7272abf80e82d0ee1a0f877502602abb83f6cab664130882280fb5b8dbb6
|
Provenance
The following attestation bundles were made for kglite_datasets-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl:
Publisher:
release.yml on kkollsga/kglite-datasets
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kglite_datasets-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl -
Subject digest:
aaf6891c66decca8f4a8131b35aa4ec5ef90da2194bdd34ab3b70abc0ee186ae - Sigstore transparency entry: 2185054608
- Sigstore integration time:
-
Permalink:
kkollsga/kglite-datasets@16347106cb7a9611816249f1b336f486c80518aa -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/kkollsga
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@16347106cb7a9611816249f1b336f486c80518aa -
Trigger Event:
push
-
Statement type: