Saravanan666/pypi-org huggingface dataset:
Package: pymesomb
Welcome to pymesomb 👋Python client for MeSomb ServicesYou can check the fulldocumentation of the api here🏠HomepageInstallpip3installpymesombUsageCollect money from an accountfrompymesomb.operationsimportPaymentOperationfrompymesomb.utilsimportRandomGeneratorfromdatetimeimportdatetimeoperation=PaymentOperation('<application_key>','<access_key>','<secret_key>')response=operation.make_collect({'amount':100,'service':'MTN','payer':'670000000','date':datetime.now(),'nonce':RandomGenerator.nonce(),'trxID':'1'})print(response.is_operation_success())print(response.is_transaction_success())Depose money in an accountfrompymesomb.operationsimportPaymentOperationfrompymesomb.utilsimportRandomGeneratorfromdatetimeimportdatetimeoperation=PaymentOperation('<application_key>','<access_key>','<secret_key>')response=operation.make_deposit({'amount':100,'service':'MTN','receiver':'670000000','date':datetime.now(),'nonce':RandomGenerator.nonce(),'trxID':'1'})print(response.is_operation_success())print(response.is_transaction_success())Get application statusfrompymesomb.operationsimportPaymentOperationoperation=PaymentOperation('<application_key>','<access_key>','<secret_key>')response=operation.get_status()print(response.name)Get transactions by IDsfrompymesomb.operationsimportPaymentOperationoperation=PaymentOperation('<application_key>','<access_key>','<secret_key>')response=operation.get_transactions(['ID1','ID2'])print(response)Author👤Hachther LLCcontact@hachther.comWebsite:https://www.hachther.comTwitter:@hachtherGithub:@hachtherLinkedIn:@hachtherShow your supportGive a ⭐️ if this project helped you!1.0.3 (2024-01-24)Handle case when trxID is not stringFix crash to display responseAdd raw_response in TransactionResponse to store MeSomb response.1.0.2 (2023-07-25)=== BREAKING CHANGES ===Only one parameter is now passed to make_deposit and make_collect. The parameter is a Map that will contain all details of your request.All method is now returning MeSomb model not dict1.0.0 (2022-10-20)First release of the module.
Package: py-message-headers
Reason this existsWouldn't it be better to retrieve Http header information using a Http header constants, like thisrequest_headers.get(http.REFERER). Constants such ashttp.REFERERfor the stringRefererreduces typos, and having to remember the exact spelling for Http headers.This library does the following:Refers to the list of headers registered with IANA:https://www.iana.org/assignments/message-headers/message-headers.xhtml. The definitions are available for download, as CSV files. These files are present in thereferencesfolder.Generates the headers, under theheaderspackage, using the locally available CSVreferencesfiles.Usagefrom headers import http, mime

