Skip to content
This repository was archived by the owner on Jun 27, 2025. It is now read-only.

Commit 0256492

Browse files
committed
update readme
1 parent 5a2bea3 commit 0256492

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,24 @@ The full documentation is at https://netbox-community.github.io/netbox-python/,
5454
To begin, import the NetBox client and instantiate it:
5555

5656
```
57-
from netbox_python import NetBoxClient
57+
from netbox_python import NetBoxClient, Result
5858
nb = NetBoxClient(
5959
base_url="http://127.0.0.1:8000/", token="1dc6fa5bfcef8390dd83a261c36ed8f1551b2d6b"
6060
)
6161
```
62-
6362
The first argument NetBoxClient takes is the NetBox URL. The 'token' argument is from NetBox.
6463

64+
Now using the client you can make calls to the api, for example:
65+
66+
```
67+
ret = nb.dcim.sites.list()
68+
print(ret.data)
69+
70+
```
71+
The methods on the api's correspond to the NetBox REST API, so ('circuits', 'core', 'dcim', 'extras', 'ipam', 'plugins', 'tenancy', 'users', 'virtualization', 'wireless')
72+
73+
circuits would have 'circuit_terminations', 'circuit_types', etc... off of it. Each of the endpoints has 'list', 'get', 'create', 'update' and 'delete' functions.
74+
6575
## Roadmap
6676

6777
See the [open issues](https://github.com/netbox-community/netbox-python/issues) for a list of proposed features (and known issues).

0 commit comments

Comments
 (0)