Skip to main content

Stored-Relationship Mechanism research package: home of the Attested Multi-Source Collector/Catalog (AMSC) framework — Mathematical Provenance Record v1 on-disk format, descriptor TOML loader, six adapters (html/json/csv/netcdf/geotiff/literature), universal catalog bridge with register_attested_root cross-package overlay, and schema-gap-driven trigger. Native C dispatch (SHA-256 + NDJSON line reader) with pure-Python fallback for Pyodide / WASM.

Project description

srmech

Status: v0.2.0 on PyPI. The Task #201 build-out (rc3 → rc9, then v0.2.0rc1 → rc2 on TestPyPI) ships srmech at peer quality with ephemerides-spectral: native C dispatch for SHA-256 + NDJSON line reader, scikit-build-core + CMake build, cibuildwheel matrix (Linux/macOS/Windows × py3.10–3.14), pure-Python fallback for Pyodide / WASM, and JPL Power-of-Ten audit. Cross-package integration with ephemerides-spectral verified during the rc series. The earlier v0.1.0 shipped the pure-Python AMSC framework via the Task #197 refactor.

srmech (Stored-Relationship Mechanism) is a research package. It ships the Attested Multi-Source Collector/Catalog (AMSC) framework — the Mathematical Provenance Record (MPR) v1 on-disk format, descriptor TOML loader, six fetch/parse adapters, and a universal catalog bridge surface that downstream packages register their own catalog SSOTs with at import time. Native C for the SHA-256 attestation hash + NDJSON streaming reader; pure-Python fallback for Pyodide / WASM environments.

Why "Collector/Catalog"?

Both readings of AMSC are correct and the abbreviation is the same either way:

  • At collection time (T1 / T3 lifecycle stages — fetch / live-query / re-bake), the adapter classes are collecting attested rows from upstream archives. The framework's name describes what it's doing in that moment: Attested Multi-Source Collector.
  • After collection, the resulting NDJSON SSOTs are a catalog of attested data — committed into the package, registered into the universal bridge by downstream consumers, queryable through list_attested_sources() / get_attested_dataset(). The same framework name describes the post-collection state: Attested Multi-Source Catalog.

Both names abbreviate to AMSC. Pick whichever fits the lifecycle stage you're describing — the framework is one thing wearing two hats.

The package was extracted from ephemerides-spectral's _research/ mirror in Task #197 so that other spectral-research packages can consume the AMSC framework without depending on ephemerides-spectral. The catalog SSOTs themselves do NOT migrate — each downstream package registers its own root via srmech.amsc.catalog.register_attested_root(path, source=...).

Public API

from srmech.amsc import (
    MPRRecord, MPR_SCHEMA_VERSION, read_ndjson, write_ndjson, sha256_bytes,
    Descriptor, load_descriptor, discover_descriptors, render_template, descriptor_hash,
    list_attested_sources, get_attested_dataset, get_attested_descriptor,
    attestation_audit, register_attested_root, list_registered_roots,
    use_local_kernel, clear_local_kernel, get_local_kernel_state,
)

Cross-package catalog registration

The load-bearing API for cross-package use:

from pathlib import Path
from srmech.amsc import catalog as _amsc_catalog

_amsc_catalog.register_attested_root(
    Path(__file__).resolve().parent / "_research" / "attested",
    source="ephemerides-spectral",
)

Call this once at package-import time. Subsequent list_attested_sources(), get_attested_dataset(), etc. enumerate the union of srmech's own amsc/attested/ plus every registered root, in registration order. Duplicate source_key resolves first-registered-wins with a warning.

Adapter classes

Six adapters cover the realistic source space:

adapter class network?
html_scraper fetched yes (BeautifulSoup)
json_api fetched yes (paginated JSON)
csv_bulk fetched yes (CSV/XYZ bulk)
netcdf_grid fetched stub (gated behind extras)
geotiff_bbox fetched stub (gated behind extras)
literature_curated curated no (NDJSON committed directly)

The curated class never touches the network: rows are committed as data-only NDJSON and srmech synthesises full MPR attestation blocks at read time from each row's per-row DOI.

Install

pip install srmech                  # core (no jsonschema, no network adapters)
pip install srmech[validation]      # adds jsonschema for strict data-block validation
pip install srmech[collectors]      # adds requests + beautifulsoup4 for fetched adapters
pip install srmech[dev]             # everything

License

GPL-3.0-or-later. See LICENSE.

Project details


Download files

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

Source Distribution

srmech-0.3.0.tar.gz (97.2 kB view details)

Uploaded Source

Built Distributions

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

srmech-0.3.0-py3-none-any.whl (68.0 kB view details)

Uploaded Python 3

srmech-0.3.0-cp314-cp314-win_amd64.whl (78.0 kB view details)

Uploaded CPython 3.14Windows x86-64

