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

Uploaded Python 3

File details

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

File metadata

  • Download URL: presence_audit-0.1.1.tar.gz
  • Upload date:
  • Size: 71.1 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.1.tar.gz
Algorithm Hash digest
SHA256 93b7eebce257c6278a7b927e319545a36b9b654e17178512b8a99d6103f786b6
MD5 e13b67043d9875eaef22e53ec3165392
BLAKE2b-256 c2f594e3039bfe59dd90c342b4c2c240a91f95950f383eecd0698c10f525314c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: presence_audit-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 63.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 482923fd11f807728132ba0ce71fb0e28ab977d267e472eda8d07b40bad25093
MD5 0be6b317ee61eaedf27986bdebec75aa
BLAKE2b-256 eae0ef217a0b417821704ecede6d3acfd2c6fdd17339968829deca4c8c37778e

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

0.1.2

2 files

This release

0.1.1 This release

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