Giter Club home page Giter Club logo

orangetool's Introduction



Orangetool

Consist of some general and useful scripts that developed for Single-Board Computers (Under Development)

Tested on Lubuntu

Supported Device List


By Moduland Co


Installation

Source Code

PyPI

Orangetool Installation

IP Functions

import orangetool

#1- local_ip

local_ip=orangetool.local_ip() # this function return local ip of board as string

#2- global_ip

global_ip=orangetool.global_ip() # this function return global ip of board as string

#3- internet 

status=orangetool.internet() #this function check internet connection and return True if internet connection is stable

#4- ping

ip_status=orangetool.ping(ip_address) #this function check ip and return True if this ip is available in network and False otherwise

#5- set_ip

set_ip("192.168.1.46","eth0")  #this function set static ip for system

#6- mac

mac_dic=orangetool.mac() # return dict of all system net devices mac addresses

RAM Functions

 
#1- total ram

ram=orangetool.ram_total() #this function return total ram of the board

#2- free ram

ram=orangetool.ram_free() # this function return how much ram is available in the board

#3- ram percentage

ram=orangetool.ram_percent() # this function return used ram percentage

#4- used percentage

ram=orangetool.ram_used() # this function return used ram 

#5- freeup

orangetool.freeup() # To free pagecache, dentries and inodes and return freeuped amount

Storage Functions

#1- mount_status

mount_details=orangetool.mount_status("sda1") # This function return mount addresses of input device

#2- storage_status

mount_details=orangetool.storage_status() # This function return all of the inserted storage and their status

#3- unmount

orangetool.unmount("/mnt/usb1") # This function unmount input device

#4- unmount_all


orangetool.unmount_all() #This function unmount all of the mounted devices

#5- mount

orangetool.mount("sda1","/mnt/usb1") # This function mount input device in input addresses

Display Functions

#1- hdmi_on

orangetool.hdmi_on() # turn on hdmi port

#2- hdmi_off

orangetool.hdmi_off() # turn off hdmi port

#3- hdmi_size

orangetool.hdmi_size(1280,720) # this function change hdmi display resolution

System Functions

#1- sleep

orangetool.sleep() # put system in sleep mode

#2- halt

orangetool.halt() # poweroff system

#3- restart

orangetool.restart() # restart system

#4- wakeup

orangetool.wakeup(day=1,hour=0,minute=1) # set rtc wakeuptime

#5- get_temp

temp=orangetool.get_temp() # this function return cpu temperature as string

#6- uptime

time=orangetool.uptime() # this function return uptime of system

#7- idletime

time=orangetool.idletime() # this function return idle of system ( all cores)


#8- version

orangetool.version() # return orangetool version for test
  • All of the functions in error state return Error String
  • local_ip() and global_ip() originally are available in ipz package Link
  • RAM Functions in this version need psutil package
  • Some of this funtions need root access so it's better to run sudo -s before use this tool

Issues & Bug Reports

Just fill an issue and describe it. We'll check it ASAP! or send an email to [email protected].

Contribution

You can fork the repository, improve or fix some part of it and then send the pull requests back if you want to see them here. I really appreciate that. โค๏ธ

Remember to write a few tests for your code before sending pull requests.

Donate to our project

If you feel like our project is important can you please support us? Our project is not and is never going to be working for profit. We need the money just so we can continue doing what we do.

Bitcoin :

1XGr9qbZjBpUQJJSB6WtgBQbDTgrhPLPA

Payping (For Iranian citizens) :

License


Moduland Website

orangetool's People

Contributors

sepandhaghighi avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.