Skip to main content

REST API verification — typed probes, checks, and findings. Sibling of mgf-common.

Project description

mgf-apiprobe

REST API verification — typed probes, checks, and findings.

Shape: Federation sibling of mgf-common. The current mgf-common pin window is shown in this package's PyPI metadata — sourced from pyproject.toml at release time, so this README can't go stale. (Per v2.6 DOC-01 / project-shape taxonomy. PAPER-38.)

mgf-apiprobe is the API-verification sibling of mgf-common. It builds on mgf-common's settings, error, and observability primitives, and adds:

  • Probes — typed descriptions of an HTTP request + the expected response shape.
  • Checks — pluggable verifiers that emit structured Findings (code, severity, root_cause, evidence, remediation).
  • Suites — collections of probes that run async and produce a Report.
  • AuthFlows — bearer / basic / api-key / cookie / custom; OAuth2 is a future add.
  • Matchers — DSL for asserting response shape (format + semantic; IBAN, IMEI, E.164 included).

Install

pip install mgf-apiprobe

Optional extras (forward-declared):

pip install 'mgf-apiprobe[openapi]'   # OpenAPI ingestion
pip install 'mgf-apiprobe[faker]'     # Faker-backed factories
pip install 'mgf-apiprobe[signing]'   # Cassette signing

Quick start

from mgf.apiprobe import Probe, Suite, BearerAuth

probe = (
    Probe.get("https://httpbin.org/get")
    .with_auth(BearerAuth(token="..."))
    .expects_status(200)
    .expects_json_shape({"url": str, "headers": dict})
)

suite = Suite([probe])
report = await suite.run()
print(report.to_human())

Standards

Conformance: L2 per mgf-common/docs/standards/. Per-rule audit ledger: docs/inprogress/MGF_STANDARDS_CONFORMANCE.md.

The L2 floor means every federation MUST rule applies, evidenced by the tracker: BaseAppSettings, AppError hierarchy, structured logging, redaction, py.typed, SemVer with the 0.x carve-out, ≥80% coverage gate, no secrets in cassettes/logs. The earlier "L1 — Production-Ready" framing in this README was the pre-v2.7 nomenclature; the current standards (per docs/standards/README.md §"Conformance levels for projects") define L1 — Lite / L2 — Standard / L3 — Strict with L2 as the federation-sibling baseline.

Layout

File Purpose
DESIGN.md The design spec (≈ 1990 lines). WHAT we're building.
HANDOFF.md Integration plan. HOW it ships as a sibling of mgf-common.
LIFT_CHECKLIST.md Federation conformance acknowledgment.

License

MIT. See LICENSE (TBD).

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

mgf_apiprobe-0.5.4.tar.gz (326.2 kB view details)

Uploaded Source

Built Distribution

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

mgf_apiprobe-0.5.4-py3-none-any.whl (91.5 kB view details)

Uploaded Python 3

File details

Details for the file mgf_apiprobe-0.5.4.tar.gz.

File metadata

  • Download URL: mgf_apiprobe-0.5.4.tar.gz
  • Upload date:
  • Size: 326.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for mgf_apiprobe-0.5.4.tar.gz
Algorithm Hash digest
SHA256 ed58d12b7bad52ad373cc5eabd23de67f5a0e6646d8559c3422380caf9000e29
MD5 b7df7ea0c7d94dc089e88a44a8ae50f9
BLAKE2b-256 5832b569eb633002b086e38f71a76122b3e74e94a7371e458c61694de6a84237

See more details on using hashes here.

File details

Details for the file mgf_apiprobe-0.5.4-py3-none-any.whl.

File metadata

  • Download URL: mgf_apiprobe-0.5.4-py3-none-any.whl
  • Upload date:
  • Size: 91.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for mgf_apiprobe-0.5.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5b95f530c43d55f23f086fbaf68a2a4f4307a32031a2b7799252fe9676f62de3
MD5 8952b2a54bb033eafac2590810a36cf7
BLAKE2b-256 bab620b4829f954d6534863def7b05c822e8a103b02483cb91685b762788463c

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