On this page
  1. sys.audit
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

sys.audit

Prev: sys.addaudithook | Up: sys | Next: sys.breakpointhook
Rel: sys.activate_stack_trampoline, sys.addaudithook, sys.breakpointhook, sys.call_tracing
Ref: docs.python.org — sys.audit
Tags: #public #python3 #stdlib #sys


Import

import sys
from sys import audit

Signature & Overview

sys.audit(event, /, *args)

Passes the event to any audit hooks that are attached.

Usage

import sys

# Emit a custom audit event to any hooks registered via sys.addaudithook()
sys.audit("myapp.config_loaded", "prod")

Gotchas

REPL Inspect

from sys import audit
help(audit)

Linked from

Related notes