# Files

Plug-ins can also be stored as files.

```bash
myplugins
├── myplugin1.py
└── myplugin2.py
```

Here is the full source code.

```python
# myplugin1.py
import pyblish.api

class MyPlugin1(pyblish.api.ContextPlugin):
  def process(self, context):
    print("hello from plugin1")
```

```python
# myplugin2.py
import pyblish.api

class MyPlugin2(pyblish.api.ContextPlugin):
  def process(self, context):
    print("hello from plugin2")
```

You then register their parent directory, similar to how you would normally register Python modules.

```bash
# Environment Variables: Windows
$ set PYBLISHPLUGINPATH=c:\myplugins;\\server\moreplugins

# Environment Variables: Unix
$ export PYBLISHPLUGINPATH=/myplugins:/moreplugins
```

You can also register from Python.

```python
import pyblish.api
pyblish.api.register_plugin_path(r"c:\myplugins")
```

Once registered, the plug-ins are triggered upon the next publish.

```python
import pyblish.util
pyblish.util.publish()
# hello from plugin1
# hello from plugin2
```

**See also**

* [Task-based plug-in registration](http://forums.pyblish.com/t/task-specific-plugins)


---

# 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://learn.pyblish.com/03-files.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.
