> For the complete documentation index, see [llms.txt](https://api.pyblish.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api.pyblish.com/data/events.md).

# Events

This is a listing of default events in Pyblish.

**Pyblish**

| Event             | Arguments                                | Description                                          |
| ----------------- | ---------------------------------------- | ---------------------------------------------------- |
| `published`       | `context`                                | Emitted upon finished publish, regardless of failure |
| `validated`       | `context`                                | Emitted upon finished validation                     |
| `pluginFailed`    | `plugin`, `context`, `instance`, `error` | Emitted once per failed plug-in.                     |
| `pluginProcessed` | `result`                                 | Emitted once per processed plug-in.                  |

**Pyblish QML**

| Event             | Arguments                        | Description                           |
| ----------------- | -------------------------------- | ------------------------------------- |
| `instanceToggled` | `instance, new_value, old_value` | An Instance was toggled in the GUI    |
| `pluginToggled`   | `plugin, new_value, old_value`   | A Plug-in was toggled in the GUI      |
| `pyblishQmlShown` |                                  | When the Pyblish QML window is shown. |

## Examples

Print status once publishing has finished.

```python
import pyblish.api

def on_published(context):
  has_error = any(result["error"] is not None for result in context.data["results"])
  print("Publishing %s" % ("finished" if has_error else "failed"))

pyblish.api.register_callback("published", on_published)
```

Print in the event of a user toggling an instance in a GUI.

```python
import pyblish.api

def on_instance_toggled(instance, new_value, old_value):
  print("%s was toggled from %s to %s" % (instance, new_value, old_value))

pyblish.api.register_callback("instanceToggled", on_instance_toggled)
```

{{ file.mtime }}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api.pyblish.com/data/events.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
