Skip to main content

Python package for using Till Mobile

Project description

======
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.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytill-1.0.0.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

pytill-1.0.0-py2.py3-none-any.whl (5.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pytill-1.0.0.tar.gz.

File metadata

  • Download URL: pytill-1.0.0.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for pytill-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d8e475a952e1f689e121052af69bc402aad24b41d3640329fbfb577bea8e1bc7
MD5 84692791893c8eeff35dd119eb88a75e
BLAKE2b-256 337e6cedc353184fcf1b414b00d959d8da6303171f01b6fef9690980722c4a7d

See more details on using hashes here.

File details

Details for the file pytill-1.0.0-py2.py3-none-any.whl.

File metadata

  • Download URL: pytill-1.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using 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

File hashes

Hashes for pytill-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 118e79a14b9b706a9e14c158db31b48d81615bb843dba816c86b0ad954183caf
MD5 a9fc0da2e07dd84c50a0de7983c9bda7
BLAKE2b-256 75e57059a2f7592b5218f5cd2f76efe8f42553efd65c52e1ad9986908cc4a00c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page