# discover

The primary mechanism with which plug-ins are read from disk.

## Introduction

Pyblish is a plug-in driven framework, everything it does it does through plug-ins. A plug-in can either come in the form of a declaration in the currently active Python session, or as a file. This discovery mechanism is how plug-ins are located and loaded dynamically into Pyblish at run-time.

## Mechanism

For Pyblish to locate plug-ins, you either (1) register a plug-in directly via [register\_plugin](https://github.com/pyblish/api/tree/9d41e509649f2dfb91bc4d595aebabed2dc0512f/pages/register_plugin.md), (2) register a path via [PYBLISHPLUGINPATH](/environment-variables/pyblishpluginpath.md) or (3) [register\_plugin\_path](https://github.com/pyblish/api/tree/9d41e509649f2dfb91bc4d595aebabed2dc0512f/pages/register_plugin_path.md).

Registering a plug-in directly (1) is useful during initial prototyping and for sharing your plug-in with others in a quick and effortless manner. You can simply post your plug-in on a forum, one could copy-paste it into his running session of Python and off we go. Registering directories (2)(3) makes for a power method of persisting plug-ins and to dynamically expose plug-in based on project, task and/or artist.


---

# Agent Instructions: 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/pyblish.api/discover.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.
