![New axobject-query Maintainer Faces Backlash Over Controversial Decision to Support Legacy Node.js Versions](https://cdn.sanity.io/images/cgdhsj6q/production/86e6ebdea652d20da070ebbda20134b839972db7-1024x1024.webp?w=800&fit=max&auto=format)
Security News
New axobject-query Maintainer Faces Backlash Over Controversial Decision to Support Legacy Node.js Versions
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.
Readme
This is simple python api for hahucloud sms. It is a RESTful API, and you can use it to send SMS messages to your customers. It is a simple and easy to use API.
This is unofficial API, and it is not supported by Hahu Clouds. It is just a guide for you to use Hahu SMS API. If you have any questions, please contact us.
Contact Information:
- Email: chapimenge3@gmail.com
- Telegram: @chapimenge
- Twitter: @chapimenge
- Linkedin: https://www.linkedin.com/in/chapimenge/
hahusms is available on PyPI:
python -m pip install hahusms
Hahusms officially supports Python 3.7 and above.
Simple API Reference:
from hahusms import SMS
sms = SMS(api_key='your_api_key')
response = sms.send_message(to='+86xxxxxxxx', message='Hello world!')
print(response['status'])
print(response['message'])
print(response['data'])
# Or you can use the following to make the response from json to object
sms = SMS(api_key='your_api_key', response_format="obj")
response = sms.send_message(to='+86xxxxxxxx', message='Hello world!')
print(response.status)
print(response.message)
print(response.data.message)
The SMS class the base class for all API calls. You can set the following parameters when you initialize the SMS class:
- api_key: Your API key.
- response_format: The response format. It can be "json" or "obj".
- device (optional): The device id to set your own default device.
- sim (optional): The sim slot to set your own default sim slot.
- priority (optional): The priority of the message. It can be 0 or 1.
To use the above parameters we can use as below
from hahusms import SMS
sms = SMS(api_key='your_api_key', response_format="json",
device='your_device_id(int)', sim='your_sim_slot(int)',
priority=1)
You can pass the parameters when you call the API.
sms = SMS(api_key='your_api_key', response_format="obj")
params = {
"id": 1
}
response = sms.get_device(params=params)
print(response.status)
print(response.message)
print(response.data.name) # The response is object type because we set response_format="obj"
you can always override the SMS class and define your own custom methods to call the API.
SMS class have the following methods:
- create_contact
- create_group
- delete_contact
- delete_group
- get_contacts
- get_groups
- get_device
- get_devices
- get_pending
- get_received
- get_received
- send
- send_message - required parameters: to, message
You can find the official Postman Collection for each method in the API Reference.
FAQs
A simple python package to send SMS via HahuCloud API
We found that hahusms demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.
Security News
Results from the 2023 State of JavaScript Survey highlight key trends, including Vite's dominance, rising TypeScript adoption, and the enduring popularity of React. Discover more insights on developer preferences and technology usage.
Security News
The US Justice Department has penalized two consulting firms $11.3 million for failing to meet cybersecurity requirements on federally funded projects, emphasizing strict enforcement to protect sensitive government data.