Open source Whatsapp business API client for python - python

I have my own Whatsapp business account.
I want to have a client that can:
Alert me when I get a new message
Be able to send an automatic reply based on the original message I've received.
I've searched the web for ready open source python clients I can use and found only one that might be suitable - https://pypi.org/project/wabclient/
The problem - there is no documentation on how to use it, reviews etc.
Are there any other open sources I can use to achieve my goal? Any sample projects that use wabclient?

Related

Is there a way to get the emails of new YouTube subscribers? Python

So as the title says.. ''Is there a way to get the emails of new YouTube subscribers? Python''
i am planning to build an emailing list wherein if a person subscribes to my youtube channel, i want to be able to automatically send them an email containing my latest blogs and video updates. so is there a way to do that? maybe using the youtube api? or external codes or websites?
i know that i could just ask them for their email addresses using a google form and link that to a python script that sends emails using SMTP but i want to do it automatically when they subscribe to my youtube channel.
any help will help alot
thank you
Yes, you can. You can use the youtube api. Simply call the api, and get whatsoever the element is, for new subscribers. Then, you can create a text and mail it to yourself.
For making it run all the time, you have to go to the terminal and keep it running...

Sending SMS texts in Python without the need for a 3rd party API?

Does anyone know what would go into sending text messages with Python WITHOUT the need for a 3rd party API? What knowledge do I need to have to achieve such a thing? I've only been coding for a few months, so I still consider myself fairly new and there's a lot I don't know about networking. I know there are services like Twilio that offer a python library for sending text messages, but if I wanted to type out my own script, from scratch, what would need to go into it. I'm willing to read some documentation if that's necessary as long as it's not hundreds of pages long. Being as detailed as possible in your response is greatly appreciated. Thanks!
This can be done by sending an email via SMTP to the SMS gateway of the carrier of the recipient phone number. Each carrier has a unique email address usually in the form of {number}#{host}. Within Python, you can use the builtin smptlib (or aiosmtplib) library to send the email. I wrote an example script here to send using GMail.
Please tell me if I did not understand your question correctly, then I will try to improve it or I'll delete it.
Sending an SMS requires something, that can send an SMS. Which is normally not your laptop / PC, except it has a SIM card and a mobile phone modem. So you need a mobile phone or a service, that offers sending SMS if you subscribe / pay.
Most professional available services allow to send an SMS with simple HTTP GET or POST requests, so you don't need a third party python module, but you must connect to a third party web API in most cases the python code is really simple, but first you need an SMS service provider
Some services also allow sending SMS via SMTP (sending emails) which
#acamso adresses in his response
If you have an Android device you could install shellms on it ( https://f-droid.org/en/packages/com.android.shellms/ ) connect it via USB to your PC and use adb to send SMS, which will be billed on your phone's bill / contract.
I am not aware of any SMS service, that is for free, so if you subscribe to an SMS provider it will provide you with an API, that can normally very easily be handled from python.

Amazon MWS - how do I go about using AnyOfferChanged Notification with python

I want to develop an app that sends me an email when pricing offers for specific listings change using the AnyOfferChanged MWS notifications. However, I can't find any good documentation on how to go about receiving the notifications. Is it a must to have AWS SQS, or can I use Django? how do I go about subscribing to a notification?
I already have a developers account and I'm using the python mws library
You need to subscribe to the AnyOfferChangedNotification through the Subscriptions API and yes, it must use SQS. I found it easiest to use the scratchpad to create the subscription, since it's usually a one-time event.
Once your price change notifications start flowing into your queue, write an app that reads the queue and you can respond to your messages, including sending an email if that's what you want to do.
See if these code samples for SQS help you: https://docs.aws.amazon.com/code-samples/latest/catalog/code-catalog-python-example_code-sqs.html

Opensource push based API for RSS feed

I have checked various Python rss feed parser and it works well. I am able to parse the rss feed result using pulling mechanism.
data_et = feedparser.parse('http://economictimes.indiatimes.com/Markets/markets/rssfeeds/1977021501.cms')
for value in data_et['entries']:
print value['link']
Is there any opensource API with push based mechanism, so rather then I make request to server for updated data, I get notification that new updates are available.
P.S. I dont want mail based or Desktop application based notification. I want it to happen programatically using python
You should look at the PubSubHubbub open protocol which will use a webhook pattern to send you notification when a feed has been updated. Also check Superfeedr which does the same but for any feed.

How do I enable SMS notifications in my web apps?

I have a web application and I would like to enable real time SMS notifications to the users of the applications.
Note: I currently cannot use the Twitter API because I live in West Africa, and Twitter doesn't send SMS to my country.
Also email2sms is not an option because the mobile operators don't allow that in my country.
There are a couple of options.
Get some kind of SMS modem or connectivity and use your own cell phone using smslib. I am sorry I don't provide python interfaces but my experience is Java. The downside is that you will pay the full consumer rate. And you will have to put a cell phone on your data center.
Connect to SMPP gateway. You will have to talk to the mobile operator in order to make this work. There is a library called jsmpp here. Again, I am sorry it is not python.
If it is too much of a hassle you could use an intermediary, which provides HTTP-SMS gateways, like this one. That's easy because you don't need to use SMPP and your system administrators wont bark at you for putting cell phones in the datacenter.
What about using a proper sms gateway. These guys got APIs for several languages:
http://www.clickatell.com/developers/php.php
There is an unofficial Python API too
http://www.arnebrodowski.de/projects/clickatell/
Another SMS gateway with a Python interface is TextMagic. Their Python API is available from the Google Code project textmagic-sms-api-python. They have libraries available for other languages as well; all wrapping a simple HTTPS API.
Code samples from the project website:
How to send an SMS:
import textmagic.client
client = textmagic.client.TextMagicClient('your_username', 'your_api_password')
result = client.send("Hello, World!", "1234567890")
message_id = result['message_id'].keys()[0]
And retrieve its delivery status:
response = client.message_status(message_id)
status = response[message_id]['status']
(Full disclosure: I am the author of the Python wrapper library)
The easiest way to accomplish this is by using a third party API. Some I know that work well are:
restSms.me
Twilio.com
Clicatell.com
I have used all of them and they easiest/cheapest one to implement was restSms.me
Hope that helps.
I don't have any knowledge in this area. But I think you'll have to talk to the mobile operators, and see if they have any API for sending SMS messages.
You'll probably have to pay them, or have some scheme for customers to pay them. Alternatively there might be some 3rd party that implements this functionality.
Warning: extremely elegant solution ahead! (Android app)
If you want to send SMS to any number in as simple of a manner as sending an e-mail:
mail('configuredEMail#configuredDomain', '0981122334', 'SMS message'); // PHP
or even:
echo 'SMS message' | mail -s '0981234567' configuredEMail#configuredDomain.com
or even from a GUI mail client, then read on.
To skip explanations google Evorion SMS Gateway.
What does it do? It forwards e-mail to SMS with a built-in battery saver.
In order to send an SMS you simply send an email to 'configuredEMail#configuredDomain.com' with Subject 'phoneNumberToForwardTo'.
Code contributions welcome.
If your country is in this list, Twilio is an extremely easy API to use :)

Categories

Resources