Saravanan666/pypi-org huggingface dataset:
Package: pytedee-async
Python Tedee Async Client PackageThis is a Tedee Lock Client package. It is an async implementation ofjoerg65's original package.Install:From pippip install pytedee-asyncLocallypipenvinstall-e.# orpython3setup.pyinstallTry it outGenerate personal key. Instructions:https://tedee-tedee-api-doc.readthedocs-hosted.com/en/latest/howtos/authenticate.html#personal-access-keyMinimal scopes required for enable integration are:Devices.ReadLock.Operatewithexample.py: Create a fileconfig.jsonnext toexample.py:{"personalToken":"<your token>"}cd into the directory of those to files and runpython example.pyInitiate an instance ofTedeeClientfrompytedee_asyncimportTedeeClientpk="<your PersonalKey>"# through initclient=TedeeClient(pk)# is initialized with no locksclient.get_locks()# get the locks# through classmethod# will initialize directly with all locks you haveclient=awaitTedeeClient.create(pk)the locks are avialable in a dictionaryclient.locks_dictwith the key of the dict being the serial number of each lock, or in a listclient.locks
Package: pytee2
pytee2pytee2 is a package providing functionalities of redirectingstdoutandstderrto a string and an output file. The key feature of pytee2 is that it can redirectstdoutandstderrfrom C binding invocations.Table of Contentspytee2InstallationUsageKnown issuesLicenseInstallationpip install pytee2Usagefrompytee2importTeetee=Tee(output_filepath='output.txt')tee.start()# do many things...tee.stop()Now thestdoutandstderrhave been saved to output.txt, and you can get the string version of the output bycapturedtext=tee.get_capturedtext()Known issuespytee2 cannot work properly on Windows. This issue should be fixed in the future.Licensepytee2is distributed under the terms of theMITlicense.
Package: pyteen
IntroThis is a tiny collection of self-contained, useful, short Python code snippets that are (1) all tested and validated, (2) easy to contribute to, and (3) simple to reuse.Size MattersThe main aspect here is code size which at the start was a strict limit of ten lines of code because in Python this already allows for solving useful little tasks, and the first chosen project name was “tenliners” (not so funny, agreed). Of course, some code is more useful than some other, hence it makes little sense to count comments or docstrings or empty lines (non-code). In fact, you soon realize you only really care about “effective code”, the one that has the most effect (or value) to solve your task or demonstrate something. And there is very little effect of this in lines with only opening or closing brackets, braces or parentheses which people sometimes write to manually structure data. Same with imports which only enable you to use some modules. What is left is code that really does something when it executes. And this is what we are trying to measure here. Now the number ten is somewhat arbitrary (why not 11?) and it can be hard or impossible to express some interesting things with ten or less lines, even in Python. Therefore the concept of “ten” was stretched a bit into “teen” leading to the name “Pyteen” and a limit of 19 lines of effective code. Let’s see where that goes!More to come…
Package: pyteetime
The Unix commandteesplits the output of a program so that it is both
displayed on screen and written to a file. Thepyteetimepackage
provides such a functionality in Python. It is based on the original
code fromA.
Peck, with a
few classmethods added.Usage:Run the example scripttee-test.pylisted here:frompyteetimeimportteeimportsysprint('This prologue will appear on screen but not in a logfile')LOGFILE=tee.stdout_start(append=False)# STDOUT# from now on, all output is also copied to the logfiletee.stderr_start(append=False)# STDERR# from now on, all output to STDERR is also copied to stderr.logprint('This text will appear on screen and also in the logfile')print('This will appear on screen and also in stderr.log',file=sys.stderr)# input from keyboard does not go to logfile:answer=input('Enter something!\n')# show the input to make sure it also goes into the logfile:print('The user typed:%s'%(answer))# data written to a file is not copied to the logfile:DATAFILE=open('tee-test.dat','w+')print(list(range(5)),file=DATAFILE)DATAFILE.close()print('This goes to the logfile but will not appear on screen',file=LOGFILE)tee.stdout_stop()# from now on, output to STDOUT will not go to stdout.log anymoretee.stderr_stop()# from now on, output to STDERR will not go to stderr.log anymoreprint('This epilogue will appear on screen but not in a logfile')
Package: pyTEF
pyTEFpyTEF is a Python package that can be used to apply the Total Exchange Framework (TEF) to analyze the exchange flow of an estuary.To do so TEF analyzes the exchange flow in salinity and/or temperature coordinates rather than spatial coordinates since the dynamics of most estuaries are controlled by the salt distribution. This package provides the necessary tools to use the TEF framework and is built on top of xarray.InstallingTo install usegit clone https://github.com/florianboergel/pyTEF.gitand thenpip install -e pyTEFHow to use00_tef_core.ipynbcontains the TEF framework and all documentation.01_calc.ipynbmainly contains the coordinate transformation of the transport terms and the calculation of the bulk valuesFurther you find different examples on how to use the TEF framework.02_example_analytical.ipynb- validation of the pyTEF package03_example_persian_gulf.ipynb- example TEF analysis applied to the Persian GulfLearn about TEFThe TEF analysis framework (Burchard et al., 2018; Lorenz et al., 2019; MacCready, 2011) allows a consistent calculation of the transports and salinities of an exchange flow in salinity space (or every other coordinate). The main idea of TEF is that transports of volume and salinity in and out the estuary of the same salinity partially compensate since only the net exchange changes salinity and volume of the estuary.The reader is referenced to the follwing literature:PhD thesis of Marvin LorenzBurchard, H., et al. (2018) The Knudsen theorem and the Total Exchange
Flow analysis framework applied to the Baltic Sea. Progress in Oceanography,
10.1016/j.pocean.2018.04.004.Lorenz, M., Klingbeil, K., and Burchard, H. (2020) Numerical Study of the Persian Gulf using an Extended Total Exchange Flow Analysis Framework, J. Geophys. Res. Oceans, 125, e2019JC015527,https://doi.org/10.1029/2019JC015527Lorenz, M., Klingbeil, K., MacCready, P., and Burchard, H. (2019) Numerical issues of the Total Exchange Flow (TEF) analysis framework for quantifying estuarine circulation, Ocean Sci., 15, 601-614,https://doi.org/10.5194/os-15-601-2019MacCready, P., 2011: Calculating estuarine exchange flow using isohaline coordinates. Journal of Physical Oceanography, 41 (6), 1116–1124.What's newv0.2 (07.06.2021)first version of pyTEF ready for testingexample cases addedcalculation of bulk valuesalgorithm that finds minima and maxima in a given Q profileadded documentationv0.1 (25.05.2021)implementation of 2D sorting
Package: pytekdatamuse
pytekdatamuse.DocumentationThe cli script provides 22 subcommands to avail the various functionalities
offered by the API.Look at theDatamuse API Docsfor a detailed
description.How to Install#Interminaldo:$pipinstallpytekdatamuseUsageYou can use the cli script$tekdatamuse--help$tekdatamuse[subcommand]--help$tekdatamusedefinehypotheseshypothesesN 	 a tentative theory about the natural world; a concept that is not yet verified but that if true would explain certain facts or phenomenaN 	 a proposal intended to explain certain facts or observationsN 	 a message expressing an opinion based on incomplete evidenceFrom python scriptsimporttekdatamuseapi=tekdatamuse.Datamuse()# wordswords=api.words(sp="early",md="d")# get synonymssyns=api.synonyms("look")# get antonymsantonyms=api.antonyms("look")# get holonymsholonyms=api.holonyms("look")# get hypernymshypernyms=api.hypernyms("look")# get hyponymshyponyms=api.hyponyms("look")# get meronymsmeronyms=api.meronyms("look")# get homophoneshomophones=api.homophones("look")# get rhymesrhymes=api.rhymes("look")# get approximate rhymesapprox_rhymes=api.approx_rhymes("look")# get popular adjectives modifying a nounnoun_modifiers=api.noun_modifiers("look")# get popular nouns modified by the  adjectiveadj_modifiers=api.adj_modifiers("look")# get word definitiondefine=api.define("hypotheses")# autocompletecompletions=api.autocomplete("boo",max=20)# followersfollowers=api.followers("early")# predecessorspredecessors=api.predecessors("early")# right_contextright_context=api.right_context("early")# left_contextleft_context=api.left_context("early")# triggerstriggers=api.triggers("early")# means_likemeans_like=api.means_like("early")# sounds_likesounds_like=api.sounds_like("early")# spelled_likespelled_like=api.spelled_like("early")Building from Source for Developers$gitclonehttps://github.com/TralahM/pytekdatamuse.git$cdpytekdatamuseContributingSee the Contributing FileSee the Pull Request FileSupportLICENCERead the license hereSelf-Promotion
Package: pytekswift
pytekswift.DocumentationISO 9362 defines a standard format of Business Identifier Codes (also known as SWIFT-BIC, BIC, SWIFT ID or SWIFT code) approved by the International Organization for Standardization (ISO).
It is a unique identification code for both financial and non-financial institutions.
The acronym SWIFT stands for the Society for Worldwide Interbank Financial Telecommunication.
The ISO has designated SWIFT as the BIC registration authority.
When assigned to a non-financial institution, the code may also be known as a Business Entity Identifier or BEI.
These codes are used when transferring money between banks, particularly for international wire transfers, and also for the exchange of other messages between banks.
The codes can sometimes be found on account statements.Structure.The previous edition is ISO 9362:2009 (dated 2009-10-01).
The SWIFT code is 8 or 11 characters, made up of:4 letters: institution code or bank code.2 letters: ISO 3166-1 alpha-2 country code (exceptionally, SWIFT has assigned the code XK to Republic of Kosovo, which does not have an ISO 3166-1 country code)2 letters or digits: location codeif the second character is "0", then it is typically a test BIC as opposed to a BIC used on the live network.if the second character is "1", then it denotes a passive participant in the SWIFT networkif the second character is "2", then it typically indicates a reverse billing BIC, where the recipient pays for the message as opposed to the more usual mode whereby the sender pays for the message.3 letters or digits: branch code, optional ('XXX' for primary office)Where an eight digit code is given, it may be assumed that it refers to the primary office.How to Install# In terminal do:$pipinstallpytekswiftBuilding from Source for Developers$gitclonehttps://github.com/TralahM/pytekswift.git$cdpytekswift$pythonsetup.pyinstallContributingSee the Contributing FileSee the Pull Request FileSupportLICENCERead the license hereSelf-Promotion
Package: pytekukko
pytekukko -- Jätekukko Omakukko API clientSimple asyncio client for theJätekukkoOmakukkoAPI.The API of this package is modeled closely after the Omakukko
API. Only read operations are implemented (well apart from, strictly
speaking, login/logout), and there are no plans to add support for any
write ones.Usage in a nutshell:construct an aiohttpClientSession,construct aPytekukkoclient with it and your credentials,invoke methods on the client.The Omakukko API uses cookie based sessions, use a persistent aiohttpCookieJarto maintain client session across interpreter restarts.High level client methods handle logging in when the need to do so is
detected. If the detection is successful, there is no need to
separately track session expiration or use theloginmethod in the
first place.For usage examples, see utilities in thepytekukko.examplespackage. Executables and dependencies for these are installed when the
package is installed with theexamplesextra, invoke them with--helpfor usage and setup information:pytekukko-collection-schedules: output collection schedules in JSONpytekukko-invoice-headers: output basic info on invoices in JSONpytekukko-next-collections: output next collection dates in JSONpytekukko-update-google-calendar: update Google Calendar with
events for next collectionsDisclaimerThis package is not supported by or endorsed by Jätekukko. Do not
bother them with questions or issues related to it.
Package: pytek-wasiliana
pytek-wasilianaWasiliana USSD and SMS API SDKTable of ContentsQuickStartDocumentation/UsageContributingCreditsQuickStartInstallationpip install pytek-wasilianaFrom Sourcegit clone https://github.com/TralahM/pytek-wasiliana
cd pytek-wasilianaDocumentationAPI ReferenceContributingCredits
Package: pytele
Simplest telegram botThe simplest telegram bot out there that could be embedded into your apps as a notification service
and could listen and execute remote commands.Installationpip install pyteleIntroductionThe simplest telegram bot out there that could be embedded into your apps as a notification service and can listen and execute remote commands.from telegram import Bot

