Skip to main content

Reference Python SDK for the Monitor as a Service Open Schema v1 (Stellar + IPFS). Powered by Mivisor.com.

Project description

monitor-as-a-service (Python SDK)

Reference Python implementation of the MaaS Open Schema v1. Reads, parses and verifies dIAra/MaaS anchors directly from Stellar + IPFS — no API key, no centralized backend.

Powered by Mivisor.com.

License: MIT

Open In Colab

Coautores

Install

From source (until published to PyPI):

pip install -e ./sdk/py
# or, if using requirements.txt: -e git+https://github.com/alejoherrera/stellar_repo.git#subdirectory=sdk/py&egg=monitor_as_a_service

Quickstart

from monitor_as_a_service import Client

client = Client.testnet("GDRWQERI6PI3WICTGPJBFBEFRV7ZRLCWG3IRA2YZQA5ZINHPY23JCPFR")

project = client.project()
print(project.name, project.partner)

for o in client.outputs():
    print(o.output_id, o.workers, o.phase, o.image_url)

# Verify cryptographic integrity of one output
result = client.verify("20251029-060211")
print("JSON match:", result.json_ok, "Image match:", result.image_ok)

API

Client.testnet(account) / Client.mainnet(account)

Builds a read-only client. Optional kwargs: gateways=[...], timeout=30.

client.project() -> Project | None

Returns the project metadata (name, partner, url, system) read from proj:{code}:* keys.

client.outputs() -> Iterator[Output]

Iterates over all anchored outputs, newest first.

client.get(output_id) -> Output | None

Fetches a specific output.

client.verify(output_id, verify_image=True) -> VerificationResult

Fetches content from IPFS gateways (with fallback) and compares SHA-256 against on-chain anchors.

client.fetch_from_ipfs(cid, as_bytes=False)

Low-level: try each gateway, return parsed JSON or raw bytes.

Examples

License

MIT — see source. The schema itself is CC0.

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

monitor_as_a_service-1.1.0.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

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

monitor_as_a_service-1.1.0-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file monitor_as_a_service-1.1.0.tar.gz.

File metadata

  • Download URL: monitor_as_a_service-1.1.0.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for monitor_as_a_service-1.1.0.tar.gz
Algorithm Hash digest
SHA256 d20d6f9a6397d8a081df8b197f40c921a90fc1096d905025f6c80ac78594b67d
MD5 626b738675f93676695d8b5850f24b2c
BLAKE2b-256 c42e4fee634825991539b6df16ce5b85da04f634f5a19ed4cc8739a7077daaa2

See more details on using hashes here.

File details

Details for the file monitor_as_a_service-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for monitor_as_a_service-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1debe4681baa9cf2f83871b9564f5a71cf8266f00f2f60e84f71b8f9215e306d
MD5 2345cd5a59f0ce51f15c932a40a98051
BLAKE2b-256 29918f6a5e4f6446e3532a9e6a808fc8e3f7a76e8c233b822abc0a824f2dd965

See more details on using hashes here.

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