Saravanan666/pypi-org huggingface dataset:
Package: telegram-news-eswzy
Telegram-newsPython program package for automatically fetching news and pushing by telegram bot.Simple StartFirst of all, install telegram_news:pipinstalltelegram_newsIn a Python file, write:fromtelegram_news.template.commonimport*# Your bot token gotten from @BotFatherbot_token=os.getenv("TOKEN")# Add your bots into a channel as administratorschannel=os.getenv("CHANNEL")# Your database to store old messagesDATABASE_URL=os.getenv("DATABASE_URL")# Create a database sessionengine=create_engine(DATABASE_URL)db=Session(bind=engine.connect())# The news sourceurl="https://en.wikinews.org/wiki/Main_Page"tag="Wiki News"table_name="wikinews"# Info extractor to process data formatie=InfoExtractor()ie.set_list_selector('#MainPage_latest_news_text > ul > li')ie.set_title_selector('#firstHeading')ie.set_paragraph_selector('#mw-content-text > div > p:not(p:nth-child(1))')ie.set_time_selector('#mw-content-text > div > p:nth-child(1) > strong')ie.set_source_selector('span.sourceTemplate')ie.max_post_length=2000# News postman to manage sending affairnp=NewsPostman(listURLs=[url,],sendList=[channel,],db=db,tag=tag)np.set_bot_token(bot_token)np.set_extractor(ie)np.set_table_name(table_name)np.poll()Then, you will get messages like this in your channel or group:Bangladesh reports five new deaths due to COVID-19, a daily highestYesterday,Bangladeshhas confirmed five new deaths due toCOVID-19on the day. This is the highest number of fatalities in a day due to the virus. As of yesterday, Bangladesh'sInstitute of Epidemiology, Disease Control and Research(IEDCR) reported the number of recorded infected cases included 114 active cases and 33 recovered cases who were staying home. A total of 17 deaths have been recorded.In an online news briefing, the director of IEDCR, DrMeerjady Sabrina FloraA hospital official told Anadolu Agency, a local news outlet, that one of the deceased was Jalal Saifur Rahman, a director of Bengali Anti-Corruption Commission, who was cared for at the Kuwait Maitree Hospital.On Saturday, in an online video announcement, Bangladeshi Road Transport and Bridges Minister Obaidul Quader said public transport would be shut down for longer than initially planned, until this coming Saturday. This public transport shutdown had initially started on March 26 and was planned to end on Saturday, April 4. Transport of essential goods -- medical, fuel and food -- was still allowed.The first recorded incidents of COVID-19 infection in Bangladesh were on March 8, in two people who returned from Italy and also the wife of one of them. As of March 19, these three had already recovered.Wednesday, April 8, 2020[ "COVID-19 Confirmed Patients" -IEDCR] [Full text]
Package: telegram-notification
getting started0. Install the utility.Simply install.$ sudp python3 -m pip install telegram-notification1. Create your Telegram Bot.Search forBotFatheron TelegramEnter/startEnter/newbotEnter{your bot name}Enter{your bot id}2. Set your bot's token & user_id.Entersudo notiin the terminal.Enter the created bot token.Send/startto your bot.When confirmed, exit the program. (CTRL+c)3. Use it anytime.Run it as a single command or use a pipe or use it in a shell script.Please use it by referring to theExample
Package: telegram-notifier
Telegram NotifierThis package provides simple notifications from your app to your Telegram chatPreparation:Create bot with BotFather and copy thetokenSend any message to the bot (needed to automatically getchat_id)install module:pipinstalltelegram-notifierUsage:fromtelegram_notifierimportTelegramNotifierimportostoken=os.environ.get("TELEGRAM_TOKEN")notifier=TelegramNotifier(token,parse_mode="HTML")notifier.send("<b>Test bold text</b> and normal text")
Package: telegram-notifier-bot
telegram_notifier_bot - v1.0.0A simple package to send notifications to a Telegram user or group.E.g.Send notifications triggered by some eventin a monitoring systeman IoT devicea serviceInstallationFrom PyPI(venv)$pipinstalltelegram-notifier-bot(venv)$From GitHub(venv)$pipinstallgit+https://github.com/p4irin/telegram_notifier_bot.git(venv)$Verify(venv)$python
Python3.8.10(default,Jun22021,10:49:15)[GCC9.4.0]onlinux
Type"help","copyright","credits"or"license"formoreinformation.
>>>importtelegram_notifier_bot
>>>telegram_notifier_bot.__version__'0.0.1'>>>UsagePrerequisiteCreate a new Telegram botSend a notification(venv)$exportTELEGRAM_BOT_TOKEN=<YourTelegrambottoken>(venv)$exportTELEGRAM_CHAT_ID=<Recipient(s)chatorgroupid>(venv)$exportTELEGRAM_PATH_TO_PHOTO=<Filesystempathtophoto>(venv)$python
Python3.8.10(default,Jun22021,10:49:15)[GCC9.4.0]onlinux
Type"help","copyright","credits"or"license"formoreinformation.
>>>importos
>>>fromtelegram_notifier_botimportNotifier
>>>token=os.getenv('TELEGRAM_BOT_TOKEN')>>>chat_id=os.getenv('TELEGRAM_CHAT_ID')>>>photo=os.getenv('TELEGRAM_PATH_TO_PHOTO')>>>notifier=Notifier(token)>>>notifier.send("We're out of coffee! Please fix ASAP!",chat_id)>>>notifier.send_photo(photo,chat_id)>>>ReferenceThe Telegram Bot APIRequests: HTTP for Humans
Package: telegram-pay
Installpip install telegram-payUsefromtelegram_payimportTelegramPayasyncdefmain():client=TelegramPay(shop_id=SHOP_ID,shop_token=SHOP_TOKEN)subscription=awaitclient.get_user_subscription(USER_ID,SUBSCRIPTION_ID)ifsubscription.valid:# User is subscribedelse:# User is not subscribed
Package: telegram-phone-number-checker
telegram-phone-number-checkerPython tool/script to check if phone numbers are connected to Telegram accounts. Retrieving username, name, and IDs where available.InstallationYou can install this tool directly from theofficial pypi release.pipinstalltelegram-phone-number-checkerYou can also install it and run it directly from github as a script.gitclonehttps://github.com/bellingcat/telegram-phone-number-checkercdtelegram-phone-number-checker
pipinstall-rrequirements.txt
pythontelegram-phone-number-checker/main.pyRequirementsTo run it, you need:A Telegram account with an active phone number;TelegramAPI_IDandAPI_HASH, which you can get by creating a developers account athttps://my.telegram.org/. Place these values in a.envfile, along with the phone number of your Telegram account:API_ID=
API_HASH=
PHONE_NUMBER=If you don't create this file, you can also provide these 3 values when calling the tool, or even be prompted for them interactively.UsageThe tool accepts a comma-separated list of phone numbers to check, you can pass this when you call the tool, or interactively.See the examples below:# single phone numbertelegram-phone-number-checker--phone-numbers+1234567890# multiple phone numberstelegram-phone-number-checker--phone-numbers+1234567890,+9876543210,+111111111# interactive version, you will be prompted for the phone-numberstelegram-phone-number-checker# overwrite the telegram API keys in .env (or if no .env is found)telegram-phone-number-checker--api-idYOUR_API_KEY--api-hashYOUR_API_HASH--api-phone-numberYOUR_PHONE_NUMBER--phone-numbers+1234567890The result will be written to the console but also written as JSON to aresults.jsonfile, you can write it to another file by adding--output your_filename.jsonto the command.For each phone number, you can expect the following possible responses:If available, you will receive the Telegram Username, Name, and ID that are connected with this number.'no username detected'. This means that it looks like the number was used to create a Telegram account but the user did not choose a Telegram Username. It is optional to create a Username on Telegram.'ERROR: no response, the user does not exist or has blocked contact adding.': There can be several reasons for this response. Either the phone number has not been used to create a Telegram account. Or: The phone number is connected to a Telegram account but the user has restricted the option to find him/her via the phone number.Or: another error occurred.DevelopmentThis section describes how to install the project in order to run it locally, for example if you want to build new features.# clone the codegitclonehttps://github.com/bellingcat/telegram-phone-number-checker# move into the project's foldercdtelegram-phone-number-checkerThis project usespoetryto manage dependencies. You can install dependencies via poetry, or use the up-to-daterequirements.txtfile.# with poetrypoetryinstall# with pippipinstall-rrequirements.txtYou can then run it with any of these:# with poetrypoetryrunpython3telegram_phone_number_checker/main.py# with pip installationpython3telegram_phone_number_checker/main.py
Package: telegram.py
telegram.pyAn async API wrapper for Telegram bot API in PythonInstallationPython 3.7+ isrequiredto install and use telegram.py.Install the latest release from PyPI:# Mac/Linuxpython3-mpipinstalltelegram.py# Windowspy-3-mpipinstalltelegram.pyOr install the development version from GitHub:# Mac/Linux
python3 -m pip install git+https://github.com/ilovetocode2019/telegram.py

