nbforager 0.8.2__tar.gz → 0.8.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nbforager-0.8.2 → nbforager-0.8.3}/PKG-INFO +2 -2
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/api/base_c.py +15 -6
- {nbforager-0.8.2 → nbforager-0.8.3}/pyproject.toml +2 -2
- {nbforager-0.8.2 → nbforager-0.8.3}/LICENSE.txt +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/README.rst +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/__init__.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/api/__init__.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/api/base_ac.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/api/circuits.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/api/connector.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/api/core.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/api/dcim.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/api/extended_get.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/api/extras.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/api/ip_addresses.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/api/ipam.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/api/plugins_ca.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/api/status.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/api/tenancy.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/api/users.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/api/virtualization.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/api/wireless.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/constants.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/exceptions.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/foragers/__init__.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/foragers/base_fa.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/foragers/circuits.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/foragers/core.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/foragers/dcim.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/foragers/extras.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/foragers/forager.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/foragers/ipam.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/foragers/ipv4.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/foragers/joiner.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/foragers/tenancy.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/foragers/users.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/foragers/virtualization.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/foragers/wireless.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/helpers.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/log.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/messages.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/nb_api.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/nb_cache.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/nb_forager.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/nb_tree.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/parser/__init__.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/parser/nb_custom.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/parser/nb_parser.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/parser/nb_value.py +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/py.typed +0 -0
- {nbforager-0.8.2 → nbforager-0.8.3}/nbforager/types_.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: nbforager
|
3
|
-
Version: 0.8.
|
3
|
+
Version: 0.8.3
|
4
4
|
Summary: Python package designed to assist in working with the Netbox REST API. The filter parameters are identical to those in the Web UI filter form. It replaces brief data with full information, and Netbox objects are represented as a recursive multidimensional dictionary.
|
5
5
|
License: Apache-2.0
|
6
6
|
Keywords: netbox
|
@@ -23,7 +23,7 @@ Requires-Dist: requests (>=2,<3)
|
|
23
23
|
Requires-Dist: tabulate (>=0.9,<0.10)
|
24
24
|
Requires-Dist: vhelpers (>=0.3)
|
25
25
|
Project-URL: Bug Tracker, https://github.com/vladimirs-git/nbforager/issues
|
26
|
-
Project-URL: Download URL, https://github.com/vladimirs-git/nbforager/archive/refs/tags/0.8.
|
26
|
+
Project-URL: Download URL, https://github.com/vladimirs-git/nbforager/archive/refs/tags/0.8.3.tar.gz
|
27
27
|
Project-URL: homepage, https://github.com/vladimirs-git/nbforager
|
28
28
|
Project-URL: repository, https://github.com/vladimirs-git/nbforager
|
29
29
|
Description-Content-Type: text/x-rst
|
@@ -316,12 +316,7 @@ class BaseC:
|
|
316
316
|
|
317
317
|
:return: Netbox objects. Update self _results.
|
318
318
|
"""
|
319
|
-
params_d =
|
320
|
-
if "limit" not in params_d:
|
321
|
-
params_d["limit"] = [self.limit]
|
322
|
-
if "offset" not in params_d:
|
323
|
-
params_d["offset"] = [0]
|
324
|
-
|
319
|
+
params_d = self._add_params_limit_offset(params_d)
|
325
320
|
params_l: LParam = vparam.from_dict(params_d)
|
326
321
|
url = f"{self.url_base}{path}?{urllib.parse.urlencode(params_l)}"
|
327
322
|
|
@@ -359,6 +354,7 @@ class BaseC:
|
|
359
354
|
|
360
355
|
:return: Netbox objects. Update self _results.
|
361
356
|
"""
|
357
|
+
params_d = self._add_params_limit_offset(params_d)
|
362
358
|
params_l: LParam = vparam.from_dict(params_d)
|
363
359
|
url = f"{self.url_base}{path}?{urllib.parse.urlencode(params_l)}"
|
364
360
|
|
@@ -431,6 +427,19 @@ class BaseC:
|
|
431
427
|
|
432
428
|
# ============================== helper ==============================
|
433
429
|
|
430
|
+
def _add_params_limit_offset(self, params_d: DList) -> DList:
|
431
|
+
"""Add `limit` and `offset` default values to the params_d if they are not already present.
|
432
|
+
|
433
|
+
:param params_d: Parameters that need to update.
|
434
|
+
:return: Updated parameters.
|
435
|
+
"""
|
436
|
+
params_d = params_d.copy()
|
437
|
+
if "limit" not in params_d:
|
438
|
+
params_d["limit"] = [self.limit]
|
439
|
+
if "offset" not in params_d:
|
440
|
+
params_d["offset"] = [0]
|
441
|
+
return params_d
|
442
|
+
|
434
443
|
def _get_d(self) -> DAny:
|
435
444
|
"""Get dictionary from the Netbox.
|
436
445
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "nbforager"
|
3
|
-
version = "0.8.
|
3
|
+
version = "0.8.3"
|
4
4
|
description = "Python package designed to assist in working with the Netbox REST API. The filter parameters are identical to those in the Web UI filter form. It replaces brief data with full information, and Netbox objects are represented as a recursive multidimensional dictionary."
|
5
5
|
authors = ["Vladimirs Prusakovs <vladimir.prusakovs@gmail.com>"]
|
6
6
|
readme = "README.rst"
|
@@ -19,7 +19,7 @@ classifiers = [
|
|
19
19
|
homepage = "https://github.com/vladimirs-git/nbforager"
|
20
20
|
repository = "https://github.com/vladimirs-git/nbforager"
|
21
21
|
"Bug Tracker" = "https://github.com/vladimirs-git/nbforager/issues"
|
22
|
-
"Download URL" = "https://github.com/vladimirs-git/nbforager/archive/refs/tags/0.8.
|
22
|
+
"Download URL" = "https://github.com/vladimirs-git/nbforager/archive/refs/tags/0.8.3.tar.gz"
|
23
23
|
|
24
24
|
[tool.poetry.dependencies]
|
25
25
|
python = "^3.11"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|