Skip to content

Commit

Permalink
Stable 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
ishangavidusha committed Dec 22, 2021
1 parent 153f9ad commit b08ffa5
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 21 deletions.
37 changes: 26 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sendlk is a python SDK for the [send.lk](https://send.lk) SMS getaway.

## Example

Here is an article of example how to use this package with FastAPI -> [ishanga.hashnode.dev](https://ishanga.hashnode.dev/create-otpmobile-verification-api-with-python-fastapi-and-sendlk-sms-gateway)
Here is an article of example, How to use this package with FastAPI -> [ishanga.hashnode.dev](https://ishanga.hashnode.dev/create-otpmobile-verification-api-with-python-fastapi-and-sendlk-sms-gateway)

## Installation

Expand All @@ -13,6 +13,13 @@ Use the package manager [pip](https://pip.pypa.io/en/stable/) to install sendlk.
```bash
pip install sendlk
```
## Features
- Send Messages
- Send Verify Code (Package's feature)
- Validate Verify Code (Package's feature)
- Check Balance
- _TODO: Contacts_
- _TODO: Message History_

## Send Normal SMS

Expand All @@ -23,7 +30,6 @@ import sendlk
# secret will use in the OTP/Phone number verify module
sendlk.initialize("sendlk-token", "my-custom-super-secret")

# Send SMS
from sendlk.responses import SmsResponse, ProfileResponse
from sendlk.exceptions import SendLKException
from sendlk.engine import SMS, Profile
Expand All @@ -34,15 +40,6 @@ try:
except SendLKException as e:
print(e)

```
## Check remaining balance
```python
try:
response: ProfileResponse = Profile.balance()
print(response.remaining)
except SendLKException as e:
print(e)

```
## Send OTP/Verify Code
```python
Expand Down Expand Up @@ -79,7 +76,25 @@ except SendLKException as e:
print(e)

```
## Check remaining balance
```python
import sendlk

# Befor import any module from sendlk you should initialize it first
# secret will use in the OTP/Phone number verify module
sendlk.initialize("sendlk-token", "my-custom-super-secret")

from sendlk.responses import SmsResponse, ProfileResponse
from sendlk.exceptions import SendLKException
from sendlk.engine import SMS, Profile

try:
response: ProfileResponse = Profile.balance()
print(response.remaining)
except SendLKException as e:
print(e)

```
## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Expand Down
2 changes: 1 addition & 1 deletion sendlk/__about__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""About information (version, etc) for Send.lk SDK."""

__version__ = '0.0.1'
__version__ = '0.1.0'
__title__ = 'sendlk'
__author__ = 'Ishanga Vidusha'
__author_email__ = '[email protected]'
Expand Down
26 changes: 17 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,36 @@
with open(readme_path) as fp:
long_description = fp.read()

__version__ = about['__version__']
__title__ = about['__title__']
__url__ = about['__url__']
__author__ = about['__author__']
__author_email__ = about['__author_email__']
__license__ = about['__license__']


install_requires = [
'requests>=2.26.0',
'cryptography>=36.0.1'
]

setup(
name=about['__title__'],
version=about['__version__'],
name=__title__,
version=__version__,
description='Send.lk Python SDK',
long_description=long_description,
long_description_content_type='text/markdown',
url=about['__url__'],
author=about['__author__'],
author_email=about['__author_email__'],
license=about['__license__'],
url=__url__,
author=__author__,
author_email=__author_email__,
license=__license__,
keywords='send.lk sms getaway',
install_requires=install_requires,
packages=['sendlk'],
download_url='https://github.com/ishangavidusha/sendlk-sdk-python/archive/refs/tags/v0.0.1.tar.gz',
download_url=f'https://github.com/ishangavidusha/sendlk-sdk-python/archive/refs/tags/v{__version__}.tar.gz',
python_requires='>=3.6',
classifiers=[
'Development Status :: 4 - Beta',
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Topic :: Software Development :: Build Tools',
'Programming Language :: Python :: 3',
Expand All @@ -51,7 +59,7 @@
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'License :: OSI Approved :: Apache Software License',
'License :: OSI Approved :: MIT License',
],
)

0 comments on commit b08ffa5

Please sign in to comment.