It is a library, that makes it easier for you to comunicate with the Ozeki SMS Gateway.
Project description
How to use the ozekilibsrest library
How to install the ozekilibsrest library
In order to install the ozekilibsrest library you have to use the following command:
pip install ozekilibsrest
After you have installed the library, you can import its contents into your project by using the following lines of code:
from ozekilibsrest import Configuration, Message, MessageApi
Creating a Configuration
To send your SMS message to the built in API of the Ozeki SMS Gateway, your client application needs to know the details of your Gateway and the http_user. We can define a Configuration instance with these lines of codes in Python.
configuration = Configuration(
username="http_user",
password="qwe123",
api_url="http://127.0.0.1:9509/api"
)
Creating a Message
After you have initialized your configuration object you can continue by creating a Message object. A message object holds all the needed data for message what you would like to send. In Python we create a Message instance with the following lines of codes:
msg = Message(
to_address="+36201111111",
text="Hello world!"
)
Creating a MessageApi
You can use the MessageApi class of the ozekilibsrest library to create a MessageApi object which has the methods to send, delete, mark and receive SMS messages from the Ozeki SMS Gateway. To create a MessageApi, you will need these lines of codes and a Configuration instance.
api = MessageApi(configuration)
After everything is ready you can begin with sending the previously created Message object:
result = api.send(msg)
print(result)
After you have done all the steps, you check the Ozeki SMS Gateway and you will see the message in the Sent folder of the http_user.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ozekilibsrest-1.8.0.tar.gz.
File metadata
- Download URL: ozekilibsrest-1.8.0.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c27095727ce7d83c230f443af77923fdf77d0bda413830dfe6446f531ae4f78
|
|
| MD5 |
e5b0a592af7f6bc47b7bda672cad6ab3
|
|
| BLAKE2b-256 |
85cef344fac554e388f5e51552b5a8b6d62416e89fd14b8f09aeb9b25d194946
|
File details
Details for the file ozekilibsrest-1.8.0-py3-none-any.whl.
File metadata
- Download URL: ozekilibsrest-1.8.0-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67e1a92572aa6b811181adfdbd4d5db41097f0215cb8b72183fc5dbd173a3861
|
|
| MD5 |
ac73a733e1314747f7be1149ef40fcfc
|
|
| BLAKE2b-256 |
5357cb0817e9a421061486d18e09ba2dda0fe97b61cad5d75715f2dba06f7170
|