APP Module¶
- class pynautobot.core.app.App(api, name)¶
Bases:
object
Represents apps in Nautobot.
Calls to attributes are returned as Endpoint objects.
- Returns:
Endpoint
matching requested attribute.- Raises:
RequestError
if requested endpoint doesn’t exist.
- __init__(api, name)¶
- choices()¶
Returns _choices response from App
Note
This method is deprecated and only works with Nautobot version 2.7.x or older. The
choices()
method inEndpoint
is compatible with all Nautobot versions.- Returns:
Raw response from Nautobot’s _choices endpoint.
- config()¶
Returns config response from app
- Returns:
Raw response from Nautobot’s config endpoint.
- Raises:
RequestError
if called for an invalid endpoint.- Example:
>>> pprint.pprint(nb.users.config()) {'tables': {'DeviceTable': {'columns': ['name', 'status', 'tenant', 'device_role', 'site', 'primary_ip', 'tags']}}}
- custom_choices()¶
Returns custom-fields response from app
- Returns:
Raw response from Nautobot’s custom-fields endpoint.
- Raises:
RequestError
if called for an invalid endpoint.- Example:
>>> nb.extras.custom_choices() {'Testfield1': {'Testvalue2': 2, 'Testvalue1': 1}, 'Testfield2': {'Othervalue2': 4, 'Othervalue1': 3}}
- class pynautobot.core.app.PluginsApp(api)¶
Bases:
object
Basically valid plugins api could be handled by same App class, but you need to add plugins to request url path.
- Returns:
App
with added plugins into path.
- __init__(api)¶
- installed_plugins()¶
Returns raw response with installed plugins
- Returns:
Raw response Nautobot’s installed plugins.
- Example:
>>> nb.plugins.installed_plugins() [{ 'name': 'test_plugin', 'package': 'test_plugin', 'author': 'Dmitry', 'description': 'Nautobot test plugin', 'verison': '0.10' }]