# Branching I

Now that you know how to arrange plug-ins, let's have a look at how to manage the control flow of publishing.

```python
import pyblish.api

class MyPlugin(pyblish.api.ContextPlugin):
  hosts = ["maya"]

  def process(self, context):
    from maya import cmds
    cmds.headsUpMessage("Hello from Pyblish")

pyblish.api.register_plugin(MyPlugin)

import pyblish.util
pyblish.util.publish()
# Hello from Pyblish
```

`hosts` is a **requirement attribute** and limits plug-ins to a particular scenario.

In this case, the plug-in will only run when publishing from within Autodesk Maya. These are some examples of available values for the `hosts` attribute.

* `python`
* `maya`
* `houdini`
* `nuke`
* `modo`
* `unknown`

You can register your own host, if for example you would like to extend Pyblish for use in additional software, by using `register_host()`.

```python
import pyblish.api
pyblish.api.register_host("myhost")
```


---

# 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/06-branching-i.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.
