======
pytill
======
.. image:: https://img.shields.io/pypi/v/pytill.svg
:target: https://pypi.python.org/pypi/pytill
.. image:: https://img.shields.io/travis/manifoldco/pytill.svg
:target: https://travis-ci.org/manifoldco/pytill
.. image:: https://readthedocs.org/projects/pytill/badge/?version=latest
:target: https://pytill.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
Python package for using Till Mobile brought to you by manifold.co
* Free software: BSD license
* Documentation: https://pytill.readthedocs.io.
How to use
--------
Set up a plan for till and retrieve till username and api key. This packages expects the username and api key are injected as env vars ``USERNAME`` and ``API_KEY``.
You can do this simply through manifold:
.. code-block:: bash
manifold create -p till-project --product till --plan free # provision a free till resource
manifold run -p till-project -- python # inject vars
.. code-block:: python
import pytill # or from pytill import pytill
# send a message
pytill.send_message(['19024880000'], 'I am sending a till message isnt that cool!')
# ask a question
# note that asking a question is how we open two-way communicate in Till
# so this is also how you intiate listening to responses to a sms number with Till
question = pytill.make_question('How cool is Till mobile?', 'my-question', 'my.webhook/listens/here')
pytill.send_question(['19024441111', '16139094888'], [question], 'my-project')
# retrieve result
print(pytill.get_results(question_tag='my-question'))
# example output
# {'meta': {'limit': 20, 'next': None, 'offset': 0, 'previous': None, 'total_count': 1}, 'objects': [{'created': '2018-08-27T19:07:35.423855', 'guid': '252cd98f-5969-44c9-a955-7bb54e6f0d19', 'origin_phone_number': '+16508668969', 'participant_guid': '883c8f57-74b9-43cb-bb72-c7634b97651a', 'participant_phone_number': '+19024000158', 'project_launch_guid': '80262aea-a77e-4a0c-911f-23b959aea6da', 'project_launch_participant_guid': '8a23ee27-4841-4f2b-83d5-2a59a05825b8', 'project_tag': 'my-project', 'question_display_order': '0', 'question_guid': '8c8c168f-87d5-454d-8bae-09781312c097', 'question_tag': 'my-question', 'question_text': 'How cool is Till mobile?', 'result_answer': 'really cool!', 'result_guid': '252cd98f-5969-44c9-a955-7bb54e6f0d19', 'result_response': 'really cool!', 'result_timestamp': '2018-08-27T19:07:35.423855', 'updated': '2018-08-27T19:07:35.423884'}]}
# retrive stats about till usage
print(pytill.get_stats())
=======
History
=======
1.0.0 (2018-08-31)
------------------
* Release full package.
0.1.0 (2018-08-27)
------------------
* First release on PyPI.
pytill
======
.. image:: https://img.shields.io/pypi/v/pytill.svg
:target: https://pypi.python.org/pypi/pytill
.. image:: https://img.shields.io/travis/manifoldco/pytill.svg
:target: https://travis-ci.org/manifoldco/pytill
.. image:: https://readthedocs.org/projects/pytill/badge/?version=latest
:target: https://pytill.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
Python package for using Till Mobile brought to you by manifold.co
* Free software: BSD license
* Documentation: https://pytill.readthedocs.io.
How to use
--------
Set up a plan for till and retrieve till username and api key. This packages expects the username and api key are injected as env vars ``USERNAME`` and ``API_KEY``.
You can do this simply through manifold:
.. code-block:: bash
manifold create -p till-project --product till --plan free # provision a free till resource
manifold run -p till-project -- python # inject vars
.. code-block:: python
import pytill # or from pytill import pytill
# send a message
pytill.send_message(['19024880000'], 'I am sending a till message isnt that cool!')
# ask a question
# note that asking a question is how we open two-way communicate in Till
# so this is also how you intiate listening to responses to a sms number with Till
question = pytill.make_question('How cool is Till mobile?', 'my-question', 'my.webhook/listens/here')
pytill.send_question(['19024441111', '16139094888'], [question], 'my-project')
# retrieve result
print(pytill.get_results(question_tag='my-question'))
# example output
# {'meta': {'limit': 20, 'next': None, 'offset': 0, 'previous': None, 'total_count': 1}, 'objects': [{'created': '2018-08-27T19:07:35.423855', 'guid': '252cd98f-5969-44c9-a955-7bb54e6f0d19', 'origin_phone_number': '+16508668969', 'participant_guid': '883c8f57-74b9-43cb-bb72-c7634b97651a', 'participant_phone_number': '+19024000158', 'project_launch_guid': '80262aea-a77e-4a0c-911f-23b959aea6da', 'project_launch_participant_guid': '8a23ee27-4841-4f2b-83d5-2a59a05825b8', 'project_tag': 'my-project', 'question_display_order': '0', 'question_guid': '8c8c168f-87d5-454d-8bae-09781312c097', 'question_tag': 'my-question', 'question_text': 'How cool is Till mobile?', 'result_answer': 'really cool!', 'result_guid': '252cd98f-5969-44c9-a955-7bb54e6f0d19', 'result_response': 'really cool!', 'result_timestamp': '2018-08-27T19:07:35.423855', 'updated': '2018-08-27T19:07:35.423884'}]}
# retrive stats about till usage
print(pytill.get_stats())
=======
History
=======
1.0.0 (2018-08-31)
------------------
* Release full package.
0.1.0 (2018-08-27)
------------------
* First release on PyPI.
Release files for pytill 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pytill-1.0.0.tar.gz | 11.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytill-1.0.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 16.4 kB
Release files / pytill-1.0.0.tar.gz
| Download URL | pytill-1.0.0.tar.gz |
|---|---|
| Size | 11.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d8e475a952e1f689e121052af69bc402aad24b41d3640329fbfb577bea8e1bc7
|
|
BLAKE2b-256 checksum How to use checksums |
337e6cedc353184fcf1b414b00d959d8da6303171f01b6fef9690980722c4a7d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.3
|
Release files / pytill-1.0.0-py2.py3-none-any.whl
| Download URL | pytill-1.0.0-py2.py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
118e79a14b9b706a9e14c158db31b48d81615bb843dba816c86b0ad954183caf
|
|
BLAKE2b-256 checksum How to use checksums |
75e57059a2f7592b5218f5cd2f76efe8f42553efd65c52e1ad9986908cc4a00c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.3
|