aboutsummaryrefslogtreecommitdiffstats
path: root/api/app/core/netbox.py
diff options
context:
space:
mode:
authorOle Mathias Aa. Heggem <olemathias.aa.heggem@gmail.com>2025-04-13 07:18:45 +0200
committerGitHub <noreply@github.com>2025-04-13 07:18:45 +0200
commit4ea3a099b05fa910498bfbf1b2d7387118355472 (patch)
treec248cf6764412471ee3e0d1218761bee19fb396a /api/app/core/netbox.py
parent09710c061d5b8ae86b3dfe49f4b8936c13a10535 (diff)
Upgrade bootstrap and rewrite API (#230)HEADmaster
Diffstat (limited to 'api/app/core/netbox.py')
-rw-r--r--api/app/core/netbox.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/api/app/core/netbox.py b/api/app/core/netbox.py
new file mode 100644
index 0000000..78a77c2
--- /dev/null
+++ b/api/app/core/netbox.py
@@ -0,0 +1,13 @@
+import os
+import pynetbox
+
+from app.core.config import settings
+
+def setup_netbox():
+ return pynetbox.api(
+ settings.NETBOX_URL,
+ token=settings.NETBOX_TOKEN,
+ threading=True,
+ )
+
+nb = setup_netbox() \ No newline at end of file