Saravanan666/pypi-org huggingface dataset:
Package: py-telegram-notifier
py-telegram-notifierA simple utilization of the Telegram Bot API for sending messages to a Telegram chat by means of
a context manager, function calls, or a CLI.Installationpip install py-telegram-notifierRequirementsIn order for the module to function, you must supply it with a bottoken, and achat id. Full instructions on creating a bot
can be foundhere.Usage as context managerFirstly, set up the config for your Notifier. This only has to be done once, assuming you are
sending messages from the same bot to the same chat every time.fromtelegram_notifierimportset_config_optionschat_id=0000000000# Your chat idtoken="0000000000"# Your bot tokenset_config_options(chat_id=chat_id,token=token)Then, you may use a Notifier as a context manager that will notify you of the type of exit
that was encountered, including whether it finished with or without an error.fromtelegram_notifierimportNotifierwithNotifier("This is a task."):# Code that takes a long time.passUsage as CLISave bot information in settings by using:telegram_notifier --chat_id XXXX --token YYYYXXXXthe unique identifier for a target chat (chat id).YYYYthe bot token.Send a message to a chat once the settings are saved:telegram_notifier --message ZZZZZZZZthe message to send.DisclaimerThe author of this software is not affiliated, associated, authorized, endorsed by, or in any
way officially connected with Telegram or any of its affiliates and is independently owned and
created.
Package: pyTelegramWalletApi
Telegram Wallet APIUnofficial library for managing your personal Wallet accountTable Of ContentsAbout the ProjectBuilt WithGetting StartedExampleRealised methodsAbout The ProjectSend and receive tokens | Trade on P2P MarketBuilt WithTo obtain an authorization token, the "selenium" library is used.
Working with the API is implemented using "requests"Getting Startedpip install pyTelegramWalletApiExampleimporttimefromwalletimportClient,Wallet# for the first tg loginc=Client.auth(profile='main')# chromedriver headless mode for authorized tg account# c = Client(profile='main')# get wallet auth tokenauth_token=c.get_token()w=Wallet(auth_token)ton_balance=w.get_user_balance('TON')['available_balance']print(f'[*] Balance:{ton_balance}TON')tx_id=w.send_to_address(0.01,'TON','EQA5IHeHWX9BkTsI71ECzuD-HeYL-br36UmFoTWZFihU3fLz')['transaction_id']tx_link=Nonestatus=''# wait tx in blockwhiletx_linkisNone:details=w.get_transaction_details(tx_id)tx_link=details["transaction_link"]status=details['status']time.sleep(2)print(f'[*] Tx status:{status}|{tx_link}')""" Logs[*] Starting parse wallet authorization token...[*] Token find: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpX....[*] Balance: 100 TON[*] Tx status: success | https://tonscan.org/tx/...."""Realised methodsWallet Account Methods:send_to_address()get_user_balance()get_transaction_details()get_transactions()get_rate()Wallet P2P Methods:get_p2p_market()create_p2p_offer()edit_p2p_offer()get_p2p_offer()get_own_p2p_offer_by_id()get_user_p2p_payment()get_user_p2p_order_history()get_own_p2p_offer()get_own_p2p_offers()enable_p2p_bidding()disable_p2p_bidding()p2p_offer_activate()p2p_offer_deactivate()
Package: pytelelogger
pyteleloggerpyteleloggerallows you to use Telegram bots to track your project logs in real-time.InstallationDependenciespython-telegram-bot>=13.1PyYAML>=5.3.1User installationThe easiest way to install pytelelogger ispip:pip install pyteleloggerHow to use1. Create Telegram botCheck official Telegram documentation athttps://core.telegram.org/botsand follow a few simple steps to create a bot. You will get an access token which is used to control your bot.2. Create cfg.yaml fileExample config file looks like this:# define bot access token, your Telegram username and your project nametoken:YOUR_TOKENusername:YOUR_USERNAMEproject:"YOURPROJECTNAME"# set logging level# DEBUG = 0# INFO = 1# WARNING = 3# ERROR = 4# CRITICAL = 5level:0# set paths for duplicate files# you can use one file to store everything (single), but using separate files (multi) is more convenientmode:multi# in case of single mode, debug key must store path to filepaths:debug:debug.txtinfo:info.txtwarning:warning.txterror:error.txtcritical:critical.txt# customize key phrasegreeting:I'm ready!# datetime format string that will be used in loggingdtf:"%d/%b/%Y%H:%M:%S"# emojis to use in messages (debug, info, warning, error, critical)emojis:debug:"⚙"info:"ℹ"warning:"⚠"error:"❌"critical:"🔴"Later,chat_idfield will be added to config file. Please, don't remove it.3. Add some codefrompyteleloggerimportTeleLoggerif__name__=='__main__':tl=TeleLogger('cfg.yaml')tl.debug('Debug message!')tl.info('Info message!')tl.stop(force=True)You will get messages like this:And all logs are duplicated into files:[DEBUG:14/Jan/2021 03:48:32] Debug message![INFO:14/Jan/2021 03:48:33] Info message!DevelopmentSource codeThe latest source code is available at:https://github.com/SN4KEBYTE/pyteleloggerContributingFeel free to open issues, send pull requests and review other users.
Package: pytelematics-oasa
Pytelematics-oasaPytelematics-oasa is a simple API wrapper for python.Installationpipinstallpytelematics-oasaRequirements:requestsUsagefrompytelematics_oasaimportOasaTelematics,Line,Route,Stop##### Line ###### example using linecode 962 (A1 ΠΕΙΡΑΙΑΣ-ΒΟΥΛΑ)line=Line('962')line.ID# Α1line.linecode# 962line.name# ΠΕΙΡΑΙΑΣ - ΒΟΥΛΑline.name_en# PEIRAIAS - VOYLAline.routes()line.schedule_days()##### Route ###### example using routecode 1884 (845 ΠΕΙΡΑΙΑΣ - ΕΛΕΥΣΙΝΑ, route: ΕΛΕΥΣΙΝΑ ==> ΠΕΙΡΑΙΑΣ)route=Route('1884')route.name# ΕΛΕΥΣΙΝΑ - ΠΕΙΡΑΙΑΣroute.name_en# ELEFSINA - PEIRAIASroute.routecode# 1884route.stops()route.bus_location()route.details()##### Stop ###### example using stopcode 400075 (στάση ΗΣΑΠ Ν.ΦΑΛΗΡΟΥ)stop=Stop('400075')stop.name# ΗΣΑΠ Ν.ΦΑΛΗΡΟΥstop.name_en# ISAP.N.FALIROYstop.lat# 37.9445913stop.lng# 23.6671421stop.stopcode# 400075stop.arrivals()###### Oasa ####### Use the get method for getting data.# 1st arg: action, 2nd~ arg: params# More info at the documentation page.# https://oasa-telematics-api.readthedocs.io/en/latest/index.htmloasa=OasaTelematics()oasa.get('getRoutesForLine',962)oasa.get('getClosestStops',37.9445913,23.6671421)# Custom methodsoasa.get_all_lines()oasa.closest_stops(x,y)oasa.linecodes(lineID)API DocumentationOasa-Telematics-APILicenseMIT License
Package: pytelemetry
pytelemetryThis module implements a powerful communication protocol that makes
remote control and monitoring  of embedded devices an effortless task.Project pagefrompytelemetryimportPytelemetryfrompytelemetry.transports.serialtransportimportSerialTransportimporttimetransport=SerialTransport()tlm=Pytelemetry(transport)transport.connect({port:'com9',baudrate:'9600'})# publish once on topic 'throttle' (a named communication channel)tlm.publish('throttle',0.8,'float32')defprinter(topic,data,opts):print(topic," : ",data)# Subscribe a `printer` function called on every frame with topic 'feedback'.tlm.subscribe("feedback",printer)# Update during 3 secondstimeout=time.time()+3whileTrue:tlm.update()iftime.time()>timeout:break# disconnecttransport.disconnect()print("Done.")Language C implementationTelemetry is the same protocol implemented in C language.Project pageCommand Line Interface (CLI)Pytelemetry CLI is a powerful command interface perfectly suited for fast prototyping with this protocol.
It allows for plotting embedded device’s data on-the-fly, publishing values on any topics, listing serial ports and much more.Project pageCentralized documentationThe documentation for all three projects is centralizedhere.MIT License, (C) 2015-2016 Rémi Bèges (remi.beges@gmail.com)
Package: pytelemetrycli
Pytelemetry Command Line InterfaceThis module is a powerful command line interface for extremely fast debugging and communication with embedded systems.It allows for plotting embedded device’s data on-the-fly, publishing values on any topics, listing serial ports and much more.The CLI relies on custom protocol, implemented in Python and C languages.
The main strength of this protocol is strong decoupling between communicating devices, simplicity yet flexibility.For instance, the protocol supports sending standard linear data, but also arrays and sparse arrays in a network-friendly manner.Project pagepytelemetryThis module is the Python implementation of the communication protocol.It can be used directly (without the CLI) to script communications with an embedded device.frompytelemetryimportPytelemetryfrompytelemetry.transports.serialtransportimportSerialTransportimporttimetransport=SerialTransport()tlm=Pytelemetry(transport)transport.connect({port:'com9',baudrate:'9600'})# publish once on topic 'throttle' (a named communication channel)tlm.publish('throttle',0.8,'float32')defprinter(topic,data,opts):print(topic," : ",data)# Subscribe a `printer` function called on every frame with topic 'feedback'.tlm.subscribe("feedback",printer)# Update during 3 secondstimeout=time.time()+3whileTrue:tlm.update()iftime.time()>timeout:break# disconnecttransport.disconnect()print("Done.")Language C implementationTelemetry is the same protocol implemented in C language.Project pageCentralized documentationThe documentation for all three projects is centralizedhere.MIT License, (C) 2015-2016 Rémi Bèges (remi.beges@gmail.com)
Package: pyteleprint
Project Descriptionpyteleprintpyteleprint is a package for remote prints, notification and alerts for python programs. The notification mechanism is done via Telegram.Why should I use this?This is meant for users who want print() to be a remote notification and alert mechanism if they are not present at their workstation when the program is being executed or for a persisting python application.FeaturesRemote alertsRemote printRemote notificationRequirementsRequires Python -v >= 3.4.0Telegram AppInstallation$pipinstallpyteleprintInitial PreparationsThe Telegram app must be installed into your mobile system.First, create a personal bot using (@BotFather). Once the creation process is done, you will receive an API token. Note this API Token for further use.Using pyteleprintCreate a new script or use shell to execute the following codefrompyteleprint.printer.chat_extractimportChatIDExtractorAPI_TOKEN="YOUR_NEW_BOT_API_TOKEN"# Obtained from creating a bot through BotFatherChatIDExtractor(API_TOKEN).start()Once the script is executed, the program would start polling for messages to get chat id. Send a message to your new bot. This will help the program extract the chat id. Use this chat id to send notifications and alerts.If in future, you delete or lose the chat thread, you can redo the above process to get the new chat id.This chat id can be used statically in any application at any point in time iff the chat thread with the bot exists. But, if the user deletes the chat with their bot then they have to re-extract the chat id since there would be a new chat thread to communicate with the bot.Now, you have the API Token and the chat id with you, use them to create a Printer object in your scripts and use the print() method to send notifications,prints and alerts.frompyteleprint.printer.printerimportPrinterAPI_TOKEN="YOUR_BOT_API_TOKEN"CHAT_ID=12345# Chat id obtained from ChatIDExtractor().start()p=Printer(API_TOKEN,CHAT_ID)p.print("Hello World")
Package: pyteletask
PyTeletaskHow to installTwo standard ways: using pip or calling setup.py manually.
With pip for Python 3 (http://www.pip-installer.org), simply do::pip3 install pyteletaskYou can optionally add --install-option="--user" to tell setup.py to install in your home rather than in one of the system-wide locations.The other way: uncompress archive. Then calling setup.py directly boils down to::python setup.py installYou can optionally add --user to install in your home.
Please refer to distutils documentation for further details.Version 0.0.1Initial release with basic functionalityVersion 1.0.4Update with support for dimmer WITHOUT a seperate relay to turn a (dimmeable) light on/off.Version 1.0.5Bug fix
Package: pytel-inject
A bag of objects for PythonFor when your object graph is too bigclassA:def__init__(self,b:B):self.b=bclassB:passsvc={'a':A,'b':B,}context=Pytel(svc)assertcontext.a.b==context.bSeeusagefor more casesFeaturesBuild a graph of objects based on init methods or factory functionsInitialize froma dictionary of string to any of:callabletypevalueObject containing any of:object fields with objects or types (or callables)class fields with objects or types (or callables)methodsstatic methodsAn Iterable of the aboveVerify integrity of the dependency graph using type annotationsRecurrently resolve all dependencies at the first referenceWorks as a Context Manager, on __exit__ close all objects that are Context ManagersBecause of strict type checking this package is probably quite unpythonic.
Package: pyTeliumManager
Welcome to Ingenico for Human 👋One of the few library that help you use this kind of hardwarePython library to manipulate Ingenico mobile payment device equipped with Telium Manager. RS232/USB.
Please note that every payment device with Telium Manager should, in theory, work with this.PyPiPython 2.7 support has been added to master branch since v2.3.0pipinstallpyTeliumManager--upgradeHow to start using pyTeliumManager# Import telium packagefromteliumimport*# Open devicemy_device=Telium('/dev/ttyACM0')# Construct our payment infosmy_payment=TeliumAsk.new_payment(12.5,payment_mode='debit',# other mode: credit or refund.target_currency='EUR',wait_for_transaction_to_end=True,# If you need valid transaction statuscollect_payment_source_info=True,# If you need to identify payment sourceforce_bank_verification=False)# Send payment infos to devicetry:ifnotmy_device.ask(my_payment):print('Your device just refused your transaction. Try again.')exit(1)exceptTerminalInitializationFailedExceptionase:print(format(e))exit(2)# Wait for terminal to answermy_answer=my_device.verify(my_payment)ifmy_answerisnotNone:# Convert answered data to dict.print(my_answer.__dict__)# > {# '_pos_number': '01',# '_payment_mode': '1',# '_currency_numeric': '978',# '_amount': 12.5,# '_private': '0000000000',# 'has_succeeded': True,# 'transaction_id': '0000000000',# '_transaction_result': 0,# '_repport': '4711690463168807000000000000000000000000000000000000000',# '_card_type':#  {#      '_name': 'VISA',#      '_regex': '^4[0-9]{12}(?:[0-9]{3})?$',#      '_numbers': '4711690463168807',#      '_masked_numbers': 'XXXXXXXXXXXX8807'#  }# }ifmy_answer.has_succeeded:print("Your payment has been processed using a{0}card. Id:{1}".format(my_answer.card_type.name,my_answer.card_type.numbers))else:print("Your payment was rejected. Try again if you wish to.")How to enable computer liaison with Ingenico devicePress "F" buttonPress 0 - Telium ManagerPress 5 - InitPress 1 - ParamSelect  - CheckoutSelect "Enable"Choose your preferred interface (USB, COM1, COM2)Tested devices:Ingenico iWL250Ingenico iCT220Ingenico iCT250Should work with all i**2XX device equipped with Telium Manager app.
Feel free to repport issue if your device isn't compatible with this package.Won't workAll direct PinPad liaison, also known as iPP3XX. (see issue #2)Q-AWill this package cause loss of money in any way ?You shouldn't worry about that, I've deployed it for a different store in 2015. No loss has been reported yet.If you hesitate on how to use this package, feel free to ask me before using it.My device isn't working with this package.Make sure you've followedHow to enable computer liaison with Ingenico devicesteps above beforehand.If you're on Windows, make sure you've installed the correct driver.Try every COM port, one by one.On Linux it should be located at/dev/ttyACM0, if not runls -l /dev/tty* | grep ACMto locate it.ContributionsFeel free to propose pull requests. This project may be improved in many ways.
Package: pytellprox
This is a simple project that gives easy access to the tellprox API in Python.
The Tellprox project, which can be used in place of Telldus Live, can be found here:https://github.com/p3tecracknell/tellproxThere is not much code, but after using this for a good while it seemed good to clean up a bit and push upstream.Installationpip install pytellproxUsagefrom tellprox import TellProx
tellprox_device_id=1
tellprox_host='localhost'
tellprox_port='8080'
tellprox = TellProx(host=tellprox_host, port=tellprox_port)
# if you need HTTPS you can pass protocol='https' as well
# enable/disable devices:
tellprox.enable_device(tellprox_device_id)
tellprox.toggle_device(tellprox_device_id)
# list devices
devices = tellprox.list_devices()
for device in devices:
    print(device['name'])
# get info for a device
device_info = tellprox.get_device(tellprox_device_id)
print(device_info['name'])
# list sensors
sensors = tellprox.list_sensors()
# get data from first sensor in list
sensor_data = tellprox.get_sensor(sensors[0]['id'])
Package: pytelog
pytelogSimple logger which dispatch messages to a telegram in markdown format. Uses a separate thread for a dispatching.
Support many chats. Support big messages (over 4096 chars). Support telegram API calls restrictions.Installationpip install pytelogQuick start1. Configurationconfig = {
    ...
    "version": 1,
    "disable_existing_loggers": False,
    "handlers": {
        "telegram": {
            "class": "pytelog.Handler",
            "token": "bot_token",
            "chat_ids": [123456789, -1234567891011],

        }
    },
    "loggers": {
        "telegram": {
            "level": "INFO",
            "handlers": ["telegram",]
        }
    }
}2. Usageimport logging
logger = logging.getLogger("telegram")

logger.info("Message")3. Formatting:config = {
    ...
    "version": 1,
    "disable_existing_loggers": False,
    "formatters": {
        "telegram": {
            "()": "pytelog.MarkdownFormatter",
        }
    },
    ...
}
Package: pyTEMlib
pyTEMlib is a package to read and process various kind of data acquired with a (scanning) transmission electron microscope (STEM).The package is written in pure python and depends on various other libraries.All data, user input, and results are stored asNSID-formattedHDF5 files.The data are all presented assidpy.DatasetobjectsInstall pyTEMlib via pip as:python3-mpip install pyTEMlibor via conda:conda install pyTEMlib-cconda-forgeThese installation options are also available in theexample notebooks
Package: pytemp
Descriptionthis is a python module to convert temperatures from one unit to anotherInstallationpip install pytempUsagefrom pytemp import pytempconvert from 40 degree kelvin to fahrenheit and backfahrenheit = pytemp(40,'kelvin', 'fahrenheit')   ========> -387.66999999999996f = pytemp(40,'k', 'f')   ========> -387.66999999999996kelvin = pytemp(f,'fahrenheit','kelvin')   ========> 40.0k = pytemp(f,'f','k')   ========> 40.0convert from 40 degree celsius to fahrenheit and backfahrenheit = pytemp(40,'celsius', 'fahrenheit')   ========> 104.0f = pytemp(40,'c', 'f')   ========> 104.0celsius = pytemp(f,'fahrenheit','celsius')   ========> 40.0c = pytemp(f,'f','c')   ========> 40.0convert from 40 degree kelvin to celsius and backcelsius = pytemp(40,'kelvin', 'celsius')   ========> -233.14999999999998c = pytemp(40,'k', 'c')   ========> -233.14999999999998kelvin = pytemp(c,'celsius','kelvin')   ========> 40.0k = pytemp(c,'c','k')   ========> 40.0
Package: pytemperature
pytemperatureA module that helps to convert temperature units.Examples of usage>>>importpytemperature>>>pytemperature.c2f(37.78)# Celsius to Fahrenheit100.0>>>pytemperature.f2c(104)# Fahrenheit to Celsius40.0>>>pytemperature.c2k(40)# Celsius to Kelvin313.15>>>pytemperature.k2c(273.15)# Kelvin to Celsius0.0>>>pytemperature.k2f(273.15)# Kelvin to Fahrenheit31.98>>>pytemperature.f2k(100)# Fahrenheit to Kelvin310.93>>>pytemperature.r2c(80)# Romoe to Celsius100.0>>>pytemperature.c2r(100)# Celsius to Romoe80.0>>>pytemperature.r2k(80)#Romoe to Kelvin373.15
Package: pytemperatureconverter
pytemperatureconverterThis is a python package that provides various functions for converting temperatures between different scales, such as Celsius, Fahrenheit, Kelvin and Rankine.InstallationThis package requires Python 3.11 or higher and pytest for testingUsageTo use this package, you need to import it in your Python code:from temperatureconverter import converterThe converter module provides the following functions:celsius_to_fahrenheit(c): Converts Celsius to Fahrenheit.
celsius_to_kelvin(c): Converts Celsius to Kelvin.
celsius_to_rankine(c): Converts Celsius to Rankine.
fahrenheit_to_celsius(f): Converts Fahrenheit to Celsius.
fahrenheit_to_kelvin(f): Converts Fahrenheit to Kelvin.
fahrenheit_to_rankine(f): Converts Fahrenheit to Rankine.
kelvin_to_celsius(k): Converts Kelvin to Celsius.
kelvin_to_fahrenheit(k): Converts Kelvin to Fahrenheit.
kelvin_to_rankine(k): Converts Kelvin to Rankine.
rankine_to_celsius(r): Converts Rankine to Celsius.
rankine_to_fahrenheit(r): Converts Rankine to Fahrenheit.
rankine_to_kelvin(r): Converts Rankine to Kelvin.Each function takes a numeric value as an argument and returns a numeric value as a result. For example:converter.celsius_to_fahrenheit(0)
32.0
converter.fahrenheit_to_kelvin(32)
273.15
converter.kelvin_to_rankine(273.15)
491.67TestingThe functions have been tested using pytest.
============================= test session starts =============================
platform win32 -- Python 3.11.0, pytest-7.3.0, pluggy-1.0.0 -- C:\Users\username\AppData\Local\pypoetry\Cache\virtualenvs\pytemperatureconverter-4KrmmL8q-py3.11\Scripts\python.exe
cachedir: .pytest_cache
rootdir: C:\Users\username\Desktop\pytemperatureconverter
collecting ... collected 12 itemstests/test_functions.py::test_celsius_to_fahrenheit PASSED               [  8%]
tests/test_functions.py::test_celsius_to_kelvin PASSED                   [ 16%]
tests/test_functions.py::test_celsius_to_rankine PASSED                  [ 25%]
tests/test_functions.py::test_fahrenheit_to_celsius PASSED               [ 33%]
tests/test_functions.py::test_fahrenheit_to_kelvin PASSED                [ 41%]
tests/test_functions.py::test_fahrenheit_to_rankine PASSED               [ 50%]
tests/test_functions.py::test_kelvin_to_celsius PASSED                   [ 58%]
tests/test_functions.py::test_kelvin_to_fahrenheit PASSED                [ 66%]
tests/test_functions.py::test_kelvin_to_rankine PASSED                   [ 75%]
tests/test_functions.py::test_rankine_to_celsius PASSED                  [ 83%]
tests/test_functions.py::test_rankine_to_fahrenheit PASSED               [ 91%]
tests/test_functions.py::test_rankine_to_kelvin PASSED                   [100%]============================= 12 passed in 0.03s ==============================LicenseThis project is licensed under the MIT License.