Skip to content

Commit ab74582

Browse files
committed
Added code
1 parent a026dc0 commit ab74582

File tree

86 files changed

+5029
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+5029
-1
lines changed

LICENSE

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
License:
2+
========
3+
The MIT License (MIT)
4+
http://opensource.org/licenses/MIT
5+
6+
Copyright (c) 2014 - 2016 APIMATIC Limited
7+
8+
Permission is hereby granted, free of charge, to any person obtaining a copy
9+
of this software and associated documentation files (the "Software"), to deal
10+
in the Software without restriction, including without limitation the rights
11+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+
copies of the Software, and to permit persons to whom the Software is
13+
furnished to do so, subject to the following conditions:
14+
15+
The above copyright notice and this permission notice shall be included in
16+
all copies or substantial portions of the Software.
17+
18+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24+
THE SOFTWARE.
25+
26+
Trade Mark:
27+
==========
28+
APIMATIC is a trade mark for APIMATIC Limited

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include LICENSE
2+
include README.md

README.md

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,66 @@
1-
# python-sdk
1+
# Getting Started with bandwidth
2+
3+
Bandwidth's set of APIs
4+
5+
## Install the Package
6+
7+
The package is compatible with Python versions ```2 >=2.7.9``` and ```3 >=3.4```.
8+
Install the package from PyPi using the following pip command:
9+
10+
```python
11+
pip install bandwidth-sdk==5.1.0
12+
```
13+
14+
You can also view the package at:
15+
https://pypi.python.org/pypi/bandwidth-sdk
16+
17+
## Initialize the API Client
18+
19+
The following parameters are configurable for the API Client.
20+
21+
| Parameter | Type | Description |
22+
| --- | --- | --- |
23+
| `messaging_basic_auth_user_name` | `string` | The username to use with basic authentication |
24+
| `messaging_basic_auth_password` | `string` | The password to use with basic authentication |
25+
| `voice_basic_auth_user_name` | `string` | The username to use with basic authentication |
26+
| `voice_basic_auth_password` | `string` | The password to use with basic authentication |
27+
| `environment` | Environment | The API environment. <br> **Default: `Environment.PRODUCTION`** |
28+
| `timeout` | `float` | The value to use for connection timeout. <br> **Default: 60** |
29+
| `max_retries` | `int` | The number of times to retry an endpoint call if it fails. <br> **Default: 3** |
30+
| `backoff_factor` | `float` | A backoff factor to apply between attempts after the second try. <br> **Default: 0** |
31+
32+
The API client can be initialized as following.
33+
34+
```python
35+
from bandwidth.bandwidth_client import BandwidthClient
36+
37+
client = BandwidthClient(
38+
messaging_basic_auth_user_name='MessagingBasicAuthUserName',
39+
messaging_basic_auth_password='MessagingBasicAuthPassword',
40+
voice_basic_auth_user_name='VoiceBasicAuthUserName',
41+
voice_basic_auth_password='VoiceBasicAuthPassword',
42+
environment = Environment.PRODUCTION,)
43+
```
44+
45+
API calls return an `ApiResponse` object that includes the following fields:
46+
47+
| Field | Description |
48+
| --- | --- |
49+
| `status_code` | Status code of the HTTP response |
50+
| `reason_phrase` | Reason phrase of the HTTP response |
51+
| `headers` | Headers of the HTTP response as a dictionary |
52+
| `text` | The body of the HTTP response as a string |
53+
| `request` | HTTP request info |
54+
| `errors` | Errors, if they exist |
55+
| `body` | The deserialized body of the HTTP response |
56+
57+
## Authorization
58+
59+
This API does not require authentication.
60+
61+
## API Reference
62+
63+
### List of APIs
64+
65+
*
66+

bandwidth/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
__all__ = [
2+
'models',
3+
'controllers',
4+
'BandwidthClient',
5+
]

0 commit comments

Comments
 (0)