pihole6api 0.1.4__tar.gz → 0.1.5__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.
Files changed (24) hide show
  1. {pihole6api-0.1.4/src/pihole6api.egg-info → pihole6api-0.1.5}/PKG-INFO +2 -2
  2. {pihole6api-0.1.4 → pihole6api-0.1.5}/README.md +1 -1
  3. {pihole6api-0.1.4 → pihole6api-0.1.5}/pyproject.toml +1 -1
  4. {pihole6api-0.1.4 → pihole6api-0.1.5}/src/pihole6api/list_management.py +10 -1
  5. {pihole6api-0.1.4 → pihole6api-0.1.5/src/pihole6api.egg-info}/PKG-INFO +2 -2
  6. {pihole6api-0.1.4 → pihole6api-0.1.5}/LICENSE +0 -0
  7. {pihole6api-0.1.4 → pihole6api-0.1.5}/setup.cfg +0 -0
  8. {pihole6api-0.1.4 → pihole6api-0.1.5}/src/pihole6api/__init__.py +0 -0
  9. {pihole6api-0.1.4 → pihole6api-0.1.5}/src/pihole6api/actions.py +0 -0
  10. {pihole6api-0.1.4 → pihole6api-0.1.5}/src/pihole6api/client.py +0 -0
  11. {pihole6api-0.1.4 → pihole6api-0.1.5}/src/pihole6api/client_management.py +0 -0
  12. {pihole6api-0.1.4 → pihole6api-0.1.5}/src/pihole6api/config.py +0 -0
  13. {pihole6api-0.1.4 → pihole6api-0.1.5}/src/pihole6api/conn.py +0 -0
  14. {pihole6api-0.1.4 → pihole6api-0.1.5}/src/pihole6api/dhcp.py +0 -0
  15. {pihole6api-0.1.4 → pihole6api-0.1.5}/src/pihole6api/dns_control.py +0 -0
  16. {pihole6api-0.1.4 → pihole6api-0.1.5}/src/pihole6api/domain_management.py +0 -0
  17. {pihole6api-0.1.4 → pihole6api-0.1.5}/src/pihole6api/ftl_info.py +0 -0
  18. {pihole6api-0.1.4 → pihole6api-0.1.5}/src/pihole6api/group_management.py +0 -0
  19. {pihole6api-0.1.4 → pihole6api-0.1.5}/src/pihole6api/metrics.py +0 -0
  20. {pihole6api-0.1.4 → pihole6api-0.1.5}/src/pihole6api/network_info.py +0 -0
  21. {pihole6api-0.1.4 → pihole6api-0.1.5}/src/pihole6api.egg-info/SOURCES.txt +0 -0
  22. {pihole6api-0.1.4 → pihole6api-0.1.5}/src/pihole6api.egg-info/dependency_links.txt +0 -0
  23. {pihole6api-0.1.4 → pihole6api-0.1.5}/src/pihole6api.egg-info/requires.txt +0 -0
  24. {pihole6api-0.1.4 → pihole6api-0.1.5}/src/pihole6api.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pihole6api
3
- Version: 0.1.4
3
+ Version: 0.1.5
4
4
  Summary: Python API Client for Pi-hole 6
5
5
  Author-email: Shane Barbetta <shane@barbetta.me>
6
6
  License: MIT
@@ -36,7 +36,7 @@ This package provides a simple, modular SDK for the PiHole 6 REST API.
36
36
 
37
37
  ## Installation
38
38
 
39
- **Install using `pip` or `pipx`:**
39
+ **Install using `pip`:**
40
40
 
41
41
  ```bash
42
42
  pip install pihole6api
@@ -11,7 +11,7 @@ This package provides a simple, modular SDK for the PiHole 6 REST API.
11
11
 
12
12
  ## Installation
13
13
 
14
- **Install using `pip` or `pipx`:**
14
+ **Install using `pip`:**
15
15
 
16
16
  ```bash
17
17
  pip install pihole6api
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pihole6api"
7
- version = "0.1.4"
7
+ version = "0.1.5"
8
8
  description = "Python API Client for Pi-hole 6"
9
9
  authors = [{name = "Shane Barbetta", email = "shane@barbetta.me"}]
10
10
  license = {text = "MIT"}
@@ -1,5 +1,6 @@
1
1
  import urllib.parse
2
2
 
3
+
3
4
  class PiHole6ListManagement:
4
5
  def __init__(self, connection):
5
6
  """
@@ -54,6 +55,15 @@ class PiHole6ListManagement:
54
55
  params = {"type": list_type}
55
56
  return self.connection.get(f"lists/{encoded_address}", params=params)
56
57
 
58
+ def get_lists(self, list_type=None):
59
+ """
60
+ Retrieve all lists or lists of a specific type.
61
+
62
+ :param list_type: The type of list ("allow" or "block") (optional).
63
+ """
64
+ params = {"type": list_type} if list_type else {}
65
+ return self.connection.get("lists", params=params)
66
+
57
67
  def update_list(self, address, list_type=None, comment=None, groups=None, enabled=True):
58
68
  """
59
69
  Update an existing list.
@@ -102,4 +112,3 @@ class PiHole6ListManagement:
102
112
  params["n"] = num
103
113
 
104
114
  return self.connection.get(f"search/{domain}", params=params)
105
-
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pihole6api
3
- Version: 0.1.4
3
+ Version: 0.1.5
4
4
  Summary: Python API Client for Pi-hole 6
5
5
  Author-email: Shane Barbetta <shane@barbetta.me>
6
6
  License: MIT
@@ -36,7 +36,7 @@ This package provides a simple, modular SDK for the PiHole 6 REST API.
36
36
 
37
37
  ## Installation
38
38
 
39
- **Install using `pip` or `pipx`:**
39
+ **Install using `pip`:**
40
40
 
41
41
  ```bash
42
42
  pip install pihole6api
File without changes
File without changes