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.

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 in v0.1; OAuth2 later.
  • Matchers — DSL for asserting response shape (format + semantic; IBAN, IMEI, E.164 included).

Status: pre-publish — v0.1.0 is the first scope-reduced release per HANDOFF.md §6 + DEFERRED.md. Everything past the core engine + ~18 checks + 3 CLI subcommands is deferred and tracked in DEFERRED.md.

Install

pip install mgf-apiprobe

Optional extras (forward-declared; see DEFERRED.md for ship-when):

pip install 'mgf-apiprobe[openapi]'   # OpenAPI ingestion (v0.2)
pip install 'mgf-apiprobe[faker]'     # Faker-backed factories (v0.2)
pip install 'mgf-apiprobe[signing]'   # Cassette signing (v0.3)

Quick start (v0.1)

Once v0.1.0 publishes; placeholder until the implementation lands.

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

This package targets mgf-common's L1 — Production-Ready standards day-one (BaseAppSettings, AppError, structured logging, redaction, py.typed, semver, ≥80% coverage, no secrets in cassettes/logs). It graduates to L2 by its own v1.0. See LIFT_CHECKLIST.md.

Layout

File Purpose
DESIGN.md The v0.3 design spec (≈ 1990 lines) with v0.4 sibling-decision addendum. WHAT we're building.
HANDOFF.md Integration plan. HOW it ships as a sibling of mgf-common.
DEFERRED.md Scope-reduction tracker. WHICH parts of WHAT ship in v0.1 vs. later.
LIFT_CHECKLIST.md Federation conformance acknowledgment.
CHANGELOG.md Per-release notes.

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: mgf_apiprobe-0.2.0.tar.gz
  • Upload date:
  • Size: 135.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mgf_apiprobe-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2b1183d91a6cc4f7c14dcdb9e86b5205bdc28acb0ceaceefe60cb7fe9a079108
MD5 7239615a02a63d4cd28ac5abe40e41d9
BLAKE2b-256 ede69232a4b82c040b5cd03653ae9b4debd36b16f3a98545752344d4cd0d1ce4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mgf_apiprobe-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 72.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mgf_apiprobe-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b2c60442898fdc992d8d42cd777d2e4d20a0f18940b4659d367a55daaae54519
MD5 abbb237d6cc2fa37aed88122202131a2
BLAKE2b-256 04a54eae117620426acbd317afe1411680d161cd5600e17e12d67fb0a984b055

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