Skip to main content

kglite-datasets

Docs PyPI crates.io License: MIT

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)

# Each call above returns a KnowledgeGraph — query the one you built:
g.cypher("MATCH (n) RETURN labels(n) AS labels, count(*) AS nodes ORDER BY nodes DESC 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.

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.

Badges and links point at the initial 0.1.0 release; there are no prior published versions.

License

MIT © Kristian dF Kollsgård

Metadata

Release files for kglite-datasets 0.1.27

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kglite-datasets 0.1.27
File Size Uploaded
kglite_datasets-0.1.27.tar.gz 300.6 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for kglite-datasets 0.1.27
File
kglite_datasets-0.1.27-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
kglite_datasets-0.1.27-cp310-abi3-manylinux_2_28_aarch64.whl CPython 3.10 abi3 Linux glibc 2.28+ ARM64 Details
kglite_datasets-0.1.27-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details
kglite_datasets-0.1.27-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details
kglite_datasets-0.1.27-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details

Total release size: 11.7 MB

Release files / kglite_datasets-0.1.27.tar.gz

Download URL kglite_datasets-0.1.27.tar.gz
Size 300.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1ed8485898768ba1e0a29501bcf100cefb17c3d5b80b907c3264400e6e0bf91f
BLAKE2b-256 checksum
How to use checksums
a9b9572c97a61c08cfcac4785072bd7a87556c6e438f2d056803c48a93ec7bce
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 Oct 6, 2026.

Transparency log

Release files / kglite_datasets-0.1.27-cp310-abi3-win_amd64.whl

Download URL kglite_datasets-0.1.27-cp310-abi3-win_amd64.whl
Size 2.3 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
c9e48b4abab674dad91016661e01f20c9bf61c4f1b8345a86d8af57bb8b6cc8e
BLAKE2b-256 checksum
How to use checksums
af9281cb707d1719548baf13176cd69a65e8f0157f7521d5d793e4e171946070
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 Oct 6, 2026.

Transparency log

Release files / kglite_datasets-0.1.27-cp310-abi3-manylinux_2_28_aarch64.whl

Download URL kglite_datasets-0.1.27-cp310-abi3-manylinux_2_28_aarch64.whl
Size 2.2 MB
Tags CPython 3.10 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
5473711ac02eff5dc96ded5d370a4bc3cadf4954c1e36e1b0d445fc3f1b232dc
BLAKE2b-256 checksum
How to use checksums
5fd42c8f12a2d8693850f28ec862c4553f4f86b5465b92f51687830750b016fd
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 Oct 6, 2026.

Transparency log

Release files / kglite_datasets-0.1.27-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL kglite_datasets-0.1.27-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.4 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
4edbabfc350bdba5f73a250ee85aa2f721c1312c7edc99bb796344f84e8a7ec1
BLAKE2b-256 checksum
How to use checksums
b302786086e2d29b4e13f0d0ba8c27f09963b7fb82de6dc5cf0a56e1e915a1a0
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 Oct 6, 2026.

Transparency log

Release files / kglite_datasets-0.1.27-cp310-abi3-macosx_11_0_arm64.whl

Download URL kglite_datasets-0.1.27-cp310-abi3-macosx_11_0_arm64.whl
Size 2.1 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
dc39e7c715d664528d685dda47bc2b928baf33e43a76bad29f06b0963fecd11b
BLAKE2b-256 checksum
How to use checksums
f03d62ad281d303ac8fcdde1c035f03928a0c2055b1bfa5c7a9478df89f46998
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 Oct 6, 2026.

Transparency log

Release files / kglite_datasets-0.1.27-cp310-abi3-macosx_10_12_x86_64.whl

Download URL kglite_datasets-0.1.27-cp310-abi3-macosx_10_12_x86_64.whl
Size 2.3 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
bba932da7bdd09be5d63c6ee7de5c32e27fc343ae02b1eed5da4533366982b82
BLAKE2b-256 checksum
How to use checksums
4c933d2240194ee41920cd55e1243a3c87ef00990d02ded9b7b1824302445f75
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 Oct 6, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.28

6 release files

This release

0.1.27 This release

6 release files

0.1.23

6 release files

0.1.22

6 release files

0.1.21

6 release files

0.1.20

6 release files

0.1.19

6 release files

0.1.18

6 release files

0.1.17

6 release files

0.1.12

6 release files

0.1.11

6 release files

0.1.10

6 release files

0.1.9

6 release files

0.1.8

6 release files

0.1.7

6 release files

0.1.6

6 release files

0.1.5

6 release files

0.1.4

6 release files

0.1.3

6 release files

0.1.2

6 release files

0.1.1

6 release files

0.1.0

5 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page