Package: smartbetsAPI
smartbetsAPI"Punter's choice"Worldwide soccer-matches predictor with a  dedicated standaloneFlaskserver as an endpoint and a package for intergrating the scripts in your ownPythoncode.FeaturesREST-APIScript intergration (package)Non-AIInstallation and usageInstallationLinuxPython 3.7+is required for this script to be fruitful to you.Installing through pip is always the most preferred way:pipinstallsmartbetsAPIFor those who like enjoying thelatestreleases fromGithublikeme, rather than  waiting for the next release:pipinstallgit+https://github.com/Simatwa/smartbetsAPI.gitThe hard-core guys withtrust issuesare very much sorted this way:gitclonehttps://github.com/Simatwa/smartbetsAPI.gitcdsmartbetsAPI



bashinstall.sh#orsudobashinstall.shUsageTerminalRunning$ smartbetsAPI <api-password>will fire up theFlaskserver with the following default configurations.CommandDefaultPort8000UsernameAPIFilenameNonelevel (Logging)20hostFalsedebugFalseno-netFalselogFalsecolorizeFalsegui (Termux)FalseFor instance :$smartbetsAPImypass9876Here is an example of asimple programthat makes prediction using theapi.NoteContent-Type of the response (predictions) isapplication/jsonReinstall withsudoprivileges ifsmartbetsAPIcommand can't be found.Example predicting using REST APIfromsmartbets_APIimportpredictorpredict=predictor('http://localhost:8080','password')bets=predict.get_predictions('Arsenal','Manchester')print(bets)#Output#(True, {'choice': 55.56, 'g': 14.0, 'gg': 80.0, 'ov15': 80.0, 'ov25': 65.0, 'ov35': 55.0, 'pick': 'ov15', 'result': '1'})For more information you can runsmartbetsAPI -hImporting PackageModulepredictorprovides two ways of interacting with it at the programming level, based on thedata-typein which the teams have been packed and parsed to it:UsingpredictorLobject which acceptsteams(Listdata-type).Forexample:#!/usr/bin/env python3fromsmartbets_API.predictorimportpredictorteams=["Napoli",# Home team (index [0])"AC Milan",# Away team (index [1])]# Instantiating predictorpredict=predictor()# Using predictorL object to handle teams (List data-type)predictions=predict.predictorL(teams)# Display infoprint(predictions)#Output#{'g': 8.0, 'gg': 65.0, 'ov15': 70.0, 'ov25': 40.0, 'ov35': 30.0, 'choice': 60.0, 'result': '2', 'pick': 'ov15'}UsingpredictorDobject which takesteams(Dictionarydata-type):Forexample:#!/usr/bin/env python3fromsmartbets_API.predictorimportpredictorteams={1:"Manchester City",# 1 for home-team2:"Liverpool",# 2 for away-team}# Instantiating predictorpredict=predictor()# Using predictorD object to handle teams (Dictionary data-type)predictions=predict.predictorD(teams)# Display infoprint(predictions)#Output#{'g': 8.0, 'gg': 65.0, 'ov15': 60.0, 'ov25': 45.0, 'ov35': 30.0, 'choice': 56.16, 'result': '1', 'pick': 'gg'}The output initials are explained in the table below.ParameterFunctiongGoal-average of the two teamsggProbability of both teams to scoreov15Probability of having more than 2 goalsov25Probability of having more than 3 goalsov35Probability of having more than 4 goalschoiceProbability of the specified 'result' to occurresultThe most suitable outcome from [1,1x,x,2x,2]pickThe most suitable outcome from [1,1x,x,2x,2,gg,ov15,ov25,ov35]NoteProbabilities are in percentange (%)Further infoThepredictorclassaccepts multiple parameters that includes :ParameterFunctionDefaultinclude_positionInclude team's league ranking in making predictionsFalselogLog at api default log's pathFalselevelLogging level0filenameLog to the filename specifiedNonecolorColorize the logsFalseguiRun with some Graphical interface notifications (Termux)FalseapiRun with api-server's configurationsFalseThe two predictor's object (predictorD,predictorL) accepts two parameters i.e.teams- Requirednet- Source of team's data - DefaultTrue(Online)Source of dataTeam performances are sourced fromSoccerwayafter retrieving theurifromGoogle.WarningCopyright related issues are liable to the user of this script!DisclaimerThis project aims to helppuntersandbookmarkersto make informed and well researched soccer-predictions. Nevertheless, it is important to specify that 100% accuracy does not exist and smartbetsAPI can't guarantee the accuracy of the predictions. It is therefore your responsibility to trust the information generated by smartbetsAPI after evaluating its reliability. As thecreator, ICANNOTbe held responsible for any loss of capital that may occur during the use of this program.Contributing and SupportContributingContributions are always welcome!Please take a look at theContribution guidelines.Feel free to open anIssueor toForkthis repo.ToDoUpgrade to Machine learningImprove algorithim's accuracyGeneral code improvementsFix bugsSupportConsider donating to this project if you find it useful:CreditsSoccerwayGooglePython.orgSpecial ThanksvicthepythonistaYOU.