...
request_headers.get(http.HOST) # provides access to the 'Host' header from the request
mail_headers.get(mime.Content_Location)
...Other libraries'Http lazy headers': which also provides validation, and formatting options to the values that can be set to the Headers:https://github.com/nitely/http-lazy-headers
Package: py-message-listener
message-listenerThis module can be used for listening to the messages from aws sqs.Requirementsinstall modulepip install py-message-listenerFollow bellow steps for using this moduleAdd@Listenerdecorator to method or function where do you want to receive the message, for that method/function
add single parameter, This parameter is set whenever the message is received and method will be called and message
will be passed as argument.In decorator pass queue name indestinationargumentset these environment variables:AWS_REGION,AWS_ACCOUNT_ID,AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEYAdded kwargs for configuring listenervisibility_timeout,wait_time_secondsandmax_number_of_messagespoll_after_secondsthis argument specify how much time to wait before requesting for the messagesdelete_on_exceptionthis argument specifies , whether to delete the message if any exception occurs while
processing the messageTo delete the message returnTruefrom the message processing methodAWS_ACCOUNT_IDthis will be used for generating the queue urlSample CodefromlistenerimportListener@Listener(destination='test.fifo')deffun(msg:str):print(msg)returnTrue
Package: pymessages
PYMESSAGES - Google Messages Client for PythonWhat is this?This is aGoogle MessagesClient library to send message with a backend .eg. with flask to send otp messages. This module uses your own number to work as a sms gateway api and you can send message to other person with your own number. Ported frommessages-web by Swapnil Soni.How to useinstall the package fromPyPIpipinstallpymessagesUse itWithout credentialsfrompymessages.clientimportMessagesClientimportjsonimportbase64importreclient=MessagesClient()@client.on('qr-code')asyncdefon_qr_code(base64Image):print("Generating qr code.")withopen("qr.jpg","wb")asf:f.write(base64.b64decode(re.sub(r'^data:image\/png;base64,','',base64Image)))@client.on('authenticated')asyncdefon_authenticated(service):print("Authenticated")creds=awaitclient.getCredentials()withopen("credentials.json",'w')asf:json.dump(creds,f,indent=4)client.launch()client.idle()Then you can usecredentials.jsonfile to login .With credentialsfrompymessages.clientimportMessagesClientimportjsoncreds=MessagesClient.loadCredentialFile('credentials.json')client=MessagesClient(creds)@client.on('authenticated')asyncdefonAuthenticated(service):inbox=awaitservice.getInbox(start=10,limit=20)#will return 20 elements starting from the 11th element.# By default, start is 0 and limit is 50. You can set limit to -1 to return all elements after the starting point.print(json.dumps(inbox,indent=4))client.launch()client.idle()send messagefrompymessages.clientimportMessagesClientcreds=MessagesClient.loadCredentialFile('credentials.json')client=MessagesClient(creds)TO="+919876543210"MSG="Test message sent using PyMessages wrapper."@client.on('authenticated')asyncdefonAuthenticated(service):print("Sending Messages.")awaitservice.sendMessage(TO,MSG)print("Done.")client.launch()client.idle()Examples are givenhere.Todosadd pagination in getInboxadd sendMessage in Serviceadd public method in client to save credentials to a filesendMessage: parse to var to check if country code is included or notRewrite docs with proper detailsdetect if phone is not connecteddetect if web client is open in another browser or notUse logger moduleLicenseISC - Swapnil Soni ©
Package: pymessari
pymessaripython api client formessari.Official API Document.InstallpipinstallpymessariQuick startfrompymessariimportAPIapi=MessariAPI(api_key=<API_KEY>)asset_client=api.asset()market_client=api.market()news_client=api.news()protocol_client=api.protocol()timeseries_client=api.timeseries()
Package: pymessenger2
Python Wrapper forFacebook Messenger
Platform.Disclaimer: This wrapper isNOTan official wrapper and do not
attempt to represent Facebook in anyway.AboutThis wrapper has the following functions:send_text_message(recipient_id, message)send_message(recipient_id, message)send_generic_message(recipient_id, elements)send_button_message(recipient_id, text, buttons)send_quick_reply(recipient_id, text, buttons)send_attachment(recipient_id, attachment_type, attachment_path)send_attachment_url(recipient_id, attachment_type, attachment_url)send_image(recipient_id, image_path)send_image_url(recipient_id, image_url)send_audio(recipient_id, audio_path)send_audio_url(recipient_id, audio_url)send_video(recipient_id, video_path)send_video_url(recipient_id, video_url)send_file(recipient_id, file_path)send_file_url(recipient_id, file_url)send_action(recipient_id, action)send_raw(payload)get_user_info(recipient_id)You can see the code/documentation for there inbot.py.The functions return the full JSON body of the actual API call to
Facebook.Register for an Access TokenYou’ll need to setup aFacebook
App, Facebook Page, get the
Page Access Token and link the App to the Page before you can really
start to use the Send/Receive service.This quickstart guide should
helpInstallationpipinstallpymessenger2Usagefrompymessenger2.botimportBotbot=Bot(<access_token>,[optional:app_secret])bot.send_text_message(recipient_id,message)Note: From Facebook regarding User IDsThese ids are page-scoped. These ids differ from those returned from
Facebook Login apps which are app-scoped. You must use ids retrieved
from a Messenger integration for this page in order to function
properly.Ifapp_secretis initialized, an app_secret_proof will be
generated and send with every request. Appsecret Proofs helps
further secure your client access tokens. You can find out more on
theFacebook
DocsSending a generic template message:Generic Template
Messagesallows you to add cool elements like images, text all in a single
bubble.frompymessenger2.botimportBotfrompymessenger2importElementbot=Bot(<access_token>)elements=[]element=Element(title="test",image_url="<arsenal_logo.png>",subtitle="subtitle",item_url="http://arsenal.com")elements.append(element)bot.send_generic_message(recipient_id,elements)Output:Generic Bot OutputSending an image/video/file using an URL:frompymessenger2.botimportBotbot=Bot(<access_token>)image_url="http://url/to/image.png"bot.send_image_url(recipient_id,image_url)TodoStructured MessagesReceipt MessagesAirlinesTests!ExampleScreenshot of Echo Facebook BotYou can find an example of an Echo Facebook Bot inexamples/
Package: pymessenger3
Python Wrapper forFacebook Messenger
Platform.Disclaimer: This wrapper isNOTan official wrapper and do not
attempt to represent Facebook in anyway.AboutThis wrapper has the following functions:send_text_message(recipient_id, message)send_message(recipient_id, message)send_generic_message(recipient_id, elements)send_button_message(recipient_id, text, buttons)send_quick_reply(recipient_id, text, buttons)send_attachment(recipient_id, attachment_type, attachment_path)send_attachment_url(recipient_id, attachment_type, attachment_url)send_image(recipient_id, image_path)send_image_url(recipient_id, image_url)send_audio(recipient_id, audio_path)send_audio_url(recipient_id, audio_url)send_video(recipient_id, video_path)send_video_url(recipient_id, video_url)send_file(recipient_id, file_path)send_file_url(recipient_id, file_url)send_action(recipient_id, action)send_raw(payload)get_user_info(recipient_id)You can see the code/documentation for there inbot.py.The functions return the full JSON body of the actual API call to
Facebook.Register for an Access TokenYou’ll need to setup aFacebook
App, Facebook Page, get the
Page Access Token and link the App to the Page before you can really
start to use the Send/Receive service.This quickstart guide should
helpInstallationpipinstallpymessenger2Usagefrompymessenger2.botimportBotbot=Bot(<access_token>,[optional:app_secret])bot.send_text_message(recipient_id,message)Note: From Facebook regarding User IDsThese ids are page-scoped. These ids differ from those returned from
Facebook Login apps which are app-scoped. You must use ids retrieved
from a Messenger integration for this page in order to function
properly.Ifapp_secretis initialized, an app_secret_proof will be
generated and send with every request. Appsecret Proofs helps
further secure your client access tokens. You can find out more on
theFacebook
DocsSending a generic template message:Generic Template
Messagesallows you to add cool elements like images, text all in a single
bubble.frompymessenger2.botimportBotfrompymessenger2importElementbot=Bot(<access_token>)elements=[]element=Element(title="test",image_url="<arsenal_logo.png>",subtitle="subtitle",item_url="http://arsenal.com")elements.append(element)bot.send_generic_message(recipient_id,elements)Output:Generic Bot OutputSending an image/video/file using an URL:frompymessenger2.botimportBotbot=Bot(<access_token>)image_url="http://url/to/image.png"bot.send_image_url(recipient_id,image_url)TodoStructured MessagesReceipt MessagesAirlinesTests!ExampleScreenshot of Echo Facebook BotYou can find an example of an Echo Facebook Bot inexamples/
Package: pymetabiosis
A bridge between PyPy and CPython that works by embedding CPython, its main purpose it to allow you to use any CPython module on PyPy (including C extensions).PyMetabiosis tries to link with the python command available on $PATH, however you can override this (if you want to use a virtualenv and/or if “python” points to PyPy) by setting thePYTHON_EMBEDenvironment variable to a virtualenv (or /usr)Use pymetabiosis.module.import_module to import cpython modules on PyPyInstallationBefore pip installing the package, you must set thePYTHON_EMBEDenvironment variable to a Python virtualenv (or /usr) and then dopip installgit+https://github.com/rguillebert/pymetabiosis
Package: pyMetaClasses
pyMetaClassesA collection of MetaClasses for Python.MetaclassesSingletonAllow only a single instance of a class.⇒ See documentation ofpyMetaClasses.SingletonOverloadingAllow method overloading in Python classes. Dispatch method calls based on
method signatures (type annotations).⇒ See documentation ofpyMetaClasses.OverloadingContributorsPatrick Lehmann(Maintainer)and more...LicenseThis Python package (source code) licensed underApache License 2.0.The accompanying documentation is licensed underCreative Commons - Attribution 4.0 (CC-BY 4.0).SPDX-License-Identifier: Apache-2.0
Package: pymetacode
pymetacodeA Python package helping to write and maintain Python packages.Code that writes code– yes, that’s correct. Automating the boring stuff, one could say, or helping to focus on the creative part of programming. In any case, the idea for this package stems from experience with a couple of Python projects, and as such it is prettyopinionated, focussing on personal needs regarding structure and layout. Nevertheless, it tries to be as user-friendly as possible, coming with an intuitive command-line interface (CLI).Want to get an idea? Here you go.Creating a new packagewould be a two-step process:Write a configuration file for your new package (and afterwards fill it with sensible content)pymetawriteconfigtomypackage_config.yamlCreate the basic Python package structure for your package.pymetacreatepackagefrommypackage_config.yamlOnce you have your package structure, you canadd modules, classes, and functionsto your package fromwithin the package’s root directoryat any time:pymetaaddmodulemymodulepymetaaddclassMyClasstomymodulepymetaaddfunctionmy_functiontomymoduleIf you ever want to add agraphical user interface (GUI)to your project, this is (now) possible as well:pymetaaddguipymetaaddwindowmysubwindowAnd now - happy coding!FeaturesA list of features:Create initial package structure (directory layout, files)Add module, class, and function scaffolds to an existing project, including tests and API documentationAdd initial (Qt) GUI subpackage structure (directory layout, files)Add (Qt) GUI window scaffolds to existing project, including tests and API documentationIntuitive command-line interface (CLI)Initialise git repository; automatically incrementing version number with each commitAnd to make it even more convenient for users and future-proof:Open source project written in Python (>= 3.7)Developed fully test-drivenExtensive user and API documentationInstallationTo install the pymetacode package on your computer (sensibly within a Python virtual environment), open a terminal (activate your virtual environment), and type in the following:pipinstallpymetacodeLicenseThis program is free software: you can redistribute it and/or modify it under the terms of theBSD License.
Package: pymetadata
pymetadata: python utilities for metadata and COMBINE archivespymetadata is a collection of python utilities for working with
metadata in the context of COMBINE standards with source code available fromhttps://github.com/matthiaskoenig/pymetadata.Features include among othersCOMBINE archive version 1 support (OMEX)annotation classes and helpersSBO and KISAO ontology enumsIf you have any questions or issues pleaseopen an issue.DocumentationDocumentation is still work in progress. For an example usage of the COMBINE archive
seesrc/pymetadata/examples/omex_example.py.How to citeContributingContributions are always welcome! Please read thecontributing guidelinesto
get started.LicenseSource Code:LGPLv3Documentation:CC BY-SA 4.0The pymetadata source is released under both the GPL and LGPL licenses version 2 or
later. You may choose which license you choose to use the software under.This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License or the GNU Lesser General Public
License as published by the Free Software Foundation, either version 2 of the
License, or (at your option) any later version.This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.FundingMatthias König is supported by the Federal Ministry of Education and Research (BMBF, Germany)
within the research network Systems Medicine of the Liver (LiSyM, grant number 031L0054)
and by the German Research Foundation (DFG) within the Research Unit Programme FOR 5151
“QuaLiPerF(Quantifying Liver Perfusion-Function Relationship in Complex Resection -
A Systems Medicine Approach)” by grant number 436883643 and by grant number 465194077 (Priority Programme SPP 2311, Subproject SimLivA).Installationpymetadatais available frompypiand
can be installed via:pip install pymetadataDevelop versionThe latest develop version can be installed via:pip install git+https://github.com/matthiaskoenig/pymetadata.git@developOr via cloning the repository and installing via:git clone https://github.com/matthiaskoenig/pymetadata.git
cd pymetadata
pip install -e .To install for development use:pip install -e .[development]© 2021-2022 Matthias König
Package: pymetaf
pymetafThis is a python package to parse raw METAR and TAF report text.InstallationClone this repository and run$ python setup.py installin your terminal.Use Pip$ pip install pymetafUsage>>>frompymetafimportparse_text>>>text='METAR ZYAS 250500Z 21009G14MPS 6000 NSC 18/08 Q1018 NOSIG'>>>parse_text(text,2021,5){'kind':'METAR','icao':'ZYAS','datetime':'2021-05-25T05:00:00+00:00','wind_direction':210,'wind_direction_units':'degree','wind_speed':9,'wind_speed_units':'m/s','gust':14,'wind_direction_range':None,'cavok':False,'visibility':6000,'visibility_units':'m','temperature':18,'dew_temperature':8,'temperature_units':'degree C','qnh':1018,'qnh_units':'hPa','cloud':[{'cloud_mask':0,'cloud_height':None,'cloud_height_units':'m','cloud_type':None}],'weather':['Clear Sky'],'auto':False}Enjoy it!
Package: pymetager
ABuildNNOpen Source project.Installing$ pip install pymetageror from source$ git clone https://github.com/buildnn/pymetager
$ cd pymetager
$ pip install -e .Quickstart$ pymetager --help
Usage: pymetager [OPTIONS] COMMAND [ARGS]...