bot = Bot() # takens the BOT's token from environment variables - TELEGRAM_BOT_TOKEN
bot.send_msg(to='chait_id', msg='your message')The bot could listen and execute remote commands. In order to get started, please create a .yaml file
with the following structure:# commands.yaml

commands:
  1:
    name: Git status
    description: Get status of git from current directory
    command: /gitstatus
    action: git status
  2:
    name: Linux list
    description: List all file under current directory
    command: /ls
    action: lsThe action field should be exactly the same as the command executed on the CLI, e.g.action: ls - will list current directory
action: ls /etc - will list all files under /etcOnce created, register the commands via register_commands(...) method and start listening.
The specified interval, instructs the bot at what intervals to poll messages from telegram servers.
Defaults to 3 but could be overwritten.bot.register_commands('example_commands.yaml')
bot.listen(interval=5)
Package: pytelebirr
PyTeleBirr is mostly Telebirr With PythonExamples|Documentation|ChannelInstallationpip3 install -U pytelebirrorpip3 install -U git+https://github.com/TeleBirrApi/PyTeleBirr.gitUsagefrompytelebirrimportPyTeleBirrphone_no="<YOUR_PHONE_NUMBER_STARTS_FROM_9>"# Example 91234567passwd="<YOUR_PASSWORD>"# To get Device id use# You have to use this function one time.frompytelebirr.utilsimportget_device_iddevice_id=get_device_id(phone=phone_no,passwd=passwd,d_id="<Your Mobile Device ID>"# to get this for android users use device id app for iphone users ¯\_(ツ)_/¯)# after calling this function verification code will be sent via sms check 127# Code has been sent via sms# Enter The Code You Received : enter your code here# and you will get this message on terminal/cmd Your Device_id :  ...# Initialize PyTelebirrtelebirr=PyTeleBirr(device_id=device_id,phone_no=phone_no,passwd=passwd,)# get your balancebalance=telebirr.get_balance()# this returns dictbalance['balance']# 999999.00# generate beautiful qr code# now you can custom your qr code size and background color and payment amountimg_path=telebirr.generate_qrcode(amount=5,# 5 in birrsize=200,# optionalbg_color="ffffff"# color don't use #)# this return image path# refresh token tokens will expire in 86400s after logintelebirr.refresh_token()# this will refresh token# on payment received method you can pass callabletelebirr.on_payment(on_payment=lambdam:print(m))# when payment received on_payment function will be called# to check if transaction exists# returns bool or dicttelebirr.check_tx("ABCDE")# if tx id exists will return dict elase false# this method can check all telebirr transaction so be careful# check if the tx id payment was sent to metelebirr.is_my_tx("ABCDE")# returns bool if tx id was sent to me returns True else False# scan qr code# scan the receiver qr code and pass the contenttelebirr.scan_qr("1234567890")# returns dict data of user including phone number ;)# send payment to user via qr codetelebirr.send_payment(amount=5,phone="1234567890",content="123456789"# content of qr code)# returns dict# get your tokentelebirr.get_token()# returns str your tokenFeaturesPython solution.Send payment via qr code and phone numberChecking balanceGenerating beautiful qr codeyou can custom your qr codeChecking transactionsWaiting for payment and call function
Package: pytelegraf-exec
Descriptionpytelegraf_exec is used to create telegraf line text which and be passed in to the telegraf exec plugin.Usageimport pytelegraf_exec# Create a new trackerout = pytelegraf_exec.TelegrafExec(“test”)# Add your tags that you want. Can be called multiple timesout.add_tags({“t1”:”t1”, “t2”:”t2”})# Add your values that you want. Can be called multiple timesout.add_values({“v1”:”1”, “v2”:”v2”})text = out.output()# You will get a returned line like so# ‘test,t2=t2,t1=t1 v1=1,v2=v2’# Or print directlyout.print_output()# You will get something like this in stdout.# “test,t2=t2,t1=t1 v1=1,v2=v2n”
Package: py-telegram-bot
Getting new messages and answerfrompy_telegram_bot.botimportBotbot=Bot('Token')api=bot.get_api()forupdateinbot.get_updates():# Here you can use "update['text']"ifupdate.text=='/start':# And here you can use "update['chat']['id']"api.send_message(chat_id=update.chat.id,text='Hello!')Uploading photo, videos or docsfrompy_telegram_bot.botimportBotbot=Bot('Token')uploader=bot.get_uploader()forupdateinbot.get_updates():ifupdate.text=='video':uploader.send_video(update.chat.id,# or use here video idopen('video.mp4','rb'))elifupdate.text=='photo':uploader.send_photo(update.chat.id,# or use here photo idopen('photo.png','rb'))elifupdate.text=='doc':uploader.send_photo(update.chat.id,# or use here doc idopen('doc.zip','rb'))
Package: py-telegram-bot-api
Simple Telegram Bot APIDesigned to be simple, zero dependency, one file python telegram bot api wrapperIntroductionThis library implements telegram botAPIin python. With no dependencies.All fields and methods ofAPIusetyping.Bot API 5.0 (November 4, 2020) is fully supported.DisclaimerThis library and its author neither associated, nor affiliated with Telegram in any way.Installationpip install py-telegram-bot-apiOr you can just downloadapi.pyfile and do whatever you want.Quick startCopy code frombot_example.pyCreate your bot withthis instructionand get bot API keyPut bot API key inbot_example.pyRun script:python bot_example.pyWrite "/start" or "/help" to your bot in telegramDocumentationAll documentation you need can be foundhere.Differences:Library methods use "snake_case_style" instead of "camelCaseStyle" in telegram docs.Message structure usefrom_userinstead offrom(from is a reserved word in Python)Lib Structureapi.pymodule represents all telegram bot API methods and structures. This is the only file you really want to work
with telegram bot API.pooling.pycallsgetUpdates()method in a loop. Can be used instead of webhook. More info about pooling and webhooks
arehere.utils.pymodule contains useful code.StatusDevelopment done. Tests in progress.Progress statusAll classes addedAll methods addedTested methodsget_updatesset_webhookdelete_webhookget_webhook_infoget_melog_outclosesend_messageforward_messagecopy_messagesend_photosend_audiosend_documentsend_videosend_animationsend_voicesend_video_notesend_media_groupsend_locationedit_message_live_locationstop_message_live_locationsend_venuesend_contactsend_pollNot tested methodssend_dicesend_chat_actionget_user_profile_photosget_filekick_chat_memberunban_chat_memberrestrict_chat_memberpromote_chat_memberset_chat_administrator_custom_titleset_chat_permissionsexport_chat_invite_linkset_chat_photodelete_chat_photoset_chat_titleset_chat_descriptionpin_chat_messageunpin_chat_messageunpin_all_chat_messagesleave_chatget_chatget_chat_administratorsget_chat_members_countget_chat_memberset_chat_sticker_setdelete_chat_sticker_setanswer_callback_queryset_my_commandsget_my_commandsedit_message_textedit_message_captionedit_message_mediaedit_message_reply_markupstop_polldelete_messagesend_stickerget_sticker_setupload_sticker_filecreate_new_sticker_setadd_sticker_to_setset_sticker_position_in_setdelete_sticker_from_setset_sticker_set_thumbanswer_inline_querysend_invoiceanswer_shipping_queryanswer_pre_checkout_queryset_passport_data_errorssend_gameget_game_high_scoresKnown issuesNo issues yet
Package: pyTelegramLogger
pyTelegramLoggerDescriptionThis package provides handlers to send logging messages to telegram chats. It uses a separate thread for handling messages (seelogging.QueueHandlerfor details). You can send messages to multiple chats, including big messages (over 4096 chars). Big messages will be split into several parts and tagged by unique hashtag for current log record.Installation$ pip install pyTelegramLogger
$ pipenv install pyTelegramLoggerUsageConfigure loggerLOGGING_CONFIG = {
    'version': 1,
    'disable_existing_loggers': False,
    'handlers': {
        'telegram': {
            'class': 'telegram_logger.TelegramHandler',
            'chat_ids': [123456, 123456789],
            'token': 'bot_token,
        },
    },
    'loggers': {
        'telegram': {
            'handlers': ['telegram'],
        }
    }
}Usage# Run once at startup:
logging.config.dictConfig(LOGGING_CONFIG)