# Windows
py -3 -m pip install git+https://github.com/ilovetocode2019/telegram.pyQuick Exampleimportloggingimporttelegrampyfromtelegrampy.extimportcommandslogging.basicConfig(level=logging.INFO,format="(%(asctime)s)%(levelname)s%(message)s",datefmt="%m/%d/%y - %H:%M:%S %Z")logger=logging.getLogger("telegrampy")bot=commands.Bot("token here")@bot.command()asyncdefhi(ctx):awaitctx.send("Hello")bot.run()For a line-by-line walkthrough for this example, see thequickstart.DocumentationDocumentation can be found here.
Package: telegram-reddit-newsbot
telegram-reddit-newsbot=======================`|PyPI version| <https://badge.fury.io/py/telegram-reddit-newsbot>`_`|PyPI| <https://github.com/sashgorokhov/telegram-reddit-newsbot>`_`|image2| <https://github.com/sashgorokhov/telegram-reddit-newsbot>`_`|GitHubrelease| <https://github.com/sashgorokhov/telegram-reddit-newsbot>`_`|BuildStatus| <https://travis-ci.org/sashgorokhov/telegram-reddit-newsbot>`_`|codecov| <https://codecov.io/gh/sashgorokhov/telegram-reddit-newsbot>`_`|GitHublicense| <https://raw.githubusercontent.com/sashgorokhov/telegram-reddit-newsbot/master/LICENSE>`_Telegram bot to stay in tune with favourite reddit channels.. |PyPIversion| image:: https://badge.fury.io/py/telegram-reddit-newsbot.svg.. |PyPI| image:: https://img.shields.io/pypi/status/telegram-reddit-newsbot.svg.. |image2| image:: https://img.shields.io/pypi/pyversions/telegram-reddit-newsbot.svg.. |GitHubrelease| image:: https://img.shields.io/github/release/sashgorokhov/telegram-reddit-newsbot.svg.. |BuildStatus| image:: https://travis-ci.org/sashgorokhov/telegram-reddit-newsbot.svg?branch=master.. |codecov| image:: https://codecov.io/gh/sashgorokhov/telegram-reddit-newsbot/branch/master/graph/badge.svg.. |GitHublicense| image:: https://img.shields.io/badge/license-MIT-blue.svg
Package: telegram-reminder-bot
telegram-reminder-botA small python bot to remind you of important tasksFeaturestelegram-reminder-bot is a telegram bot that allows to register planned message :either a message to be sent at the specific date;or using a cron expression (to repeat the message).More on the possibilities of the bot here :https://telegram-reminder-bot.readthedocs.org/usage.htmlDocumentationThe documentation on how to install and use the bot can be found here :https://telegram-reminder-bot.readthedocs.org/Licensetelegram-reminder-bot is released under the MIT license. The license file should be shipped with the package and can be find athttps://opensource.org/licenses/MIT
Package: telegram-rss
Telegram RSSFetch rss and send the latest update to telegram.This project is still in active developmentUsageSetupMake sure you have python installed.Open command line.Installpip install --upgrade telegram-rssRunpython -m telegram_rssAdd bot token, feeds,user's id, and/orchannel's idinside telegram-rss/config.tomlRunpython -m telegram_rss updateto send initial update (use personal id to send initial update)If your system support entry_points, you can executepython -m telegram_rsswithtelegram-rss.Checking updateRunpython -m telegram_rss updateto check and send the latest feedsExample configbot_token="987654321:ASDASDASD-1sda2eas3asd-91sdajh28j"env_token="TOKEN"users=[123456789,]channels=[-123456789,]groups=[1234567890,]web_page_preview=truemessage_delay=0.05read_more_button="Read more"[[feeds]]name="Feed example online"source="http://feedparser.org/docs/examples/atom10.xml"footer_link="http://feedparser.org/docs/"channels=[-123456789,]only_today=true[[feeds]]name="Feed example local"source="c:\\incoming\\atom10.xml"save_bandwith=falseonly_today=falseusers=[987654321,]groups=[111111111,]footer=false[template_data]author="Author"source="Source"Send feed if published today (when we checked)only_today = true.Disable web preview in chat byweb_page_preview = false.If you don't want read_more_button under the message, setread_more_button = "".Don't set message_delay too low, it can be detected as spam.Templatetemplate.htmlis loaded using jinja2,Learn more.
Default template is<ahref="{{ entry.link }}">{{ entry.safe_title }}</a><i>{{ author }}</i>:<b>{{ entry.author }}</b>{{ entry.safe_description }}<i>{{ source }}</i>:<ahref="{{ channel.link }}">{{ channel.safe_title }}</a>More aboutobjects in templateHow to get tokenJust create a new bot account using@BotFather.Don't forget to add the bot as channel's adminHow to get idsSend / forward a message (user or channel) to@JsonDumpBotTemplate objectsentryclassEntry:title:strlink:strdescription:strauthor:strpublished:Optional[str]time:Optional[datetime]safe_title:strsafe_description:strchannelclassChannel:title:strlink:strdescription:strsafe_title:strsafe_description:str
Package: telegram-scraper
Titletelegram ScraperDescrptionWith telegram Scraper you can scrape search results and extract the contents produced by the search result.In telegram scraper it will scrape the data present of the website and give json data which contains the details of the contents on the website.JSON sample data{"Scraper_Telegram":{"Telegram":"Telegram for Android","about_install":"This video shows how to install Telegram on your Android device. See this page for detailed steps on various versions of Android.","about_store":"More comfortable with installing appsfrom the Google Play Store?Download Telegram from Google\u00a0Play","blank":"Twitter","column_9":"telegram.org","download_wrap":"Download Telegram","toggle":"EN"}Click Here for moreRun Scraperfromtelegram_scraperimport*link="https://telegram.org/dl/ios"data=run_telegram_scraper(link)How it works?It takes URL of telegram page with a search keyword to scrape the data.It generates the json data which contains the information of the telegram search result.It gives the every detail present inside website in the form of json data.ExamplesBelow are some of the examples of URLs using which you can scrape:Example 1Example2Queries/ FeedbackIf you have some queries or feedback please contact us at followingTelegramEmail
Package: telegram-sdk
Telegram SDKManaged by Golden M, Inc.DescriptionIt's an implementation of a simple and intuitive SDK wrapper for Telegram API.Works with the Telegram public API or a private Telegram API.How to contributeThe instructions for contributing to this project are available atCONTRIBUTING.mdWork with usGolden M is a software/hardware development company what is working on
a new, innovative and disruptive technologies.For more information, contact us atsales@goldenm.comLicenseThis project is under MIT License, for more information, check out theLICENCE
Package: telegram-shell-notifier
Telegram NotifierThis package provides simple notifications usable in python and shell programsPreparation:Create bot with BotFather and copy thetokenSend any message to the bot (needed to automatically getchat_id)install module:pipinstalltelegram-shell-notifierUsage:telegram-notify [-h] [--token TOKEN] [--chat-id CHAT_ID] [--parse-mode PARSE_MODE] [FILE]

Notify user with a telegram message.

positional arguments:
  FILE                  File to read from, leave blank for reading from stdin.

optional arguments:
  -h, --help            show this help message and exit
  --token TOKEN         Token of the telegram bot, leave blank for environment variable.
  --chat-id CHAT_ID     Chat id, leave blank for environment variable.
  --parse-mode PARSE_MODE
                        Parse mode, passed directly to telegram bot api. Leave blank for HTMLIt can be Markdown, MarkdownV2, HTML
Package: telegram-simulation-bot
telegram_simulation_botInteract with your computing cluster via telegram to get realtime information on your running jobs.InstallationFrom pypi:pip install telegram_simulation_botUsageChange into the directory of your simulation and type:telegram_simulation_botYou will be prompted (only once) to configuretelegram_simulation_bot.CommandsMITgcm:The following commands in telegram are possible:list- responds a list of currently running botsstatus <name>/all- responds the status of<name>or allerror <name>/all- responds errors of<name>or allprogress <name>/all- responds the progress of<name>or allconvert <name>/all- submits a slurm job calledexorad_convertin<name>or allOthers:There are currently no other simulation types implemented. Feel free to open up a PR for a new simulation type.UninstallationRemove configuration files using:telegram_simulation_bot --deleteRemove the package using:pip uninstall telegram_simulation_bot
Package: telegram-sleuth
Sleuth: Powerful telegram message extractorTelegram Sleuthis a powerful tool designed for extracting and analyzing data from Telegram chats. this tool allows you to efficiently extract messages, media, and metadata for thorough analysis.The extracted data can be organized chronologically by user, and media files can be downloaded into designated folders for offline access. Additionally, the parsed data can be exported into a structured CSV file, facilitating further processing and integration with other tools.FeaturesExtract messages, media, and metadata from Telegram chats.Organize messages chronologically by user for easy analysis.Download shared media files (images, videos, audio, documents) into designated folders for offline access.Export parsed data into a structured CSV file for further processing and integration with other tools.Where to get itThe source code is hosted on GitHub at:https://github.com/naufalmng/telegram-sleuthInstall with PyPIpipinstalltelegram-sleuthUsagefromtelegram_sleuthimportSleuth#AuthenticatewithyourTelegramAPIcredentialssleuth=Sleuth(api_id='YOUR_API_ID',#11513413api_hash='YOUR_API_HASH',#843c16a33c3c4e75f36ea546123ec2dusername='TARGET_USERNAME',start_date='2023-11-20',#Optional:Specifyastartdatefordataextractionend_date='2023-11-21',#Optional:Specifyanenddatefordataextractiondownload_path=r'C:\Path\to\Downloads\Folder',#Optional:Setacustomdownloadpathprint_to_console=True#Optional:Printmessagestotheconsoleastheyareextracted)#Extractmessagesandmediadata=sleuth.dig()#ExportextracteddatatoaCSVfilesleuth.export_to_csv('chat_data.csv')FunctionsSleuth(api_id, api_hash, username):Purpose:Initializes the Sleuth object for interacting with Telegram.Parameters⠀api_idYour Telegram API ID (required). you can get it onhttps://my.telegram.org/apps.api_hashYour Telegram API hash (required). same source as api_id.usernameThe telegram username target (required). regularly it's on the group/contact info.Optional Parameters⠀start_dateA string in the format 'YYYY-MM-DD' to specify a start date for data extraction (default: None).end_dateA string in the format 'YYYY-MM-DD' to specify an end date for data extraction (default: None).download_pathA path to a directory where downloaded media will be saved (default: None).print_to_consoleA boolean indicating whether to print messages to the console as they are extracted (default: False).dig():Purpose:Extracts messages, media, and metadata from the specified chat.Returns:A python dictionary containing the extracted information.export_to_csv(file_path):Purpose:Exports the extracted data to a CSV file.Parameter:⠀file_pathThe path to the CSV file where the data will be saved.LicenseGNU GPLv3SupportFor support, emailnaufalmng@gmail.comor create an issue on github page,https://github.com/naufalmng/telegram-sleuth/issues.
Package: telegram-task-bot
telegram-task-botLibrary to setup telegram bots with recurring tasks.Usagepip install telegram-task-bot.envVariablesALLOWED_USERSspecifies the users which are allowed, ifany, every one is allowed to use the bot.BOT_TOKENthe token of the bot.START_MESSAGEthe message to be send as response to the start command.ClassesThere are several classes included in this Package.TaskBase class for recurring tasks.Configurationjob_name: strName of the job defined in this taskdisable_notifications: boolDisable notifications, flag send to the telegram servergeneric: boolDefines if the task looks the same for each userfirst_time:timeFirst time to run the task, 0 is now takes adatetime.timerepeat_time: timedeltaDefines the time between two executions of the job, takesdatetime.timedeltafilename: strFilename under which data specific to this job should be savedGenericTaskMore specific class which adds the possiblity to get the actual value and implements user handling.
The data is saved to aJSONfile.
The callback method (callback(self, context: telegram.ext.CallbackContext)) must be implemented.UrlTaskExtension of theGenericTaskto simplify the usage for jobs calling a URL and returning the link/ response to the subscribers.
It retries every 2 seconds until it gets a response.This class adds aurlfield where the information lies.Thehandle_response(self, response: Response)must be implemented to extract the data from the request and return the message string.Example Projecthttps://github.com/bb4L/digitec_daily_botLicenseLGPLv3
Package: telegram_text
telegram-textPython markup module for Telegram messenger.
This module provides a rich list of components to build any possible
markup fast and render it to specifichtmlandMarkdownV2formats.InstallationInstall usingpip install telegram-textorpoetry add telegram-textAlso,telegram-textis integrated into following packages:ModuleInstallationImportDocumentationpython-telegrampip install python-telegramfrom telegram.text import ...ReadmeOrigamiBotpip install origamibot[telegram-text]from origamibot.text import ...ReleaseTGramBotpip install tgrambotfrom tgrambot.text import ...ReadmeBasic Examplefromtelegram_textimportBold,Italic,Underlinetext=Underline(Bold("Bold")+"and"+Italic("italic")+"with underline.")Advanced Examplefromtelegram_textimportBold,Chain,Italic,TOMLSection,Hashtag,Link,UnorderedListdescription="A Channel about software developing and distributing. Subscribe to follow new technologies."tags:dict[str,str]={...}# Tags description with following format `tag: tag_description`links:dict[str,str]={...}# Links with following format `text: url`menu=Chain(TOMLSection('Menu',Italic(description),),TOMLSection('Tags',*[Hashtag(tag,style=Bold)+f"-{about}"fortag,aboutintags.items()],),TOMLSection('Links',UnorderedList(*[Link(text,url)fortext,urlinlinks.items()]),),sep='\n\n')Full documentation and reference are available attelegram-text.alinsky.tech
Package: telegramtui
TelegramTUITelegram client on your consoleDependenciesTelethonNpyScreenpython-aalibInstallationpip install telegramtuiProxyYou can set proxy in config.iniControlsNavigation:Tab,Shift+Tab,MouseSend message:Ctrl+S,Alt+EnterDelete message:Ctrl+RSend file:Ctrl+OExit:Ctrl+Q,ESCCopy:Shift+MousePaste:Shift+Ins,Shift+Middle mouse button