pihole6api 0.1.1__tar.gz → 0.1.2__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.
- {pihole6api-0.1.1/src/pihole6api.egg-info → pihole6api-0.1.2}/PKG-INFO +3 -3
- {pihole6api-0.1.1 → pihole6api-0.1.2}/README.md +3 -3
- {pihole6api-0.1.1 → pihole6api-0.1.2}/pyproject.toml +1 -1
- {pihole6api-0.1.1 → pihole6api-0.1.2}/src/pihole6api/client.py +5 -1
- {pihole6api-0.1.1 → pihole6api-0.1.2}/src/pihole6api/conn.py +12 -1
- {pihole6api-0.1.1 → pihole6api-0.1.2/src/pihole6api.egg-info}/PKG-INFO +3 -3
- {pihole6api-0.1.1 → pihole6api-0.1.2}/LICENSE +0 -0
- {pihole6api-0.1.1 → pihole6api-0.1.2}/setup.cfg +0 -0
- {pihole6api-0.1.1 → pihole6api-0.1.2}/src/pihole6api/__init__.py +0 -0
- {pihole6api-0.1.1 → pihole6api-0.1.2}/src/pihole6api/actions.py +0 -0
- {pihole6api-0.1.1 → pihole6api-0.1.2}/src/pihole6api/client_management.py +0 -0
- {pihole6api-0.1.1 → pihole6api-0.1.2}/src/pihole6api/config.py +0 -0
- {pihole6api-0.1.1 → pihole6api-0.1.2}/src/pihole6api/dhcp.py +0 -0
- {pihole6api-0.1.1 → pihole6api-0.1.2}/src/pihole6api/dns_control.py +0 -0
- {pihole6api-0.1.1 → pihole6api-0.1.2}/src/pihole6api/domain_management.py +0 -0
- {pihole6api-0.1.1 → pihole6api-0.1.2}/src/pihole6api/ftl_info.py +0 -0
- {pihole6api-0.1.1 → pihole6api-0.1.2}/src/pihole6api/group_management.py +0 -0
- {pihole6api-0.1.1 → pihole6api-0.1.2}/src/pihole6api/list_management.py +0 -0
- {pihole6api-0.1.1 → pihole6api-0.1.2}/src/pihole6api/metrics.py +0 -0
- {pihole6api-0.1.1 → pihole6api-0.1.2}/src/pihole6api/network_info.py +0 -0
- {pihole6api-0.1.1 → pihole6api-0.1.2}/src/pihole6api.egg-info/SOURCES.txt +0 -0
- {pihole6api-0.1.1 → pihole6api-0.1.2}/src/pihole6api.egg-info/dependency_links.txt +0 -0
- {pihole6api-0.1.1 → pihole6api-0.1.2}/src/pihole6api.egg-info/requires.txt +0 -0
- {pihole6api-0.1.1 → pihole6api-0.1.2}/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.
|
3
|
+
Version: 0.1.2
|
4
4
|
Summary: Python API Client for Pi-hole 6
|
5
5
|
Author-email: Shane Barbetta <shane@barbetta.me>
|
6
6
|
License: MIT
|
@@ -23,7 +23,7 @@ Description-Content-Type: text/markdown
|
|
23
23
|
License-File: LICENSE
|
24
24
|
Requires-Dist: requests>=2.26.0
|
25
25
|
|
26
|
-
# pihole6api
|
26
|
+
# 🍓 pihole6api
|
27
27
|
|
28
28
|
This package provides a simple, modular SDK for the PiHole 6 REST API.
|
29
29
|
|
@@ -55,7 +55,7 @@ pip install -e .
|
|
55
55
|
### Initialize the Client
|
56
56
|
|
57
57
|
```python
|
58
|
-
from pihole6api
|
58
|
+
from pihole6api import PiHole6Client
|
59
59
|
client = PiHole6Client("https://your-pihole.local/", "your-password")
|
60
60
|
```
|
61
61
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# pihole6api
|
1
|
+
# 🍓 pihole6api
|
2
2
|
|
3
3
|
This package provides a simple, modular SDK for the PiHole 6 REST API.
|
4
4
|
|
@@ -30,7 +30,7 @@ pip install -e .
|
|
30
30
|
### Initialize the Client
|
31
31
|
|
32
32
|
```python
|
33
|
-
from pihole6api
|
33
|
+
from pihole6api import PiHole6Client
|
34
34
|
client = PiHole6Client("https://your-pihole.local/", "your-password")
|
35
35
|
```
|
36
36
|
|
@@ -109,4 +109,4 @@ client.actions.restart_dns()
|
|
109
109
|
|
110
110
|
## License
|
111
111
|
|
112
|
-
This project is license under the [MIT license](LICENSE).
|
112
|
+
This project is license under the [MIT license](LICENSE).
|
@@ -41,4 +41,8 @@ class PiHole6Client:
|
|
41
41
|
:param full: Boolean flag to get the full dataset.
|
42
42
|
:return: API response containing PADD summary.
|
43
43
|
"""
|
44
|
-
return self.connection.get("padd", params={"full": str(full).lower()})
|
44
|
+
return self.connection.get("padd", params={"full": str(full).lower()})
|
45
|
+
|
46
|
+
def close_session(self):
|
47
|
+
"""Close the Pi-hole session by calling the exit method in the connection."""
|
48
|
+
return self.connection.exit()
|
@@ -124,4 +124,15 @@ class PiHole6Connection:
|
|
124
124
|
|
125
125
|
def patch(self, endpoint, data=None):
|
126
126
|
"""Send a PATCH request."""
|
127
|
-
return self._do_call("PATCH", endpoint, data=data)
|
127
|
+
return self._do_call("PATCH", endpoint, data=data)
|
128
|
+
|
129
|
+
def exit(self):
|
130
|
+
"""Delete the current session."""
|
131
|
+
response = self.delete("auth")
|
132
|
+
|
133
|
+
# Clear stored session info
|
134
|
+
self.session_id = None
|
135
|
+
self.csrf_token = None
|
136
|
+
self.validity = None
|
137
|
+
|
138
|
+
return response
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: pihole6api
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.2
|
4
4
|
Summary: Python API Client for Pi-hole 6
|
5
5
|
Author-email: Shane Barbetta <shane@barbetta.me>
|
6
6
|
License: MIT
|
@@ -23,7 +23,7 @@ Description-Content-Type: text/markdown
|
|
23
23
|
License-File: LICENSE
|
24
24
|
Requires-Dist: requests>=2.26.0
|
25
25
|
|
26
|
-
# pihole6api
|
26
|
+
# 🍓 pihole6api
|
27
27
|
|
28
28
|
This package provides a simple, modular SDK for the PiHole 6 REST API.
|
29
29
|
|
@@ -55,7 +55,7 @@ pip install -e .
|
|
55
55
|
### Initialize the Client
|
56
56
|
|
57
57
|
```python
|
58
|
-
from pihole6api
|
58
|
+
from pihole6api import PiHole6Client
|
59
59
|
client = PiHole6Client("https://your-pihole.local/", "your-password")
|
60
60
|
```
|
61
61
|
|
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
|