# register\_host

## register\_host

Register supported host.

| Source | Added |
| ------ | ----- |
|        | 1.1.3 |

## Functions

| Output | Method                                                                                                                                |
| -----: | ------------------------------------------------------------------------------------------------------------------------------------- |
|        | [register\_host](https://github.com/pyblish/api/tree/9d41e509649f2dfb91bc4d595aebabed2dc0512f/pages/register_gui/README.md)(str)      |
|        | [deregister\_host](https://github.com/pyblish/api/tree/9d41e509649f2dfb91bc4d595aebabed2dc0512f/pages/deregister_host/README.md)(str) |
|        | [registered\_hosts](https://github.com/pyblish/api/tree/9d41e509649f2dfb91bc4d595aebabed2dc0512f/pages/registered_hosts/README.md)()  |

## Description

Limit availability of plug-ins by host, such as Maya.

Integrations, such as `pyblish-maya` and `pyblish-nuke` register their own corresponding host automatically. Additional hosts may be registered by the end-user to customise the available plug-ins at time of publish.

## Example

```python
from pyblish import api

class CollectObjectSets(api.ContextPlugin):
    """Collect things only Maya would know"""
    order = api.CollectorOrder
    hosts = ["maya"]
    def process(self, context):
        from maya import cmds
        for objset in cmds.ls(type="objectSet"):
        context.create_instance(objset)
```

{{ file.mtime }}


---

# 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/register_host.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.
