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.2.0.tar.gz (77.5 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.2.0-py3-none-any.whl (52.6 kB view details)

Uploaded Python 3

srmech-0.2.0-cp314-cp314-win_amd64.whl (62.4 kB view details)

Uploaded CPython 3.14Windows x86-64

srmech-0.2.0-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (57.4 kB view details)

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

srmech-0.2.0-cp314-cp314-macosx_11_0_arm64.whl (56.7 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

srmech-0.2.0-cp313-cp313-win_amd64.whl (62.1 kB view details)

Uploaded CPython 3.13Windows x86-64

srmech-0.2.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (57.4 kB view details)

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

srmech-0.2.0-cp313-cp313-macosx_11_0_arm64.whl (56.7 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

srmech-0.2.0-cp312-cp312-win_amd64.whl (62.1 kB view details)

Uploaded CPython 3.12Windows x86-64

srmech-0.2.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (57.4 kB view details)

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

srmech-0.2.0-cp312-cp312-macosx_11_0_arm64.whl (56.7 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

srmech-0.2.0-cp311-cp311-win_amd64.whl (62.1 kB view details)

Uploaded CPython 3.11Windows x86-64

srmech-0.2.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (57.4 kB view details)

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

srmech-0.2.0-cp311-cp311-macosx_11_0_arm64.whl (56.7 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

srmech-0.2.0-cp310-cp310-win_amd64.whl (62.1 kB view details)

Uploaded CPython 3.10Windows x86-64

srmech-0.2.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (57.4 kB view details)

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

srmech-0.2.0-cp310-cp310-macosx_11_0_arm64.whl (56.7 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for srmech-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8f52fb1202a9e78ee955337653d933d3344adb8578b035c26c3303451b02aadc
MD5 b14774e0249e5136b26550399ca0ee78
BLAKE2b-256 941f78f5d1e4ad0f9bae6012c463fcdc37ad5269555b804e817f589bc9a5559e

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.2.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.2.0-py3-none-any.whl.

File metadata

  • Download URL: srmech-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 52.6 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 46eca5abb08895d6e70169db7cd18f8909382f73fdd297ed0ebda1208d837f32
MD5 ff4541f8f1fc5f2f76a370384c4d13a3
BLAKE2b-256 255662556db88e557c515c3f0fe5bea452031c54a393677274b5e638acd1d5ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.2.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.2.0-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: srmech-0.2.0-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 62.4 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.2.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 2bf4464a78af6f65ddce52e7ccfbe9a28a721e68600c727d4f8dd9a24ee5d1d2
MD5 5caea04e9f263ee82d22790fbef61697
BLAKE2b-256 54447c604a166c19c314d14aa60bfbe4facbfe3eda905deb89cbca6e0af20ffe

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.2.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.2.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.2.0-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 b7bc3198d59ced97596cf4533c57389fd4d89f162a27d4c751748e6dd90cca84
MD5 8903139213e38fa584ac4cf13d92e147
BLAKE2b-256 74d49fac5472a3e58f62d0863048b74d8c33f2f69144ff1018c4994a49bb17fc

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.2.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.2.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for srmech-0.2.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6978fcc9fce2764fb8a90b685cc44256c32c7d6f3efcbc00e6964b72d54d3ecb
MD5 1cd814eb15083511b117b9a05c01f7a1
BLAKE2b-256 ce62cdabacfa9921b5d37c6eae1e25e7f61b21be71b0df79be615fadaea5871a

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.2.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.2.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: srmech-0.2.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 62.1 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.2.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 4c991a3f0b7302e26fe61a731b1e1e6a6cf60bedf784aa065eb2fccd67f95565
MD5 fe84fb40ab335a771323b9d342bf832e
BLAKE2b-256 07ae907b2d39f168849cfd7bee0ad6f0d15cb8df8ab51d175667076bd1512648

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.2.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.2.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.2.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 a70ba6104231aee1a18f09c52337c5a4d41a14440bf131ad69e94fedba5a4313
MD5 39960c53b4b564b789f1b6b5159e2975
BLAKE2b-256 040d836376ab9f03e4eed760c14ed2f65d048245f38644248f04830a3741b94e

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.2.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.2.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for srmech-0.2.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e97d11251b60225ab8cdcb95e7258f3fab1bf4083972ad1e8154fffeb9c26c16
MD5 01b120dedfee07b53ad0cb9deabf35e5
BLAKE2b-256 9f2b491fca23645da6e22492f646ecdf0e33cc70e2cf424912890d418544c2ca

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.2.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.2.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: srmech-0.2.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 62.1 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.2.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e5b3d7d4fa9d99d785d0b4bfb7f4a74a19c958ef7a0a5aec3fd090ce1c96f86d
MD5 c67879c6076fc2fcc24c7f58bb8883d5
BLAKE2b-256 195715d3366f554963d6ee637a0595b32f26333e0dff9d764cf2e9d74e031cc5

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.2.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.2.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.2.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 0a09fd5dd13f72de4a5c0045931a3a5d43e8d24f0916105998b1d8da1a8c4568
MD5 3d36d0edaa32ac5e27e5f2a9c6bdf615
BLAKE2b-256 99b20e069e5cd96b5676134536cecbfd2b5a74df5cbc25427d58df0a311168c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.2.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.2.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for srmech-0.2.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 62daa514a0d5d7dc75607f4e34774401ae067dd69babed11a0cf8ff7f53f48f8
MD5 b8217eae1e5a95018da68f6c7238f90a
BLAKE2b-256 33e526b468c32ec0abbbceefe46587b2e0654288f675fcf659ecd1a70a429b0b

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.2.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.2.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: srmech-0.2.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 62.1 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.2.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 0d920de58f9d64b5cc8fbefc042d7815061883bdf7f91f93037d66036fe53c53
MD5 4415570bf1945920d8403034a7e3159b
BLAKE2b-256 b93279453acb510857f48a535c4c251977126e51077aed0f9d050805f17ae4a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.2.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.2.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.2.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 16d3c69fc9e92bd78774ae5e83288bcc67e71d1dab2a0bb81c0908084df66240
MD5 820e58f1d17058520698bcfe908b8a6c
BLAKE2b-256 b9080303500d9624ba3213c216d2c95ea9c89c7992454e302f997a6a2aca69f5

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.2.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.2.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for srmech-0.2.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fab2a90e76d0e54d86daf3977ad5af641554b84417a9cf745844d5043aafd504
MD5 1b6898ab4f742d4ca83a11c250cf69b7
BLAKE2b-256 80f64a0f675aa1d594bee8e4fa18bf0c35fefaca4094949e720d2825010d18a8

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.2.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.2.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: srmech-0.2.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 62.1 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.2.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 3625b0e9661860aeafe6f0e6988bde814fd07c85ae1de5cff41ea0f297d0edaf
MD5 2c2c162810abaad86c1652cb8d073a7f
BLAKE2b-256 c7562c3473d4f0997a2108107513a4e34e364a03dde9df153e7533054f9b451f

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.2.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.2.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.2.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ec6d8a552543efd4575f0e518c3ff6133cfef3acb822075d74e0f472b53727c3
MD5 bc3e3fb20624fb35ae7220e4282404c0
BLAKE2b-256 4c696a9a0cb2132beb4e3a8c27c50b8102984f5b0bb7162e1bb5c5284171b891

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.2.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.2.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for srmech-0.2.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 53841f880d49732138a24b9f403e46330bc6f4eb2fe7f09a2ec542ea38e8756c
MD5 b9f55b893750e73d981fd75162032479
BLAKE2b-256 2f580010876a2b7d5615000e785c3306fafb179c5e291e9befb0dfbbe9571fcb

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.2.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