Closed Pedromdsn closed 10 months ago
Try this because the .get()
does not know what 1
means without its identifier
device = nb.dcim.device.get(id=1)
print(device.name)
Note the above will only work if a device with ID=1 exists, otherwise you will get None
and print will throw an error.
Try this because the
.get()
does not know what1
means without its identifierdevice = nb.dcim.device.get(id=1) print(device.name)
Note the above will only work if a device with ID=1 exists, otherwise you will get
None
and print will throw an error.
Even so, just understand as Nome, doesn't give me the typing.
This library does not have any typings. It depends on the API schema that NetBox provides.
This library does not have any typings. It depends on the API schema that NetBox provides.
Wouldn't it be possible to add typing? Not even putting an object type. The code works but I keep getting an error in VSCode
I don't have access to pynetbox typings, when I try to access a device it says that the function always returns null. Although it worked I believe it was a good addition.