Skip to content

Commit

Permalink
πŸ•Š
Browse files Browse the repository at this point in the history
πŸ•Š
  • Loading branch information
keyiflerolsun committed Aug 7, 2024
1 parent 96b4ba4 commit 9f1f6fa
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
11 changes: 11 additions & 0 deletions KeeneticPy/Keenetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ def __yetkilendir(self, user:str, password:str) -> bool:
def interface(self) -> dict:
return self.__oturum.get(f"{self.__rci}show/interface").json()

def get_interface_names(self) -> list[dict]:
return [
{
"name" : value["interface-name"],
"type" : value["type"],
"description" : value["description"]
}
for key, value in self.interface().items()
if value.get("description")
]

def system(self) -> dict:
return self.__oturum.get(f"{self.__rci}show/system").json()

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ konsol.print(modem.hosts())
konsol.print(modem.dsl_reset())


konsol.print(modem.get_interface_names())


konsol.print(modem.get_static_routes())

konsol.print(modem.add_static_route(comment="bakalim.io", host="145.53.10.71", interface="Wireguard2"))
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
setup(
# ? Genel Bilgiler
name = "KeeneticPy",
version = "1.6",
version = "1.7",
url = "https://github.com/keyiflerolsun/KeeneticPy",
description = "Python Lib for Keenetic Routers",
keywords = ["KeeneticPy", "KekikAkademi", "keyiflerolsun"],
Expand Down

0 comments on commit 9f1f6fa

Please sign in to comment.