Skip to main content

Backport module for sys.audit and sys.addaudithook from Python 3.8

Project description

sysaudit

Backport module of sys.audit and sys.addaudithook from Python 3.8.

Note: This module does not backport any of the built-in audit events.

Installation

pip install sysaudit

Usage

sysaudit can be used as a drop-in replacement for sys.audit and sys.addaudithook.

import sysaudit

def hook(event, args):
    print("Event:", event, args)
    
sysaudit.addaudithook(hook)

sysaudit.audit("event_name", 1, 2, dict(key="value"))
# Event: event_name (1, 2, {'key': 'value'})

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

sysaudit-0.1.0.tar.gz (2.3 kB view details)

Uploaded Source

File details

Details for the file sysaudit-0.1.0.tar.gz.

File metadata

  • Download URL: sysaudit-0.1.0.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.8.7 Darwin/20.3.0

File hashes

Hashes for sysaudit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f0a4eaf8e253004dbe870a72a2161571e7c9968186edbff480b85c65335c916b
MD5 e048f476c94899a14dc702092a778f14
BLAKE2b-256 2927bebb1f4700d88c1ec7af2295f077f5f84228532449d0e650ea9127863b9b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page