Metadata-Version: 2.1
Name: sysaudit
Version: 0.2.0
Summary: Backport module for sys.audit and sys.addaudithook from Python 3.8
Home-page: https://github.com/brettlangdon/sysaudit
License: MIT
Author: brettlangdon
Author-email: me@brett.is
Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Project-URL: Repository, https://github.com/brettlangdon/sysaudit
Description-Content-Type: text/markdown

sysaudit
========

Backport module of [sys.audit](https://docs.python.org/3.8/library/sys.html#sys.audit)
and [sys.addaudithook](https://docs.python.org/3.8/library/sys.html#sys.addaudithook)
from Python 3.8.

**Note:** This module does _not_ backport any of the built-in
[audit events](https://docs.python.org/3.8/library/audit_events.html#audit-events).


## Installation

```
pip install sysaudit
```

## Usage

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

``` python
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'})
```

