Package: danbot-status
danbot-statusDanBot Status is a module built in python for getting all statistical services used by DanBotHost.Changelogv0.0.1: Initial releasev0.0.2: Converted the module to a Asynchronous Packagev0.1.1: Added Support for Synchronous and Asynchronous Programmingv0.2.0: Rewrote the module to use the new version of the APIv0.2.1: Fixed some README mistakesUpgrade Modulepip install --upgrade danbot-statusInstallationpip install danbot-status--> For Windowspip3 install danbot-status-->   For LinuxUsageimport danbotstatus--> Importing Module in PythonClassesdanbotstatus.SynchronousState()  -->  For Synchronous Codingdanbotstatus.AsynchronousState()  -->  For Asynchronous CodingErrorsdanbotstatus.APIError()  ->  Thrown when the API is not responding or is downBasic Example Of danbotstatus in Asynchronous Environment In Discord Bot (discord.py)This method needs the module discord.pyimportdiscordfromdanbotstatusimportAsynchronousState()dbs=AsynchronousState()bot=discord.Client()@bot.eventasyncdefon_ready():print("Logged In as "+bot.user)@bot.eventasyncdefon_message(message):ifmessage.content=='check all node status':nodestats=awaitdbs.fetch_all()awaitmessage.channel.send(nodestats)bot.run("TOKEN")Basic Example Of danbotstatus in Synchronous Environment In Flask (Flask)This method needs the module FlaskfromflaskimportFlaskfromdanbotstatusimportSynchronousStatedbs=SynchronousState()app=Flask(__name__)@app.route('/')defindex():return{'status':"alive"}@app.route('/allstats')defnodestats():ns=dbs.fetch_all()returnnsif__name__=='__main__':app.run()Basic Functions in the module (SynchronousState)pssst, this is not an example , this just shows the functions the module hasfromdanbotstatusimportSynchronousStatedbhs=danbotstatus.SynchronousState()allnodestats=dbhs.fetch_all()# Gets All Statstime=dbhs.fetch_time()# Gets the time of the APInames=dbhs.fetch_server_names()# Gets the names of the nodesstats=dbhs.fetch_server_stats("Server Name",3)# Gets the stats of the specific servers, Accepts 2 Optional Arguements, either the server name or the index positioning of the dictionaryprint(allnodestats)# This method returns a dictionaryprint(time)# This method returns a stringprint(names)# This method returns a listprint(stats)# This method returns a dictionaryBasic Functions in the module (AsynchronousState)pssst, this is not an example , this just shows the functions the module hasfromdanbotstatusimportAsynchronousStatedbhs=AsynchronousState()allnodestats=awaitdbhs.fetch_all()# Gets All Statstime=awaitdbhs.fetch_time()# Gets the time of the APInames=awaitdbhs.fetch_server_names()# Gets the names of the nodesstats=awaitdbhs.fetch_server_stats("Server Name",3)# Gets the stats of the specific servers, Accepts 2 Optional Arguements, either the server name or the index positioning of the dictionaryprint(allnodestats)# This method returns a dictionaryprint(time)# This method returns a stringprint(names)# This method returns a listprint(stats)# This method returns a dictionaryThank You.Module Built By Viney. Any Queries or Issue, feel free to make an Issue in the issue tab of Github. This project is welcome to receive any contributions by submitting in  PR's