Package: orangetool
Table of contentsOverviewInstallationUsageIP FunctionsRAM FunctionsStorage FunctionsDisplay FunctionsSystem FunctionsIssues & Bug ReportsSupported Device ListDependenciesContributionCiteAuthorsLicenseDonateChangelogCode of ConductOverviewControl functions for Single-Board computersTested onLubuntuOpen HubPyPI CounterGithub StarsBranchmasterdevTravisCode QualityByModuland CoInstallationSource CodeDownloadVersion 0.50orLatest Sourcepip3 install -r requirements.txtorpip install -r requirements.txt(Need root access)python3 setup.py installorpython setup.py installPyPICheckPython Packaging User Guidepip3 install orangetool==0.50orpip install orangetool==0.50(Need root access)CondaCheckConda Managing Packageconda install -c sepandhaghighi orangetool(Need root access)Easy installRuneasy_install --upgrade orangetool(Need root access)UsageIP Functionsimportorangetool#1- local_iplocal_ip=orangetool.local_ip()# this function return local ip of board as string#2- global_ipglobal_ip=orangetool.global_ip()# this function return global ip of board as string#3- internetstatus=orangetool.internet()#this function check internet connection and return True if internet connection is stable#4- pingip_status=orangetool.ping(ip_address)#this function check ip and return True if this ip is available in network and False otherwise#5- set_iporangetool.set_ip("192.168.1.46","eth0")#this function set static ip for system#6- macmac_dic=orangetool.mac()# return dict of all system net devices mac addresses#7- network_enablestatus=network_enable("eth0")# enable network device#8- network_disablestatus=network_disable("eth0")# disable network deviceRAM Functions#1- total ramram=orangetool.ram_total()#this function return total ram of the board#2- free ramram=orangetool.ram_free()# this function return how much ram is available in the board#3- ram percentageram=orangetool.ram_percent()# this function return used ram percentage#4- used percentageram=orangetool.ram_used()# this function return used ram#5- freeuporangetool.freeup()# To free pagecache, dentries and inodes and return freeuped amountStorage Functions#1- mount_statusmount_details=orangetool.mount_status("sda1")# This function return mount addresses of input device#2- storage_statusmount_details=orangetool.storage_status()# This function return all of the inserted storage and their status#3- unmountorangetool.unmount("/mnt/usb1")# This function unmount input device#4- unmount_allorangetool.unmount_all()#This function unmount all of the mounted devices#5- mountorangetool.mount("sda1","/mnt/usb1")# This function mount input device in input addresses#6- usb_onorangetool.usb_on()# This function enable USB#7- usb_offorangetool.usb_off()# This function disable USBDisplay Functions#1- hdmi_onorangetool.hdmi_on()# turn on hdmi port#2- hdmi_offorangetool.hdmi_off()# turn off hdmi port#3- hdmi_sizeorangetool.hdmi_size(1280,720)# this function change hdmi display resolutionSystem Functions#1- sleeporangetool.sleep()# put system in sleep mode#2- hibernateorangetool.hibernate()# put system in hibernate mode#3- haltorangetool.halt()# poweroff system#4- restartorangetool.restart()# restart system#5- wakeuporangetool.wakeup(day=1,hour=0,minute=1,sync=True)# set rtc wakeuptime#6- get_temptemp=orangetool.get_temp()# this function return cpu temperature as string#7- uptimetime=orangetool.uptime()# this function return uptime of system#8- idletimetime=orangetool.idletime()# this function return idle of system ( all cores)#9- versionorangetool.version()# return orangetool version for test#10- check_updateorangetool.check_update()# Return True if new version is availableAll of the functions in error state returnErrorStringlocal_ipandglobal_iporiginally are available in ipz packageLinkRAM functions in this version need psutil packageRunningset_ipfunction remotely will freeze your terminal so it's better to setrestartparameter to TrueRunninghalt,restart,hibernate&sleepfunctions remotely will freeze your terminalSome of funtions need root access so it's better to runsudo -sbefore use this toolIssues & Bug ReportsJust fill an issue and describe it. We'll check it ASAP!
or send an email toinfo@orangetool.ir.DependenciesmasterdevCiteIf you use orangetool in your research , please cite this ;-)Sepand Haghighi. 2017. Moduland/Orangetool: Version 0.23. (July 2017). DOI:http://dx.doi.org/10.5281/zenodo.829797Donate to our projectIf 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 :1XGr9qbZjBpUQJJSB6WtgBQbDTgrhPLPAPayping (For Iranian citizens) :LicenseChangelogAll notable changes to this project will be documented in this file.The format is based onKeep a Changelogand this project adheres toSemantic Versioning.Unreleased0.50- 2021-01-01Addednetwork_control,network_enableandnetwork_disablefunctionsChangedsyncparameter added towakeupfunctiondebugparameter added tointernetfunction0.45- 2020-12-26Added__main__.py__version__variablehibernatefunctionusb_control,usb_onandusb_offfunctionsChangeddev-requirements.txtmodifiedTest system modifiedDEBUGparameter renamed todebugAll parameters moved toorangetool_params.pySome functions moved toorangetool_utils.pyADDRESSparameter renamed toaddressZoneparameter renamed tozoneuptimeandidletimefunctions updatedDocstrings updatedREADME.mdmodified0.35- 2019-06-01Addedversion_check.pyCODE_OF_CONDUCT.mdISSUE_TEMPLATE.mdPULL_REQUEST_TEMPLATE.mdCONTRIBUTING.mdtest.shautopep8.batdev-requirements.txtCHANGELOG.mdMANIFEST.inChangedREADME.mdmodifiedTest system modifiedrestart,haltandsleepfunctions modifiedhdmi_onandhdmi_offfunctions modifiedversionfunction modifiedrequirements.txtmodifiedDEVICEparameter renamed todeviceinset_ipfunctionrestartparameter added toset_ipfunction0.25- 2017-09-14ChangedMinor bug in PyPi dependencies fixed0.24- 2017-07-21ChangedMinor bugs fixed0.23- 2017-07-15AddedCheck_updatefunctionChangedMinor bugs fixed0.22- 2017-03-30AddedVersionfunctionSupported_Device_List.mdChangedMinor bugs fixed0.2- 2017-03-06Addedidletimefunctionmount,unmountfunctionsChangedSome bugs fixed0.1- 2017-02-15AddedSome useful scripts for Orangepi/Raspberrypi boards