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)

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.

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

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

License

MIT © Kristian dF Kollsgård

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kglite_datasets-0.1.6.tar.gz (238.9 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

kglite_datasets-0.1.6-cp310-abi3-win_amd64.whl (1.9 MB view details)

Uploaded CPython 3.10+Windows x86-64

kglite_datasets-0.1.6-cp310-abi3-manylinux_2_28_aarch64.whl (1.9 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.28+ ARM64

kglite_datasets-0.1.6-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

kglite_datasets-0.1.6-cp310-abi3-macosx_11_0_arm64.whl (1.8 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

kglite_datasets-0.1.6-cp310-abi3-macosx_10_12_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

Details for the file kglite_datasets-0.1.6.tar.gz.

File metadata

  • Download URL: kglite_datasets-0.1.6.tar.gz
  • Upload date:
  • Size: 238.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for kglite_datasets-0.1.6.tar.gz
Algorithm Hash digest
SHA256 5f884a80288ec50abeb65a591bfd63e6bbdacf7284506d8de631eda47698517a
MD5 7b0e6c094735f65cb9a1552880ac3934
BLAKE2b-256 50bd47fdfa8ed91aa96ae395b070916ae1c3ee46b6d1cd86395ab31c9938f714

See more details on using hashes here.

Provenance

The following attestation bundles were made for kglite_datasets-0.1.6.tar.gz:

Publisher: release.yml on kkollsga/kglite-datasets

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kglite_datasets-0.1.6-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for kglite_datasets-0.1.6-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 d1743b798ad7c9194159e5f09db11d5eb1dd82b00edc7230db8a0390daa6f2b7
MD5 3ed8bd7fc7e06cf6fef737e469acc62c
BLAKE2b-256 2da7dd6e1d92aa882924b5bbb18371769b68ffc1a4794d9a495f01250f97af41

See more details on using hashes here.

Provenance

The following attestation bundles were made for kglite_datasets-0.1.6-cp310-abi3-win_amd64.whl:

Publisher: release.yml on kkollsga/kglite-datasets

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kglite_datasets-0.1.6-cp310-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for kglite_datasets-0.1.6-cp310-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 88660d3b4904f92ac8198018d69189af2e3601237aa6db7a1a0e3495c6f17c04
MD5 2cb89fadef59b0448b91914d471ce997
BLAKE2b-256 ebada7cd7efca6d788b46cca093523dc825a476f0f7e9bbf04392475eedbb178

See more details on using hashes here.

Provenance

The following attestation bundles were made for kglite_datasets-0.1.6-cp310-abi3-manylinux_2_28_aarch64.whl:

Publisher: release.yml on kkollsga/kglite-datasets

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kglite_datasets-0.1.6-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for kglite_datasets-0.1.6-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6057ba1e03e004913a89c15b383f74060a6d4e29c94e27e9c1e312af17dbb19f
MD5 830f30a7e6bd85dbf86ffc1369357813
BLAKE2b-256 92e19e7bbac4db7d0eb51436f8938f78045b8daa356bb4f90a091bf4d543ae88

See more details on using hashes here.

Provenance

The following attestation bundles were made for kglite_datasets-0.1.6-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on kkollsga/kglite-datasets

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kglite_datasets-0.1.6-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for kglite_datasets-0.1.6-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9c670124a22bc750a594c7f5c99c4647408d363280d1884f691a100fab3976a1
MD5 85f18aeea73fa5b91bceb1d5f37de59b
BLAKE2b-256 ffbd5af4e48cd1779d54328f018749bec0b8e08f2b82b45de38f9172d73590f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for kglite_datasets-0.1.6-cp310-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on kkollsga/kglite-datasets

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kglite_datasets-0.1.6-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for kglite_datasets-0.1.6-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 90588d2448f2373a30379416d4e3ba607cb807b9f8b50d3f4df1831095d97a2a
MD5 60edfc67e569700e73a4ccf8efe86025
BLAKE2b-256 8560955809ee6cdc868ac0ff515548368da4d7853cc8688894daa7436dbb8782

See more details on using hashes here.

Provenance

The following attestation bundles were made for kglite_datasets-0.1.6-cp310-abi3-macosx_10_12_x86_64.whl:

Publisher: release.yml on kkollsga/kglite-datasets

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.15

6 files

0.1.14

6 files

0.1.13

6 files

0.1.12

6 files

0.1.11

6 files

0.1.10

6 files

0.1.9

6 files

0.1.8

6 files

0.1.7

6 files

This release

0.1.6 This release

6 files

0.1.5

6 files

0.1.4

6 files

0.1.3

6 files

0.1.2

6 files

0.1.1

6 files

0.1.0

5 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