Skip to content

Commit

Permalink
Merge pull request #1 from Upsonic/system-module
Browse files Browse the repository at this point in the history
Added system module and python_version, architecture and os_name
  • Loading branch information
onuratakan authored Apr 8, 2024
2 parents 4def82c + 62f4f45 commit 3c0240a
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ We are working on Upsonic and the tools that inside the `tools` folder is sendin
- google
- read_website

- System
- os_name
- architecture
- python_version

If you want to add functions to public and strongest Tiger you can see to [Adding Tools](#adding-tools) section.

Expand Down
10 changes: 10 additions & 0 deletions tiger/tools/system/architecture.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import platform


def architecture():
return platform.architecture()[0]


tool_name = "system.architecture"
tool_obj = architecture
tool_requirements = []
17 changes: 17 additions & 0 deletions tiger/tools/system/os_name.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import platform

def os_name():
system_name = platform.system()
if system_name == 'Windows':
return 'Windows'
elif system_name == 'Darwin':
return 'macOS'
elif system_name == 'Linux':
return 'Linux'
else:
return 'Unknown OS'


tool_name = "system.os_name"
tool_obj = os_name
tool_requirements = []
10 changes: 10 additions & 0 deletions tiger/tools/system/python_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import platform


def python_version():
return platform.python_version()


tool_name = "system.python_version"
tool_obj = python_version
tool_requirements = []

0 comments on commit 3c0240a

Please sign in to comment.