Saravanan666/pypi-org huggingface dataset:
Package: a-pandas-ex-read-sql
Convert any SQL Database to a Pandas DataFrame$pipinstalla-pandas-ex-read-sqlfroma_pandas_ex_read_sqlimportpd_add_read_sql_filepd_add_read_sql_file()importpandasaspddict_with_dfs=pd.Q_read_sql(r"F:\msgstorexxxxxxxxxxxxxxxxx.db")Update 13.5:# Added .SQL File Reading Functionality# To read an .SQL file and obtain the data, you can use the pd.Q_read_sql() function.# This code reads the specified SQL file (.sql - only INSERT commands) and returns a DataFrame containing the data from the file.df=pd.Q_read_sql(r"C:\Users\hansc\Downloads\sax\world.sql")# Reading an SQLite Database File (.db)# To read an SQLite database file and retrieve the data, you can also use the pd.Q_read_sql() function.# This code reads the specified SQLite database file (northwind.db) and returns a DataFrame containing the data in a dict of DataFrames.df2=pd.Q_read_sql(r"C:\Users\hansc\Downloads\northwind.db")# To convert all tables in an SQLite database file into a single DataFrame, you can use the pd.Q_db_to_one_df() # function. This code reads the specified SQLite database file (northwind.db), retrieves all the tables, and combines them into a single DataFrame.df3=pd.Q_db_to_one_df(path=r"C:\Users\hansc\Downloads\northwind.db")# Splitting a DataFrame into Grouped DataFrames (Revert the last step)# To split a DataFrame into multiple DataFrames based on specified columns, you can use the d_split_in_groups() # function. This code splits the DataFrame (df3) into multiple DataFrames based on the "aa_table" column. The result is a dictionary where the keys are group names, and the values are the corresponding split DataFrames.df4=df3.d_split_in_groups(columns=["aa_table"])# To revert the grouped DataFrames back into a single DataFrame (without reading SQL), you can use the pd.Q_groupdict_to_one_df() function.# This code takes the dictionary of grouped DataFrames (df4) and combines them into a single DataFrame.df5=pd.Q_groupdict_to_one_df(df4)
Package: a-pandas-ex-sequence-search
Sequence / string search with NumPy in pandas DataFramespip install a-pandas-ex-sequence-searchTested against Windows 10 / Python 3.11 / Anacondaimportpandasaspdfroma_pandas_ex_sequence_searchimportpd_add_find_sequencepd_add_find_sequence()df=pd.read_csv("https://raw.githubusercontent.com/pandas-dev/pandas/main/doc/data/titanic.csv")df.Name.s_find_sequence('Mr',exception_val=pd.NA,distance=1)0[8]1[9]2[]3[10]4[7]5[7]6[10]7[]8[9]9[8]
Package: a-pandas-ex-split-on-common-string
$pipinstalla-pandas-ex-split-on-common-stringfroma_pandas_ex_split_on_common_stringimportpd_add_split_on_common_stringpd_add_split_on_common_string()df=pd.read_csv("https://raw.githubusercontent.com/pandas-dev/pandas/main/doc/data/titanic.csv")df['text']='myway_/bo'+df.Embarked.astype('string')+'.txt'print(df.text.s_split_on_common_string(is_path=False))print(df.text.s_split_on_common_string(is_path=True))aa_originalaa_commonaa_different0myway_/boS.txtmyway_/boS.txt1myway_/boC.txtmyway_/boC.txt2myway_/boS.txtmyway_/boS.txt3myway_/boS.txtmyway_/boS.txt4myway_/boS.txtmyway_/boS.txt...........886myway_/boS.txtmyway_/boS.txt887myway_/boS.txtmyway_/boS.txt888myway_/boS.txtmyway_/boS.txt889myway_/boC.txtmyway_/boC.txt890myway_/boQ.txtmyway_/boQ.txt[891rowsx3columns]aa_originalaa_commonaa_different0myway_/boS.txtmyway_/boS.txt1myway_/boC.txtmyway_/boC.txt2myway_/boS.txtmyway_/boS.txt3myway_/boS.txtmyway_/boS.txt4myway_/boS.txtmyway_/boS.txt...........886myway_/boS.txtmyway_/boS.txt887myway_/boS.txtmyway_/boS.txt888myway_/boS.txtmyway_/boS.txt889myway_/boC.txtmyway_/boC.txt890myway_/boQ.txtmyway_/boQ.txt[891rowsx3columns]
Package: a-pandas-ex-string-to-dtypes
What is it used for?Convert a Pandas DataFrame/Series with dtype str/string/object to the best available dtypesInstallationpipinstalla-pandas-ex-string-to-dtypesUsagefroma_pandas_ex_string_to_dtypesimportpd_add_string_to_dtypesimportpandasaspdpd_add_string_to_dtypes()df=pd.read_csv("https://github.com/pandas-dev/pandas/raw/main/doc/data/titanic.csv")print(df)print(df.dtypes)PassengerIdSurvivedPclass...FareCabinEmbarked0103...7.2500NaNS1211...71.2833C85C2313...7.9250NaNS3411...53.1000C123S4503...8.0500NaNS.......................88688702...13.0000NaNS88788811...30.0000B42S88888903...23.4500NaNS88989011...30.0000C148C89089103...7.7500NaNQ[891rowsx12columns]PassengerIdint64Survivedint64Pclassint64NameobjectSexobjectAgefloat64SibSpint64Parchint64TicketobjectFarefloat64CabinobjectEmbarkedobjectdtype:objectdfstring=pd.concat([df[x].astype("string")forxindf.columns],axis=1,ignore_index=True)dfstring.columns=df.columnsprint(dfstring)print(dfstring.dtypes)PassengerIdSurvivedPclass...FareCabinEmbarked0103...7.25<NA>S1211...71.2833C85C2313...7.925<NA>S3411...53.1C123S4503...8.05<NA>S.......................88688702...13.0<NA>S88788811...30.0B42S88888903...23.45<NA>S88989011...30.0C148C89089103...7.75<NA>Q[891rowsx12columns]PassengerIdstringSurvivedstringPclassstringNamestringSexstringAgestringSibSpstringParchstringTicketstringFarestringCabinstringEmbarkedstringdtype:objectconverted=dfstring.ds_string_to_best_dtype()print(converted)print(converted.dtypes)PassengerIdSurvivedPclass...FareCabinEmbarked0103...7.2500<NA>S1211...71.2833C85C2313...7.9250<NA>S3411...53.1000C123S4503...8.0500<NA>S.......................88688702...13.0000<NA>S88788811...30.0000B42S88888903...23.4500<NA>S88989011...30.0000C148C89089103...7.7500<NA>Q[891rowsx12columns]PassengerIduint16Surviveduint8Pclassuint8NamestringSexcategoryAgeobjectSibSpuint8Parchuint8TicketobjectFarefloat64CabincategoryEmbarkedcategorydtype:objectParameters:df:Union[pd.DataFrame,pd.Series]Returns:Union[pd.DataFrame,pd.Series]
Package: a-pandas-ex-to-dict
Pandas DataFrame to nested dict# from: https://stackoverflow.com/a/74810722/15096247$pipinstalla-pandas-ex-to-dictfroma_pandas_ex_to_dictimportpd_add_df_to_nested_dictimportpandasaspdfrompprintimportpprintpd_add_df_to_nested_dict()df=pd.read_csv("https://github.com/pandas-dev/pandas/raw/main/doc/data/titanic.csv")df=df[:10]dfdict2=df.d_to_nested_dict(["Survived","Pclass","Embarked","Fare","Cabin"])dfdict=df.d_to_nested_dict()pprint(dfdict2)pprint(dfdict){0:{1:{'S':{51.8625:{'E46':1}}},3:{'Q':{8.4583:{}},'S':{7.25:{},8.05:{},21.075:{}}}},1:{1:{'C':{71.2833:{'C85':1}},'S':{53.1:{'C123':1}}},2:{'C':{30.0708:{}}},3:{'S':{7.925:{},11.1333:{}}}}}{1:{0:{3:{'Braund, Mr. Owen Harris':{'male':{22.0:{1:{0:{'A/5 21171':{7.25:1}}}}}}}}},2:{1:{1:{'Cumings, Mrs. John Bradley (Florence Briggs Thayer)':{'female':{38.0:{1:{0:{'PC 17599':{71.2833:1}}}}}}}}},3:{1:{3:{'Heikkinen, Miss. Laina':{'female':{26.0:{0:{0:{'STON/O2. 3101282':{7.925:1}}}}}}}}},4:{1:{1:{'Futrelle, Mrs. Jacques Heath (Lily May Peel)':{'female':{35.0:{1:{0:{'113803':{53.1:1}}}}}}}}},5:{0:{3:{'Allen, Mr. William Henry':{'male':{35.0:{0:{0:{'373450':{8.05:1}}}}}}}}},6:{0:{3:{'Moran, Mr. James':{'male':{}}}}},7:{0:{1:{'McCarthy, Mr. Timothy J':{'male':{54.0:{0:{0:{'17463':{51.8625:1}}}}}}}}},8:{0:{3:{'Palsson, Master. Gosta Leonard':{'male':{2.0:{3:{1:{'349909':{21.075:1}}}}}}}}},9:{1:{3:{'Johnson, Mrs. Oscar W (Elisabeth Vilhelmina Berg)':{'female':{27.0:{0:{2:{'347742':{11.1333:1}}}}}}}}},10:{1:{2:{'Nasser, Mrs. Nicholas (Adele Achem)':{'female':{14.0:{1:{0:{'237736':{30.0708:1}}}}}}}}}}
Package: a-pandas-ex-vertical-to-horizontal
Vertical to horizontal (Series to DataFrame with multiple columns)pipinstalla-pandas-ex-vertical-to-horizontalfroma_pandas_ex_vertical_to_horizontalimportpd_add_vertical_to_horizontalpd_add_vertical_to_horizontal()df=pd.concat([pd.Series(range(0,20)),pd.Series(range(1000,1020))],axis=0).reset_index(drop=True)df1=df.s_vertical_to_horizontal(number_of_cells_to_join=3,drop_redundant=False,negative=False)df2=df.s_vertical_to_horizontal(number_of_cells_to_join=6,drop_redundant=True,negative=True)print(df.to_string())001122334455667788991010111112121313141415151616171718181919201000211001221002231003241004251005261006271007281008291009301010311011321012331013341014351015361016371017381018391019print(df1.to_string())col_0col_1col_20010191018110101922103321443255436654776588769987101098111110912121110131312111414131215151413161615141717161518181716191918172010001918211001100019221002100110002310031002100124100410031002251005100410032610061005100427100710061005281008100710062910091008100730101010091008311011101010093210121011101033101310121011341014101310123510151014101336101610151014371017101610153810181017101639101910181017print(df2.to_string())col_0col_1col_2col_3col_4col_50012345667891011121213141516171818191000100110021003241004100510061007100810093010101011101210131014101536101610171018101901
Package: apap
Whatapapmakes you canapply RESTfulapi to your client handy.Requiredpython3.7+AboutThis exposesapap.Clientclass to define your api client.apap.Clientmust be definingapi_base_urland_method_mapas class attribute.importapapclassYourAPI(apap.Client):api_base_url='https://your.api.com/v1'_method_map=apap.MethodMap(('get_all',apap.Method.Get,'things'),# all resources from GET http method.('get_one',apap.Method.Get,'things/:id'),# one of resources filterd by id from GET http method.('create',apap.Method.Post,'things'),# create a new item from POST http method.('update',apap.Method.Put,'things/:id'),# update something filterd by id from PUT http method.('delete',apap.Method.Delete,'things/:id'),# delete something filterd by id from Delete http method.)...You knowapap.MethodMapmakes your client declarative.apap.MethodMapis just a tuple of client method name, HTTP method and endpoint url.At last, you need to register your client to entrypoint viaapap.apply.Those request returnsrequests’s Response object(becauseapapusesrequestsinternally).importapapclient=apap.apply(YourAPI)()client.get_all()# same as `curl https://your.api.com/v1/things`client.get_one(id=1)()# same as `curl https://your.api.com/things/1`client.create(x=1,y=2)# same as `curl -X POST -d "x=1" -d "y=2" https://your.api.com/things`client.update(id=1)(x=10)# same as `curl -X PUT -d "x=1" https://your.api.com/things/1`client.delete(id=1)()# same as `curl -X DELETE https://your.api.com/things/1`When you need to set any headers for requesting, you can useheader_mapattribute to translate actual header from python world.So if you want to useAuthorizationas http-header, please defineheader_maplooks like below.classYourAPI(apap.Client):header_map={'Authorization':'auth_key'}...apap.apply(YourAPI)(headers={'auth_key':'token xxxxx'})ExampleAll you need is just creating a class which inheritsapap.Clientclass.importosfromapapimportMethodMap,Client,Method,applyclassGithubAPI(Client):api_base_url='https://api.github.com'header_map={'Authorization':'access_token'}classUserRepo(GithubAPI):name='user_repo'_method_map=MethodMap(('get',Method.Get,'users/:username/repos'),)classMyRepo(GithubAPI):name='my_repo'_method_map=MethodMap(('get',Method.Get,'user/repos'),)access_token=os.environ['ACCESS_TOKEN']endpoints=[UserRepo,MyRepo]gh_client=apply(*endpoints)(headers={'access_token':f'token{access_token}'})user_repo_resp=gh_client.user_repo.get(username='mtwtkman')()my_repo_resp=gh_client.my_repo.get(visibility='private')
Package: apapi
APAPIAPAPIis an unofficial library that allows you to connect to Anaplan APIs using
Python. Currently, you can authenticate using either Basic Authentication
(email & password), or OAuth2 (client_id & refresh_token, both non-rotatable and
rotatable) - Cert based authentication is on the roadmap.
Use Bulk, Transactional, ALM and Audit endpoints, with more coming soon!As an abstract example, here we export some CSV and import it back to Anaplan:>>>importapapi>>>withapapi.BasicAuth(f"{email}:{password}")asauthentication:>>>my_connection=apapi.BulkConnection(authentication)>>>my_connection.run_export(model_id,export_id)>>>data=my_connection.get_file(model_id,export_id)>>>print(data.decode())Versions,Data,TextActual,1,testBudget,2.5,ąćęłńśżźForecast,-3,😂>>>my_connection.put_file(model_id,file_id,data)>>>my_connection.run_import(model_id,import_id)Full documentation can be foundhere.
Checkexamplesortestsfor more examples and hints about usage.Installing Anaplan Python API and Supported VersionsAPAPI is available onPyPI:$python-mpipinstallapapiAPAPI supports Python 3.9+.More InfoOfficial Anaplan APIs Postman CollectionOfficial documentation of Anaplan APIsOfficial documentation of Anaplan Connect V4 (Java)Official Anaplan Connect repositoryHow to ContributeContributions are welcome, even if you can't code it - in such case, please submit
an issue if you need any additional feature (preferably in the form of User Story,
like"As {who} I need {what} because {why}").
If you encounter any bugs, please report the problem with a description and error log.
Package: aparat-python
Aparat Python APIAparat(Persian: آپارات‎, Âpârât) is an Iranian video sharing service (source: wikipedia [1])FeaturesLoginProfileSearchProfile CategoriesVideoVideo CategoriesVideo By UserComment By VideoVideo By TagUpload VideoDownload VideoHow to loginfromaparatimportAparataparat=Aparat()user=aparat.login('username','password')How to upload a videofromaparatimportAparataparat=Aparat()user=aparat.login(username,password)form=aparat.uploadForm(user.username,user.ltoken)video=aparat.uploadPost(form=form,video_path='video.mp4',title='title',category=10,tags=['tag1','tag2','tag3'],allow_comment=True,descreption='desc',video_pass=False)References:[1]https://en.wikipedia.org/wiki/Aparat
Package: aparse
AparseAparse is a python argparse extension with support for typing. It has support forargparseandclicklibraries. It uses function signatures to automatically register arguments to parsers.
Please refer to thedocumentation.The following features are currently supported:Arguments withint,float,str,boolvalues both with and without default value.List ofint,float,str,booltypes.Types withfrom_strmethod.dataclassarguments, where the dataclass is expanded into individual parametersMulti-leveldataclassarguments.argparseandclicklibraries are fully supported.Forargparse, when classes are used, it supports traversing inheritance chain.Forargparse, custom prefixes can be used for groups of parameters.Callbacks before and after arguments are parsed.Conditional arguments, where the type of arguments depends on the value of another argument.Why aparseWhy not argparse?Aparse does not force you to replace your argparse code. In fact, it was
designed to extend argparse. You can combine the original argparse code
and in some parts of the code, you can let aparse generate the arguments
automatically.Furthermore, aparse allows you to use conditional parameter parsing, which
cannot be achieved with pure argparse.Why not click?Same as with argparse, aparse extends click in such a way, that you can
combine the original code with aparse. With aparse, you don't have to
decorate your commands with all options, but you can let aparse manage
them for you.Why not docopt?With docopt you have to keep documentation in sync with your code.
Aparse uses the signatures instead, which allows you to validate
your code with a typechecker.InstallationInstall the library from pip:$ pip install aparseGetting startedUsing argparse libraryExtend a function with@add_argparse_argumentsdecorator to add arguments automatically:importargparsefromaparseimportadd_argparse_arguments@add_argparse_arguments()defexample(arg1:str,arg2:int=5):passparser=argparse.ArgumentParser()parser=example.add_argparse_arguments(parser)args=parser.parse_args()# Call example with argsexample.from_argparse_arguments(args)Extend a class with@add_argparse_argumentsdecorator to construct it automatically:importargparsefromaparseimportadd_argparse_arguments@add_argparse_arguments()classExample:def__init__(self,arg1:str,arg2:int=5):passparser=argparse.ArgumentParser()parser=Example.add_argparse_arguments(parser)args=parser.parse_args()# Construct Example with argsinstance=Example.from_argparse_arguments(args)Using click libraryImportaparse.clickinstead ofclickand letaparseregister all
the arguments and options:# python main.py --arg1 test --arg2 4fromaparseimportclick@click.command()defexample(arg1:str,arg2:int=5):passexample()When usingclick.groups:# python main.py example --arg1 test --arg2 4fromaparseimportclick@click.group()defmain():pass@main.command('example')defexample(arg1:str,arg2:int=5):passmain()For further details please look at thedocumentation.LicenseMIT
Package: a-parser
Python module for working with A-Parser API.
Compatible with Python version 2.7.* and >=3.8.Usage# example
from a_parser import AParser

aparser = AParser('http://127.0.0.1:9091/API', 'your pass')
print(aparser.ping())

# output
# { 'success': 1, 'data': 'pong' }

taskId = aparser.addTask(
    [['SE::Google', 'default',
        {
            'type': 'override',
            'id': 'formatresult',
            'value': '$serp.format("$anchor\\n")'
        }, {
            'type': 'override',
            'id': 'pagecount',
            'value': 1
        }, {
            'type': 'override',
            'id': 'useproxy',
            'value': False
        }
    ]],
    'default',
    'text',
    'diamond',
    resultsFormat= '$p1.preset',
    uniqueQueries= False,
    queryFormat= ['$query'],
    resultsUnique= 'no',
    resultsSaveTo= 'file',
    resultsFileName= '$datefile.format().txt',
    doLog= 'no',
    keepUnique= 'No',
    moreOptions= False,
    resultsPrepend= '',
    resultsAppend= '',
    configOverrides= [],
    queryBuilders= []
)['data']

aparser.waitForTask(taskId)
print(aparser.getTaskResultsFile(taskId))

# output
# {'success': 1, 'data': 'http://127.0.0.1:9091/downloadResults?fileName=Jul-29_17-33-37.txt&token=utmxidbc'}

print(aparser.oneRequest('SE::Yahoo::Suggest', 'default', 'spider'))

# output
# {'success': 1, 'data': {'resultString': 'spider - spider:\nspider solitaire\nspiderman\nspider bites\nspider bite pictures\nspider solitaire two suits\nspider plant\nspider-man\nspider solitaire free\nspider bites pictures and symptoms\nspider monkey\n', 'logs': [[0, 1596033005, 'Parser SE::Yahoo::Suggest::0 parse query spider'], [0, 1596033005, 'Use proxy http://51.255.55.144:28466'], [0, 1596033006, 'GET(1): http://sugg.search.yahoo.com/gossip-us-fp/?nresults=10&amp;output=yjson&amp;version=&amp;command=spider - 200 OK (0.3 KB)'], [3, 1596033006, 1], [0, 1596033006, 'Thread complete work']]}}Documentationhttps://a-parser.com/wiki/user-api/
Package: aparser-async-api
aparser-async-apiAsyncio is an alternativemodule api-pythonfor working with A-parser.aparser-async-api1. Dependencies2. Implementation details3. Usage example1. Dependenciesaiohttp3.8 or never;Python 3.7 or newer.2. Implementation detailsAdaptation of synchronous code should require a minimum of effort.
All method names are identical to the original ones. The structure of the class is also similar to the original.3. Usage exampleimportasynciofromaparser_async_apiimportAParserAPARSER_URL='''your A-parser API URL'''APARSER_PASS='''your A-parser API password'''asyncdefmain():task_id=1api=AParser(APARSER_URL,APARSER_PASS)print(f'Ping:{awaitapi.ping()}\n')print(f'A-parser Info:{awaitapi.info()}\n')print(f'File link:{awaitapi.getTaskResultsFile(task_id)}\n')print(f'Task state:{awaitapi.getTaskState(task_id)}\n')print(f'Task config:{awaitapi.getTaskConf(task_id)}\n')print(f'Task list:{awaitapi.getTasksList()}')awaitapi.close()# Mandatory closure of the session `aiohttp.ClientSession` if you no longer need itif__name__=='__main__':asyncio.run(main())
Package: apasswordmanager
APassword ManagerAPassword Manager is a simple Python password manager. It allows you to securely save secrets with a simple CLI interface.FeaturesLocal database, each email and passwords are encrypted with a unique code using AES encryptionMaster key is hashedPossibility to create an unlimited number of managersClipboard detectedPassword suggestions for password generatorUsageLocallyPackageInstallation and setupAPassword Manager 0.1.x can only be run locally.Cloning the projectgitclonehttps://github.com/AgentPython/AdvancedPasswordManager.gitInstall dependenciesoptional: virtual environmentpoetrypoetryinstallpippipinstall-rrequirements.txtRunpoetrypoetryrunapppythonpython-msrc.apasswordmanager.mainUpcomingRelease date : May 13, 2023 (in a week)APasswordManager 1.0.x requiressqlcipherto be installed on your machine.
APasswordManager is packaged so you can use it in your project or in your terminal.
Which means can be installed withpip install apasswordmanagerFeaturesExternal database with SQLite + SQLCipherAdding unique salt for every passwords, emails, and notes.Import or export in JSON
Package: apatterson189-google-api-helpers
google_api_helpersPython helpers for using google apisinstallpip install apatterson189-google-api-helpersSetupCreate a GCP projectCreate a set of credentialsdownload the credentials (as credentials.json for example)The first step of using these tools should be to provide the credentials of the GCP project that will be used to access the data, via "google_api_helpers.auth.setStoredCredentialsLocation".usageimport google_api_helpersBuildpython3 setup.py sdist bdist_wheelUploadpython3 -m twine upload dist/*Testpython setup.py pytestNotesIMPORTANT: Run tests only with accounts for which important data is not stored in drive. The data may be lost.based onhttps://packaging.python.org/tutorials/packaging-projects/andhttps://medium.com/analytics-vidhya/how-to-create-a-python-library-7d5aea80cc3f
Package: apcase
samplecode：fromapcaseimportapdata=[[1,2,3],[4,5,6]]print(ap.allpairs(data))result:[(1, 4), (1, 5), (1, 6), (2, 4), (2, 5), (2, 6), (3, 4), (3, 5), (3, 6)]code:fromapcaseimportapdata=[[1,2,3],[4,5,6]]fora,binap.allpairs(data):print("a=%s&b=%s"%(a,b))result:a=1&b=4
a=1&b=5
a=1&b=6
a=2&b=4
a=2&b=5
a=2&b=6
a=3&b=4
a=3&b=5
a=3&b=6
Package: apc-ipmi-monitor-ericbo
ericbo/apc-ipmi-monitorWARNING!This is just a prof of concept I created during some free time. It
is not in a state were I would use it in my own homelab yet.A tool designed for non enterprise APC branded UPS's. This will allow you to define
many IPMI devices across your network and will trigger a graceful shutdown on all
servers in the event there is an extended power outage.Getting StartedIn the system that will be directly interfacing with the APC UPS, you must have
apcupsd and ipmitool installed. On Ubuntu, this can be installed with the following
commands:sudoapt-get-yinstallapcupsd
sudoapt-get-yinstallipmitoolRunning apcupsdFor this script to monitor the status of your APC batteryapcupsdmust be running.
Assuming you are using an APC with a single USB connection, make sureUPSCABLEandUPSTYPEare both set tousbin your/etc/apcupsd/apcupsd.conffile. I
would also suggest commenting outDEVICE /dev/ttyS0. Example:## apcupsd.conf v1.1 ##
...
UPSCABLE usb
...
UPSTYPE usb
...
#DEVICE /dev/ttyS0sourceRunning the MonitorYou will need pip installed, specifically pip for python 3. You can then directly
install this package via pypi.org by running the following:sudo apt-get -y install python3-pip
pip3 install apc-ipmi-monitor-ericboNext create a simple config file with a list of your servers & credentials:servers:server 1:hostname:0.0.0.0username:ADMINpassword:ADMINserver 2:hostname:0.0.0.0username:ADMINpassword:ADMINapc_shutdown_threshold:field:BCHARGE# Which field do you want to considervalue:80# When the field dips bellow this value, all servers will shutdownFinally you can get a quick overview of all your IPMI devices by running:apc-ipmi-monitor monitoring server-statusRunning on StartupFinally, you will want to ensure this monitor is being ran regularly. I would
suggest using systemctl or crontabs. The example bellow is a simple crontab setup.
In the future there will be a full guide on setting this up with systemctl.crontab -e

* * * * * python /home/user/upc-ipmi-tool/src/__main__.py # Run every minute