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.1.tar.gz (102.3 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.1-py3-none-any.whl (69.4 kB view details)

Uploaded Python 3

srmech-0.3.1-cp314-cp314-win_amd64.whl (79.3 kB view details)

Uploaded CPython 3.14Windows x86-64

srmech-0.3.1-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (74.2 kB view details)

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

srmech-0.3.1-cp314-cp314-macosx_11_0_arm64.whl (73.5 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

srmech-0.3.1-cp313-cp313-win_amd64.whl (79.0 kB view details)

Uploaded CPython 3.13Windows x86-64

srmech-0.3.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (74.2 kB view details)

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

srmech-0.3.1-cp313-cp313-macosx_11_0_arm64.whl (73.5 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

srmech-0.3.1-cp312-cp312-win_amd64.whl (79.0 kB view details)

Uploaded CPython 3.12Windows x86-64

srmech-0.3.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (74.2 kB view details)

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

srmech-0.3.1-cp312-cp312-macosx_11_0_arm64.whl (73.5 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

srmech-0.3.1-cp311-cp311-win_amd64.whl (79.0 kB view details)

Uploaded CPython 3.11Windows x86-64

srmech-0.3.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (74.2 kB view details)

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

srmech-0.3.1-cp311-cp311-macosx_11_0_arm64.whl (73.5 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

srmech-0.3.1-cp310-cp310-win_amd64.whl (79.0 kB view details)

Uploaded CPython 3.10Windows x86-64

srmech-0.3.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (74.2 kB view details)

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

srmech-0.3.1-cp310-cp310-macosx_11_0_arm64.whl (73.5 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: srmech-0.3.1.tar.gz
  • Upload date:
  • Size: 102.3 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.1.tar.gz
Algorithm Hash digest
SHA256 919dfc718ec1ea27313d3bc904352eb41256f8b9a334791fcab535334b2a9636
MD5 38ed89a369f1e385f722b24beb544bef
BLAKE2b-256 9c5a80a6c213ef543190bdb92d3d4c39820f43daca2c53b41c359b88d8facb7e

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: srmech-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 69.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8bad1e9d54470971a4f2005dd24dd841aca51f40a5e86ed1f84deed9c86a99a1
MD5 f7fff1b3abfcc2b4a56638a92e45a590
BLAKE2b-256 5a8e64bcd403e0f1193fd59a961bfabb7065e757f3baa7830089bfb863802d2e

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: srmech-0.3.1-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 79.3 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.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 8557a12c3550a5e0ebdb482b65abb78103ca9c29c5f67729ca71c2ce94fbb7c9
MD5 7d2e1d44e45d9e6d2cccbcd3fabbbdfb
BLAKE2b-256 3c605753c7fa0ba6956ad23538140442c6b87f41cd793b2e4746cbbf19c23e18

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.3.1-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.1-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.1-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 b9bfdec8cc7da5955bd0bf5f856d220a6662e98313e9dd26c0229c6d0ef55d8a
MD5 fd30f6e47d3b8d3d681b326600c49584
BLAKE2b-256 209076c808a6d249d7ff8ed8480ff491815ab5b6fa1964c0fe2b6ed8314931ff

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for srmech-0.3.1-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 00d95bbdbc4dda5a499e215420afbbba9b57536161b35aabe63ce0ddb37492b9
MD5 bcdcd5a4f7122beb9b08f7f9e2143dcd
BLAKE2b-256 d6b6a550fffa68fc19f14c0adcde88232366fd1ec25cff2153067882fc904f7e

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: srmech-0.3.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 79.0 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.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 cb913266db3bcc9ba31a56c02a9a0ce4faf8a40f8f63222ac7d8c745f378d85b
MD5 c3aa8672df30ca89222331a4109d7d6d
BLAKE2b-256 df20076f39893f2b16cadf832af8fb7fb480c81d7f6b3c863cf743424dc7baf5

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.3.1-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.1-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.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 6c3904cf637681cf2c6c9ae0684de9e96bb5426f039ba459c1f18c7f217721d8
MD5 fa11cc65d3fc3abd5bb46ec09e384cb9
BLAKE2b-256 8c15aa3249701e2f41e9c47c25c528d8f396fd5248aaa946bf6d497163227b13

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for srmech-0.3.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c7a85547b5bc38124f0a567346dba37d9bc7a905248cb2839704fa41e1a6af80
MD5 de6b109e2272ab2299da2df44d74eee5
BLAKE2b-256 44bba7f76be11ce6911f19a47712d0e19314a580924a73f3312ecaaa731afbcd

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: srmech-0.3.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 79.0 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.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2ab80b3e61d0fa0019392a8eb2a7e01245c7a3925a03faba8fe2c45632dd9683
MD5 18300446b12cf606dd487c3843e59561
BLAKE2b-256 d8df41441491126c9a40e63baa440beeca12e4bce20fa6f5574f9142d84d8368

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.3.1-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.1-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.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 8a84f0737ca97d6c915d546cb57216dbb2e17cc05fc873a038ae3456002a8de4
MD5 05338422c02dfc7ad145f4281d318f86
BLAKE2b-256 e3c49c1c615a9d8bf1eaf1ecd8a5a482550bbc1528280d6d18c7d997938c1aa8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for srmech-0.3.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 040861fe3eca138ae4f57903c5443f9e230920810a50ce4b66c39f3536da27c7
MD5 6c465b4c51f8fc436c8ccfd36fcafb3b
BLAKE2b-256 1bef7af21d585c87a9a59ab740c27737bb85bcd1a8b1215fddb313f306f6e76c

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: srmech-0.3.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 79.0 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.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a9b026d7b662311b612c301141eb066d441c3f1e65b7078d44069dcd2bd2c466
MD5 dd7fd8091c44e67c3f636b462b6f15d6
BLAKE2b-256 cda7c8b056f5fb5a3b1cb919e98388581b70dad266a3ea4d01dbe37636c1be12

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.3.1-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.1-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.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 3d3dc2b6e0f725d623fea7fa1f821b49d6e2e9aa6a077fe75d0ee75fc1ee22f6
MD5 98cc5387abc56bec74fd550030af2b74
BLAKE2b-256 6eae658d86ff605a3083a979294e97b7f5473fecb051af71cd12a73d34590ec4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for srmech-0.3.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 373f9bf5a6c96f658aafe5f4a251d427f877732c6ba8b60145da9c202ac9007f
MD5 e1b4cc862b973ee546e7fd88aa29a6d7
BLAKE2b-256 3ff5a2ba00dc17fcf526cd8dbf400cd2f78490b6f344bfa8dde5b609f5cab876

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: srmech-0.3.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 79.0 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.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e13295fa24bb9be8a3aee4c7716002f321c7bbedfa50763a9f19b8793522d40b
MD5 5f4ef3f4dc26106eea5660925ffbf814
BLAKE2b-256 c34b7cee997cdca22e82ad83aec1ba645d6292cdc6512f15d2e143e903f933c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for srmech-0.3.1-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.1-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.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 08c10820780c827aa4866e3a65093eaf26afdf95fd72d3792ac7ed542bdd1a30
MD5 052621bf6c375893e099b682cca2efb8
BLAKE2b-256 aee64b4fdc1db2e536a96932f0fc943877fc5a071c518637efa892668d82d534

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for srmech-0.3.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2f727d547503f75beebf9ef4b33b08a399b9e7e7db87d436d06481c320e17a6f
MD5 2c9a4a360fd4e9fa0d90a1b6a4304b70
BLAKE2b-256 5910f5efabe88d66977b96714a38d14e096f49cf9e17a03fac3949514ba7acc3

See more details on using hashes here.

Provenance

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