Skip to main content

presence-audit

Given a declaration of what should exist and a capture of what was observed, say which declared points are reading, present but not reading, or absent.

Those three states are the whole product. We did not look and it is not there are different findings, and a presence audit exists to keep them apart.

What it does not know

Anything about your domain. What a declared point IS, which kinds are worth auditing, when two of them are redundant readings of one thing, what changed about one between two captures — all of that arrives through a vocabulary supplied by a vertical you register. This package ships none.

The protocol in protocols.py is the whole contract a vertical is written against. If something here needs a member the protocol does not declare, the protocol is wrong — not your vertical.

Registering a vertical

Three ways in, resolved before anything is read:

  • an entry point in the group presence_audit.plugins
  • PRESENCE_AUDIT_PLUGINS, an os.pathsep-separated list of specs
  • whatever your own command line passes to plugins.load_spec

Two installed verticals are refused rather than ranked: both would register, the later would silently win, and every verdict would come from a domain you were not auditing.

What a vertical supplies

A sketch, not a runnable block — the complete member list is vocabulary.Vocabulary, which documents each one and what an empty answer means. Thirteen members; most domains answer several of them with nothing.

class MyVocabulary:
    kinds       = ("tag", "label")      # every class a declared point falls into
    count_keys  = {"label": "not_a_tag"}  # the ones worth reporting, under YOUR name
    def classify(self, declared_type): ...        # must return a member of `kinds`
    def is_auditable(self, kind): ...             # which kinds the audit is about
    def is_expected_live(self, declared_type): ...
    # ... and eight more, including the three that let a domain say
    #     something about its own capture that the pairing cannot see

def register():
    from presence_audit import vocabulary
    vocabulary.register(MyVocabulary())

Name register on the presence_audit.plugins entry point and a plain pip install finds it. Then diff.compare(declaration, capture) answers in three states, counting your kinds under your own keys.

Two installed verticals are refused, not ranked — both would register, the later would win, and every verdict would come from a domain you were not auditing. Choose one with the environment variable or your own command line.

Status

Extracted from bmc-sensor-audit, which keeps its Redfish capture layer, its sensor vocabulary and its command line and now depends on this. The extraction was by import graph: every module here reaches nothing domain-specific, and that is asserted by a test rather than by this sentence.

Apache-2.0.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

presence_audit-0.1.2.tar.gz (76.3 kB view details)

Uploaded Source

Built Distribution

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

presence_audit-0.1.2-py3-none-any.whl (66.5 kB view details)

Uploaded Python 3

File details

Details for the file presence_audit-0.1.2.tar.gz.

File metadata

  • Download URL: presence_audit-0.1.2.tar.gz
  • Upload date:
  • Size: 76.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.12

File hashes

Hashes for presence_audit-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2cf29a8df99c9f1d9950b09a1b66f102e7da6137c265d97385d747ec6184f652
MD5 987e61da2a324c8192772cb2d190cb0d
BLAKE2b-256 9d3ce2fc06675778b5465cb49db564a2d90e1b854c27bc898d772fc1b631f212

See more details on using hashes here.

File details

Details for the file presence_audit-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: presence_audit-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 66.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.12

File hashes

Hashes for presence_audit-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bf8510bf022efb97ff6c2e3099e9f2a4920d068214e5fbe289592aa6300429f8
MD5 f0cb2327e8d021acaaf285ec779e6f04
BLAKE2b-256 c5684dbabb63016157de97aba993ad605dce0e6a8161450e700ef2e6999ce02a

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

This release

0.1.2 This release

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page