# Include to send logging messages to telegram
logger = logging.getLogger('telegram')

logger.warning('Warning message!')FAQ1. Can I use my own formatter class for messages?Yes you can. You can inherit from base classtelegram_logger.TelegramFormatterand define how to send big messages (over 4096 chars) in methodformat_by_fragments(self, record: logging.LogRecord, start: int=0) -> List[str].
Also you can use your own formatter class.
Then configure using standart configuration dictionary schema:LOGGING_CONFIG = {
    'version': 1,
    'disable_existing_loggers': False,
    'formatters': {
        'myFormattrer': {
            'class': 'MyFormatterClass',
            'fmt': '%(levelname)_%(name) : %(funcName)'
        }
    }
    'handlers': {
        'telegram': {
            'class': 'telegram_logger.TelegramHandler',
            'chat_ids': [123456, 123456789],
            'token': 'bot_token,
            'formatter': 'myFormattrer',
        },
    },
    'loggers': {
        'telegram': {
            'handlers': ['telegram'],
        }
    }
}2. What if I don't want to send messages to telegram during development?Sometimes, when you just develope you app and you dont want to send log messages to telegram, but want to control it usetelegram_logger.TelegramStreamHandler(cht_ids, token, stream=None)which streams dict with message text and params instead of send it to telegram.3. Can I use a proxy for sending messages?Yes you can. You can specify proxy in key of configproxiesusing dict format asrequests:proxies = {
  'http': 'http://10.10.1.10:3128',
  'https': 'http://10.10.1.10:1080',
}

LOGGING_CONFIG = {
    'version': 1,
    'disable_existing_loggers': False,
    'handlers': {
        'telegram': {
            'class': 'telegram_logger.TelegramHandler',
            'chat_ids': [123456, 123456789],
            'token': 'bot_token,
            'proxies': proxies,
        },
    },
    'loggers': {
        'telegram': {
            'handlers': ['telegram'],
        }
    }
}