pyinfra
pyinfra copied to clipboard
It is possible to write custom connectors, but not to use them
There is more or less documented way to write your own connectors: https://docs.pyinfra.com/en/2.x/api/connectors.html
However, connectors lookup is pretty much hardcoded to pyinfra.connectors
package right here:
https://github.com/Fizzadar/pyinfra/blob/51c48de09adcc7b8e9ee5da7b56b44f230cc30a0/pyinfra/api/connectors.py#L33
and there: https://github.com/Fizzadar/pyinfra/blob/51c48de09adcc7b8e9ee5da7b56b44f230cc30a0/pyinfra/api/inventory.py#L92
So, it's not possible to use connectors outside the official pyinfra release without monkey patching.
Is it designed to be like that? And if so, what is the purpose of the mentioned documentation page?