Skip to content

Commit

Permalink
fix package config + readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Hensel committed May 4, 2016
1 parent 7948e88 commit be817fd
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 33 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
build
dist
*.py[cod]
*.egg-info
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
include README.rst
recursive-include test/data *.jpg *.png *json
64 changes: 34 additions & 30 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,43 +25,47 @@ Getting the instance of the SendsayAPI class
.. code-block:: python
from sendsay.api import SendsayAPI
api = SendsayAPI(login='<YOUR_LOGIN>', sublogin='<YOUR_SUBLOGIN>', password='<YOUR_PASSWORD>')
api = SendsayAPI(login='<YOUR_LOGIN>', sublogin='<YOUR_SUBLOGIN>', password='<YOUR_PASSWORD>')
Making a simple request
-------------------
.. code-block:: python
response = api.request('sys.settings.get', list=['about.name'])
response = api.request('sys.settings.get', list=['about.name'])
Making an async request
-------------------
.. code-block:: python
response = api.request('issue.send', {
'sendwhen': 'now',
'letter': {
'subject': "Subject",
'from.name': "Tester",
'from.email': "test@test.ru",
'message': {
'html': "Sendsay API client test message<hr>Hello!</a>"
},
'attaches': [
api.attach_file("sample.jpg")
],
},
'relink' : 1,
'users.list': "test1@test.ru\ntest2@test.ru",
'group' : 'masssending',
})
# Waiting for the results
result = self.api.track_wait(
response,
callback=show_track_process, # call your show_track_process() for every status (if necessary)
retry_interval=5,
max_attempts=100
)
response = api.request('issue.send', {
'sendwhen': 'now',
'letter': {
'subject': "Subject",
'from.name': "Tester",
'from.email': "test@test.ru",
'message': {
'html': "Sendsay API client test message<hr>Hello!</a>"
},
'attaches': [
api.attach_file("sample.jpg")
],
},
'relink' : 1,
'users.list': "test1@test.ru\ntest2@test.ru",
'group' : 'masssending',
})
# Your tracking function definition if you want to track
def track_process(resp, status_msg):
print('---- %s' % status_msg) # Print a status message for example
# Waiting for the end of the process with status tracking
result = api.track_wait(
response,
callback=track_process, # your tracking function (if necessary)
retry_interval=5,
max_attempts=100
)
2 changes: 1 addition & 1 deletion sendsay/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
# License for the specific language governing permissions and limitations
# under the License.

__version__ = "0.1.1"
__version__ = "0.1.2"
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python
from setuptools import setup
from setuptools import setup, find_packages

exec(open("sendsay/version.py").read())

Expand All @@ -8,12 +8,14 @@
version=__version__,
description='The Sendsay API client library.',
author='Vadim Khakulov',
author_email='vadim.khakulov@gmail.com',
maintainer='Vadim Khakulov',
maintainer_email='vadim.khakulov@gmail.com',
url='https://github.com/sendsay-ru/sendsay-api-python',
license='Apache',
test_suite='test.test_sendsay',
packages=["sendsay","test"],
packages=find_packages(),
include_package_data=True,
long_description=open("README.rst").read(),
classifiers=[
'License :: OSI Approved :: Apache Software License',
Expand Down

0 comments on commit be817fd

Please sign in to comment.