srmech-0.3.0-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (72.8 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

srmech-0.3.0-cp314-cp314-macosx_11_0_arm64.whl (72.2 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

srmech-0.3.0-cp313-cp313-win_amd64.whl (77.6 kB view details)

Uploaded CPython 3.13Windows x86-64

srmech-0.3.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (72.8 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

srmech-0.3.0-cp313-cp313-macosx_11_0_arm64.whl (72.2 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

srmech-0.3.0-cp312-cp312-win_amd64.whl (77.6 kB view details)

Uploaded CPython 3.12Windows x86-64

srmech-0.3.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (72.8 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

srmech-0.3.0-cp312-cp312-macosx_11_0_arm64.whl (72.2 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

srmech-0.3.0-cp311-cp311-win_amd64.whl (77.6 kB view details)

Uploaded CPython 3.11Windows x86-64

srmech-0.3.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (72.8 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

srmech-0.3.0-cp311-cp311-macosx_11_0_arm64.whl (72.2 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

srmech-0.3.0-cp310-cp310-win_amd64.whl (77.6 kB view details)

Uploaded CPython 3.10Windows x86-64

srmech-0.3.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (72.8 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

srmech-0.3.0-cp310-cp310-macosx_11_0_arm64.whl (72.2 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file srmech-0.3.0.tar.gz.

File metadata

  • Download URL: srmech-0.3.0.tar.gz
  • Upload date:
  • Size: 97.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for srmech-0.3.0.tar.gz
Algorithm Hash digest
SHA256 38f85aff62627fb2fa9e0cc7dcee42e45c8435bc927a188d4ac7e5396fa7fcba
MD5 4268796d37ef9d7bbcc4a28c7d55485f
BLAKE2b-256 8c351272812f78bcf36398d35494109f2390dc74ed3b52a787c16d849ff292d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.3.0.tar.gz:

Publisher: srmech-publish.yml on lemonforest/mlehaptics

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

File details

Details for the file srmech-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: srmech-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 68.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for srmech-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 59b6ce00f0ead7fde84ebb94e8645bca08c3e938445428c4fbeec158c9cd0402
MD5 cad9778420410b287479ddbf7ae728d4
BLAKE2b-256 381b1f74d71012b02662f0a3a8cce9c0189fd36ac0e22b0008611f163717f9c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.3.0-py3-none-any.whl:

Publisher: srmech-publish.yml on lemonforest/mlehaptics

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

File details

Details for the file srmech-0.3.0-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: srmech-0.3.0-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 78.0 kB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for srmech-0.3.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 5e8e6561e0db03c96d5b77c6a249336667e71433ba97992f1bf3653ac3852386
MD5 c2d3fcd7a6d5a3365c3b729d3bbcd05b
BLAKE2b-256 11f27e93dd6afb3367a9594363076b5e7ff58f2bac5775fe618b133bc40b78fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.3.0-cp314-cp314-win_amd64.whl:

Publisher: srmech-publish.yml on lemonforest/mlehaptics

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

File details

Details for the file srmech-0.3.0-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for srmech-0.3.0-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 7e14ee4e05f486dfba46c140475dee445355946c66fa48a7af1a35b79fbbb50e
MD5 09ff94d20bd83e117b40979bb5b2334d
BLAKE2b-256 b9e681824993df7deca48fad6cf13ebfd6b1483a054f2a35941a4f38dc48930a

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.3.0-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl:

Publisher: srmech-publish.yml on lemonforest/mlehaptics

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

File details

Details for the file srmech-0.3.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for srmech-0.3.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e6605b235fbc4c65f49c61a080932a1c429aef467b7bd5b51f29beac2c5ae79a
MD5 12a7ba246ad9df17af62d07214cc536a
BLAKE2b-256 1f680ac360d4e4ebb6690ea4e0db8399e9e37e8b198a008331bb569dad40bc5b

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.3.0-cp314-cp314-macosx_11_0_arm64.whl:

Publisher: srmech-publish.yml on lemonforest/mlehaptics

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

File details

Details for the file srmech-0.3.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: srmech-0.3.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 77.6 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for srmech-0.3.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 61c326e15ac7a831b4bd3438477fca547c8f79be1ce1f13a4b982d33c369e4c4
MD5 06e11873d72701552bbeef2271904a48
BLAKE2b-256 0c77c67c9b42077cc083f08f0b2697b1f01dbfb83fbc50697c915395d395877a

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.3.0-cp313-cp313-win_amd64.whl:

Publisher: srmech-publish.yml on lemonforest/mlehaptics

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

File details

Details for the file srmech-0.3.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for srmech-0.3.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ac130e3758e3fbd3ddc113d2a1711d48f9d909658a4468ce2846d2cfc457580b
MD5 b771d24c77760734f3ec51c98dcc17d3
BLAKE2b-256 571095a053f27ea0813b68e169fbea82a4fc138d94fdb0ac799335f8ca358ddc

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.3.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl:

Publisher: srmech-publish.yml on lemonforest/mlehaptics

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

File details

Details for the file srmech-0.3.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for srmech-0.3.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 82ac73e13b5822c34f70f23cc57f084c0d05b39d072e2845785b63ab254b910e
MD5 baf098d0ce5acc4f8afb1717c3367a6a
BLAKE2b-256 9f815acab17465a195467c13e5ba9c77d747daf9a62c830e9273f6ca23799f54

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.3.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: srmech-publish.yml on lemonforest/mlehaptics

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

File details

Details for the file srmech-0.3.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: srmech-0.3.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 77.6 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for srmech-0.3.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 9fe5e78e32584d54a508e946f982a2a6d00b41502bf413d5fe157e392fa31e00
MD5 69c095bbcb9fc19c0b3c87edbe9b85cc
BLAKE2b-256 71f51e261aafc45691d150f21ee1d46d0d00368b7e70cd88fc2a0ae7170d4345

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.3.0-cp312-cp312-win_amd64.whl:

Publisher: srmech-publish.yml on lemonforest/mlehaptics

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

File details

Details for the file srmech-0.3.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for srmech-0.3.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 a5530a9687e99546738463522558cd2a932212a24a217ac82e39ea197f169255
MD5 2e38b63fda8f8da7f733bc82c6f7e734
BLAKE2b-256 7bd069ea29eaaba25f17b933b13a501a2f6ee879a854b5f865146ba0a94e8838

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.3.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl:

Publisher: srmech-publish.yml on lemonforest/mlehaptics

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

File details

Details for the file srmech-0.3.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for srmech-0.3.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b53ad37ee49e658bbb19231d9d30c57a590fee5d88057b7ceace402b80ecf14f
MD5 4dcb9683b467ce8c5573b031fcf27e9e
BLAKE2b-256 4f89121a0249a69f1fdec3826a66ae2f86151010507facec9f208775dbdc558b

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.3.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: srmech-publish.yml on lemonforest/mlehaptics

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

File details

Details for the file srmech-0.3.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: srmech-0.3.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 77.6 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for srmech-0.3.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 36bb209f83ab0aef33aad50039ae8853f3923068e4a0f18d963d420f2d929fb6
MD5 278f10c357277719ede774c91af3cb42
BLAKE2b-256 6bdab057c80d291e72c95fc6241144438f328efa6b64e613b73a20bee197f318

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.3.0-cp311-cp311-win_amd64.whl:

Publisher: srmech-publish.yml on lemonforest/mlehaptics

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

File details

Details for the file srmech-0.3.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for srmech-0.3.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4aed2726297f26e674f73e4984ad4c6bb4c637a423a5363fc5f10105a49f1aa7
MD5 19d5290df45b6f99c1b4dbc9d8236194
BLAKE2b-256 ec671bc7b2128a0565ebed04442ced9943d6e898f42b5e6d683b2eb2ed03d9a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.3.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl:

Publisher: srmech-publish.yml on lemonforest/mlehaptics

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

File details

Details for the file srmech-0.3.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for srmech-0.3.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7eb26d42f3819d0336c22117c9f6b43d73091fbf6003dcdaa2dc948696ab25f5
MD5 07ea0f9bf9aa4f5d83efa5add5c49bec
BLAKE2b-256 ccb116708ec19f3cdd115f393f67277d48c8f6115b873b5840b6ff33a63bb718

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.3.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: srmech-publish.yml on lemonforest/mlehaptics

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

File details

Details for the file srmech-0.3.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: srmech-0.3.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 77.6 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for srmech-0.3.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 5d892952190dee494eebb94917703b7abb10cbdfa36bc997055b8b71c526087f
MD5 9b13918c544cff2825189a56bc50a43c
BLAKE2b-256 e1d03a8ca0b3194345588090050b4de8a46b6bfe2b08b91ac1eeb462f20e9abf

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.3.0-cp310-cp310-win_amd64.whl:

Publisher: srmech-publish.yml on lemonforest/mlehaptics

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

File details

Details for the file srmech-0.3.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for srmech-0.3.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 38fbdbb47b3bd5fd30f7d48b30a22c5b197fd3c0022a3507a6c884baba3ba85d
MD5 1cafa37b9b2551e04530713077805a02
BLAKE2b-256 e15c5a86ac5a4674596b2b485b8f013eb6f946605022d2c39ebc15d9529f449a

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.3.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl:

Publisher: srmech-publish.yml on lemonforest/mlehaptics

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

File details

Details for the file srmech-0.3.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for srmech-0.3.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f311834c5068a3d635ab012bb8f941ca66640973258ae6889fc1c5930f25bcdc
MD5 705ac4f83bcd2f3b75969518eef3ea18
BLAKE2b-256 1ea13100b425755e500c088961c70d63af0f84687b92fe18d9fd981c0232e170

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.3.0-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: srmech-publish.yml on lemonforest/mlehaptics

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page