Options:
  -q, --quiet       Flag for minimal output.
  --config_fp FILE  Custom path for setup.cfg.  [default: ./setup.cfg]
  --help            Show this message and exit.

Commands:
  echo-meta-elm
  incrementlet’s use info print function$ pymetager echo-meta-elm --help
--- PYPACK-METAGER ---
A BuildNN Open Source project.
Reading/Writing from/to ./setup.cfg
Usage: pymetager echo-meta-elm [OPTIONS] [NAME]

Options:
  -s, --section TEXT
  --help              Show this message and exit$ pymetager echo-meta-elm version
--- PYPACK-METAGER ---
A BuildNN Open Source project.
Reading/Writing from/to ./setup.cfg
0.0.1Or, concisely$ pymetager -q echo-meta-elm version
0.0.1
Package: pymetaheuristics
PymetaheuristicsCombinatorial Optimization problems with quickly good soving.IntroductionPymetaheuristics is a package to help build and train Metaheuristics to solve
real world problems mathematically modeled. It strives to generalize the
overall idea of the technic and delivers to the user a friendly wrapper so the
cientist may focus on the problem modeling rather than the heuristic
implementation. This package is an open source project so feel free to send
your implementations and fixes so they may be helpful for others too.RequiresOnly needPython>=3.7. For now, no additional packages will be used.SubpackagesThe idea is to implement all possible Metaheuristics found on the market today
and some helper functions to improve what is already there.Note: This package is under construction, new features will come up soon.What Metaheuristics can be found on this project?Genetic AlgorithmHow to useFirst install the package (available on pypi)$pipinstallpymetaheuristicsImport the algorithm model you want to use to solve you problem. Implement the
needed functions and pass to the model. Train and get the results.frompymetaheuristics.genetic_algorithm.modelimportGeneticAlgorithmmodel=GeneticAlgorithm(fitness_function=fitness_function,genome_generator=genome_generator)result=model.train(epochs=15,pop_size=10,crossover=pmx_single_point,verbose=True)Every module has its integration test, which I submit the model for testing
with very know NP-Hard problems today (Knapsack, tsp, ...). If you want to see
how it goes, check out the integrations under the model testing folder.How to contributeYour code and help is very appreciate! Please, send your issue and pr's
whenever is good for you! If needed, send anemailto me I'll be very glad to help. Let's
build up together.
Package: pymetalog
pymetalogColin Smith, Travis Jefferies, Isaac J. Faberpip install pymetalogThe Python Metalog DistributionThis repo is a working project for a python package (pymetalog) that generates functions
for the metalog distribution. The metalog distribution is a highly
flexible probability distribution that can be used to model data without
traditional parameters.Metalog BackgroundIn economics, business, engineering, science and other fields,
continuous uncertainties frequently arise that are not easily- or
well-characterized by previously-named continuous probability
distributions. Frequently, there is data available from measurements,
assessments, derivations, simulations or other sources that characterize
the range of an uncertainty. But the underlying process that generated
this data is either unknown or fails to lend itself to convenient
derivation of equations that appropriately characterize the probability
density (PDF), cumulative (CDF) or quantile distribution functions.The metalog distributions are a family of continuous univariate
probability distributions that directly address this need. They can be
used in most any situation in which CDF data is known and a flexible,
simple, and easy-to-use continuous probability distribution is needed to
represent that data. Consider theiruses and
benefits. Also
consider theirapplicationsover a wide range of fields and data sources.This repository is a complement and extension of the information found
in thepaper
publishedin Decision Analysis and thewebsite