Skip to content

Commit d412a28

Browse files
vandelay-artArt Vandelaykilicluka
authored
Changed version number and README.md (#52)
* Changed version number and README.md * README small fixes * Update setup.cfg github urls and description Co-authored-by: Art Vandelay <start.vandelay@gmail.com> Co-authored-by: Luka Kilic <kilic.luka@gmail.com>
1 parent 05d93b1 commit d412a28

File tree

2 files changed

+80
-14
lines changed

2 files changed

+80
-14
lines changed

README.md

Lines changed: 75 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,73 @@
1-
# infobip-python-channels
2-
Python client for Infobip's channels API.
1+
# infobip-api-python-sdk
2+
Python client for Infobip's API channels.
33

4+
#### Table of contents:
5+
6+
- [General Info](#general-info)
7+
- [License](#license)
8+
- [Installation](#installation)
9+
- [Code example](#code-example)
10+
- [Testing](#testing)
11+
- [Enable pre-commit hooks](#enable-pre-commit-hooks)
12+
- [Generating distribution package](#generating-distribution-package)
13+
- [Uploading distribution package on TestPyPI](#uploading-distribution-package-on-testpypi-for-testing-purposes)
14+
- [Installing your newly uploaded package](#installing-your-newly-uploaded-package)
15+
16+
17+
## General Info
18+
19+
For `infobip-api-python-sdk` versioning we use [Semantic Versioning](https://semver.org) scheme.
20+
21+
Python 3.6 is minimum supported version by this library.
22+
23+
## License
24+
25+
Published under [MIT License](LICENSE).
26+
27+
## Installation
28+
29+
Install the library by using the following command:
30+
```
31+
pip install infobip-api-python-sdk
32+
```
33+
34+
## Code Example
35+
To use the package you'll need an Infobip account.
36+
If you don't already have one, you can create a free trial account [here](https://www.infobip.com/signup).
37+
38+
In this example we will show how to send WhatsApp text message.
39+
First step is to import necessary channel, in this case WhatsApp channel.
40+
41+
```
42+
from infobip_channels import WhatsAppChannel
43+
```
44+
45+
Now you can create instance of `WhatsAppChannel` with your `base_url` and `api_key`.
46+
47+
```
48+
c = WhatsAppChannel.from_auth_params({
49+
"base_url": "<your_base_url>",
50+
"api_key": "<your_api_key>"
51+
})
52+
```
53+
After that you can access all the methods from `WhatsAppChannel`.
54+
To send text message you can use `send_text_message` method and add correct payload:
55+
```
56+
response = c.send_text_message(
57+
{
58+
"from": "<WhatsApp sender number from your Infobib account>",
59+
"to": "<Number that will receive WhatsApp message>",
60+
"messageId": "a28dd97c-1ffb-4fcf-99f1-0b557ed381da",
61+
"content": {
62+
"text": "Some text"
63+
},
64+
"callbackData": "Callback data",
65+
"notifyUrl": "https://www.example.com/whatsapp"
66+
}
67+
)
68+
```
469
## Testing
5-
To run tests position yourself in the project's root while your virual environment
70+
To run tests position yourself in the project's root while your virtual environment
671
is active and run:
772
```
873
python -m pytest
@@ -27,7 +92,7 @@ To check installation run:
2792
pre-commit --version
2893
```
2994
If installation was successful you will see version number.
30-
Pre-commit configuration you can find in `.pre-commit-config.yaml`.
95+
You can find the Pre-commit configuration in `.pre-commit-config.yaml`.
3196
Install the git hook scripts:
3297
```
3398
pre-commit install
@@ -36,9 +101,9 @@ Run against all files:
36101
```
37102
pre-commit run --all-files
38103
```
39-
If setup was successful pre-commit will run will now run on every commit.
40-
Every time you clone a project using pre-commit running `pre-commit install`
41-
should always be the first thing you do.
104+
If setup was successful pre-commit will run on every commit.
105+
Every time you clone a project that uses pre-commit, running `pre-commit install`
106+
should be the first thing you do.
42107

43108

44109
## Generating distribution package
@@ -47,10 +112,11 @@ Make sure you have the latest version of PyPA's
47112
```
48113
python -m pip install --upgrade build
49114
```
50-
115+
After installation check `setup.cfg` file for metadata.
116+
Name and version are used for file generation.
117+
Make sure that you appropriately change version before build.
51118
Update the `version` in the `setup.cfg` file to the desired one.
52119

53-
54120
Now run this command from the same directory where pyproject.toml is located:
55121
```
56122
python -m build

setup.cfg

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[metadata]
22
name = infobip-channels
3-
version = 0.0.4
3+
version = 1.0.0
44
author = Luka Kilic
55
author_email = kilic.luka@gmail.com
6-
description = Infobip's channels API package
6+
description = Infobip channels API client
77
long_description = file: README.md
88
long_description_content_type = text/markdown
9-
keywords = infobip, channels, whatsapp, api
10-
url = https://github.com/kilicluka/infobip-python-channels
9+
keywords = infobip, sdk, channels, whatsapp, api
10+
url = https://github.com/infobip-community/infobip-api-python-sdk
1111
project_urls =
12-
Bug Tracker = https://github.com/kilicluka/infobip-python-channels/issues
12+
Bug Tracker = https://github.com/infobip-community/infobip-api-python-sdk/issues
1313
classifiers =
1414
Programming Language :: Python :: 3
1515
License :: OSI Approved :: MIT License

0 commit comments

Comments
 (0)