voipms-python/README.md

38 lines
837 B
Markdown
Raw Normal View History

2019-08-18 02:02:44 +00:00
# voipms-python
A python-based API wrapper for [voip.ms](https://voip.ms/).
## Installation
You can install this package from PyPi using [pip](http://www.pip-installer.org/en/latest/), a package manager for Python. Once pip is installed, run
```sh
pip install --upgrade voipms-python
```
You can also install from source with:
```sh
python setup.py install
```
### Requirements
- Python 2.7+ or 3.4+
## Usage
The library needs to be configured with your account's email and API password, the latter of which can be created [here](https://voip.ms/m/api.php). Once that's been done, create a Client object as shown below:
2019-08-18 02:02:44 +00:00
```python
from voipms.api import Client
2019-08-18 02:02:44 +00:00
email = "test@email.com"
api_password = "01N0sWTdiutWTHNF"
2019-08-18 02:02:44 +00:00
client = Client(email, api_password)
2019-08-18 02:02:44 +00:00
# get current account balance
balance = client.balance.fetch()
2019-08-18 02:02:44 +00:00
```