# audit_events

<div id="audit-events">

<div class="index">

single: audit events

</div>

</div>

# Audit events table

This table contains all events raised by `sys.audit` or `PySys_Audit` calls throughout the CPython runtime and the standard library. These calls were added in 3.8 or later (see `578`).

See `sys.addaudithook` and `PySys_AddAuditHook` for information on handling these events.

<div class="impl-detail">

This table is generated from the CPython documentation, and may not represent events raised by other implementations. See your runtime specific documentation for actual events raised.

</div>

<div class="audit-event-table">

</div>

The following events are raised internally and do not correspond to any public API of CPython:

| Audit event | Arguments |
|----|----|
| <span id="winapi.createfile">winapi.CreateFile</span> | `file_name`, `desired_access`, `share_mode`, `creation_disposition`, `flags_and_attributes` |
| <span id="winapi.createjunction">winapi.CreateJunction</span> | `src_path`, `dst_path` |
| <span id="winapi.createnamedpipe">winapi.CreateNamedPipe</span> | `name`, `open_mode`, `pipe_mode` |
| <span id="winapi.createpipe">winapi.CreatePipe</span> |  |
| <span id="winapi.createprocess">winapi.CreateProcess</span> | `application_name`, `command_line`, `current_directory` |
| <span id="winapi.openprocess">winapi.OpenProcess</span> | `process_id`, `desired_access` |
| <span id="winapi.terminateprocess">winapi.TerminateProcess</span> | `handle`, `exit_code` |
| <span id="posixsubprocess.fork_exec">posixsubprocess.fork_exec</span> | `exec_list`, `args`, `env` |
| ctypes.PyObj_FromPtr | `obj` |

<div class="versionadded">

3.14 The `_posixsubprocess.fork_exec` internal audit event.

</div>