Python-Unifi-Client 1.2.8__py3-none-any.whl → 1.3.0__py3-none-any.whl

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.
@@ -1735,6 +1735,64 @@ class Client:
1735
1735
  def list_radius_profiles(self):
1736
1736
  """Fetch RADIUS profiles"""
1737
1737
  return self.fetch_results(f"/api/s/{self._site}/rest/radiusprofile")
1738
+
1739
+ def create_radius_profile(self, data:dict) -> dict | list:
1740
+ """
1741
+ Creates a new radius profile
1742
+
1743
+ Args:
1744
+ data (dict):
1745
+ - name (str): Profile display name
1746
+ - use_usg_auth_server (bool): False (we supply our own servers)
1747
+ - auth_servers (list[dict]): Authentication Servers, each with:
1748
+ - ip (str): Radius Server IP
1749
+ - port (int): Auth port (typically 1812)
1750
+ - x_secret (str): Shared secret
1751
+ - accounting_enabled (bool): True to enable Radius accounting
1752
+ Returns:
1753
+ list/dict: Created profile data (includes '_id' field)
1754
+ """
1755
+ self._curl_method = 'POST'
1756
+ result = self.fetch_results(f'/api/s/{self._site}/rest/radiusprofile', payload=data)
1757
+ self._curl_method = 'GET'
1758
+ return result
1759
+
1760
+ def set_radius_profile(self, profile_id:str, data:dict) -> dict | bool:
1761
+ """
1762
+ Update an existing Radius Profile
1763
+
1764
+ Args:
1765
+ - profile_id (str): The '_id' of the profile to update
1766
+ - data (dict):
1767
+ - name (str): Profile display name
1768
+ - use_usg_auth_server (bool): False (we supply our own servers)
1769
+ - auth_servers (list[dict]): Authentication Servers, each with:
1770
+ - ip (str): Radius Server IP
1771
+ - port (int): Auth port (typically 1812)
1772
+ - x_secret (str): Shared secret
1773
+ - accounting_enabled (bool): True to enable Radius accounting
1774
+ Returns:
1775
+ bool/dict: Success indicator or updated profile data
1776
+ """
1777
+ self._curl_method = 'PUT'
1778
+ result = self.fetch_results(f'/api/s/{self._site}/rest/radiusprofile/{profile_id}', payload=data)
1779
+ self._curl_method = 'GET'
1780
+ return result
1781
+
1782
+ def delete_radius_profile(self, profile_id:str) -> bool:
1783
+ """
1784
+ Delete a Radius Profile
1785
+
1786
+ Args:
1787
+ profile_id (str): The '_id' of the profile to delete
1788
+
1789
+ Returns:
1790
+ bool: Success indicator
1791
+ """
1792
+ self._curl_method = 'DELETE'
1793
+ result = self.fetch_results(f'/api/s/{self.site}/rest/radiusprofile{profile_id}')
1794
+ self._curl_method = 'GET'
1795
+ return result
1738
1796
 
1739
1797
  def create_radius_account(self, name: str, x_password: str, tunnel_type: int = None, tunnel_medium_type: int = None, vlan: str = None) -> dict:
1740
1798
  """Create a Radius user account with optional tunneling parameters and VLAN"""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python_unifi_client
3
- Version: 1.2.8
3
+ Version: 1.3.0
4
4
  Home-page: https://github.com/compdat-llc/unifi-client-python
5
5
  Author: Michael Lapinski
6
6
  Author-email: michaellapinski787@gmail.com
@@ -0,0 +1,6 @@
1
+ python_unifi_client/__init__.py,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
2
+ python_unifi_client/client.py,sha256=09l-iE9q3E4LAyWwEtE66lRg3-yZWA2rQAVF-O9hx4E,124088
3
+ python_unifi_client-1.3.0.dist-info/METADATA,sha256=JUTTsV2tpM8pWT9XfFwq661bOVTZBqQDDFj0pI1-1Iw,2483
4
+ python_unifi_client-1.3.0.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
5
+ python_unifi_client-1.3.0.dist-info/top_level.txt,sha256=675fDdb69Hi9X8pSEGl6f03ZpUXNiumV-s1B1gXEeYs,20
6
+ python_unifi_client-1.3.0.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- python_unifi_client/__init__.py,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
2
- python_unifi_client/client.py,sha256=1QLxTS4nniaXYqQvo-uEFM3tW2ROBvILwKKNZ2NbCiU,121709
3
- python_unifi_client-1.2.8.dist-info/METADATA,sha256=JY_xQQ0iwVK5YCrHO9kQd9xDqdUnDkjT8GBNuqOxT6E,2483
4
- python_unifi_client-1.2.8.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
5
- python_unifi_client-1.2.8.dist-info/top_level.txt,sha256=675fDdb69Hi9X8pSEGl6f03ZpUXNiumV-s1B1gXEeYs,20
6
- python_unifi_client-1.2.8.dist-info/RECORD,,