Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ __pycache__
/stage.py
*.egg
*.egg-info
/dist/
/dist/*.tar.gz
/build
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: python
python:
- "2.7"
- "3.2"
- "3.6"
install: "python setup.py install"
script: python -m unittest discover -s test/
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2014 Chris Brand
Copyright (c) 2019 Clickatell

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Clickatell Python Library
================================

This library supports version **2** of Python.
This library supports version **2.7** & **3.6** of Python.

------------------------------------

Expand All @@ -16,7 +16,7 @@ You can install this library via PIP as part of your requirements file.
pip install clickatell-platform
```

[Clickatell Python PyPI](https://pypi.python.org/pypi?name=clickatell&version=0.0.1&:action=display)
[Clickatell Python PyPI](https://pypi.python.org/pypi?name=clickatell-platform&version=2.0.1&:action=display)

Usage
------------------
Expand Down
3 changes: 2 additions & 1 deletion clickatell/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import urllib
import json
import re
import sys

class Transport:
"""
Expand Down Expand Up @@ -57,7 +58,7 @@ def request(self, action, data={}, headers={}, method='GET'):
:return: The request response
"""
http = httplib2.Http()
body = urllib.urlencode(data)
body = urllib.urlencode(data) if (sys.version_info[0] < 3) else urllib.parse.urlencode(data)
url = 'https://' + self.endpoint + '/' + action
url = (url + '?' + body) if (method == 'GET') else url
resp, content = http.request(url, method, headers=headers, body=json.dumps(data))
Expand Down
Binary file added dist/clickatell_platform-2.0.1-py2-none-any.whl
Binary file not shown.
Binary file added dist/clickatell_platform-2.0.1-py3-none-any.whl
Binary file not shown.
27 changes: 18 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
from setuptools import setup, find_packages
import setuptools

setup(
with open("README.md", "r") as fh:
long_description = fh.read()

setuptools.setup(
name="clickatell-platform",
version="2.0.0",
author="Chris Brand, Stephen Leibbrandt",
version="2.0.1",
author="Chris Brand, Stephen Leibbrandt, Renier Minne",
author_email="[email protected]",
keywords=["clickatell","sms"],
packages=find_packages(),
keywords=["clickatell","sms","platform"],
packages=setuptools.find_packages(),
include_package_data=True,
url="https://github.com/clickatell/clickatell-python",
license="LICENSE",
description="Library for interacting with the Clickatell Platform SMS Gateway",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
license="LICENSE",
install_requires=[
"httplib2",
]
)
],
classifiers=[
"Programming Language :: Python",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
)