{ "info": { "author": "Laban Mwangi", "author_email": "support@east36.co.ke", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Nifty-Client\n=======================================\n\nNifty Client is the official Python client for the nifty API.\nIt does some heavy lifting to provide a simple and portable client.\nIf you do find the client missing some features, please make a pull request\nor cut an issue.\n\n\n\nInstallation\n===============\nInstalling the client is simple with pip:\n\n.. code-block:: sh\n\n pip install niftyclient\n\n\nQuickstart\n=============\n\nAfter installing the client, get your api credentials from the nifty dashboard,\nconfigure the client with the credentials and you are good to go.\n\n.. code-block:: python\n\n from niftyclient import NiftyWalletClient\n\n class ExampleConfig:\n key_id = \"f4664c39663272d70b7ebdc96ddac72e\"\n secret = \"4c198a69e108ce6f293734d4f0a511a0d1fd6bf70a26e9c2e5f147ff41615f9bf3b6349595aff7011ca28f806976715a\"\n user_id = \"15695297-f441-4b1c-a75b-831fbb1d1431\"\n\n\n client = NiftyWalletClient(ExampleConfig())\n\n client.get_wallet()\n # Response is wallet response with no wallet\n # MutableDictionaryObject({'available_resultset_size': 0, 'tracking_uuid': UUID('89feedd2-2c51-11e7-bd4c-000c29e41bf4'), 'wallets': [] 'limit': 30, 'offset': 0, 'returned_resultset_size': 0})\n\n client.create_wallet()\n # wallet created.\n # MutableDictionaryObject({'available_resultset_size': 1, 'tracking_uuid': UUID('89feedd2-2c51-11e7-bd4c-000c29e41bf4'), 'wallets': [DictionaryObject({'user_name': u'mike', 'created_at': datetime.datetime(2017, 4, 24, 23, 33, 52, 747695, tzinfo=tzoffset(None, 10800)), 'balance': Decimal('0.00'), 'user_id': UUID('8dad2dea-7d7f-4e8b-a61c-53150f1b7452'), 'last_modified': datetime.datetime(2017, 4, 27, 21, 31, 15, 268358, tzinfo=tzoffset(None, 10800))})], 'limit': 30, 'offset': 0, 'returned_resultset_size': 1})\n client.create_wallet()\n # This operation is idempotent and will return the same result as above\n\n client.get_wallet()\n # MutableDictionaryObject({'available_resultset_size': 1, 'tracking_uuid': UUID('89feedd2-2c51-11e7-bd4c-000c29e41bf4'), 'wallets': [DictionaryObject({'user_name': u'mike', 'created_at': datetime.datetime(2017, 4, 24, 23, 33, 52, 747695, tzinfo=tzoffset(None, 10800)), 'balance': Decimal('0.00'), 'user_id': UUID('8dad2dea-7d7f-4e8b-a61c-53150f1b7452'), 'last_modified': datetime.datetime(2017, 4, 27, 21, 31, 15, 268358, tzinfo=tzoffset(None, 10800))})], 'limit': 30, 'offset': 0, 'returned_resultset_size': 1})\n\n # Consume token. This operation is not idempotent and is atomic.\n client.consume_token(\n transaction_id=\"2TR46IBB5C\", phone_number=\"254722123456\", till_number=703648)\n # MutableDictionaryObject({'transactions': [DictionaryObject({'till_number': u'703648', 'payment_id': UUID('d2c29c60-0b1a-11e7-8f7b-061cf2e0e94d'), 'user_id': UUID('8dad2dea-7d7f-4e8b-a61c-53150f1b7452'), 'trans_amount': Decimal('799.23'), 'msisdn': u'254722123456', 'trans_time': datetime.datetime(2016, 5, 29, 21, 30, 52, 739072, tzinfo=tzoffset(None, 10800)), 'names': u'First M Last', 'trans_id': u'2TR46IBB5C'})], 'tracking_uuid': UUID('3582b27e-2c52-11e7-bd4c-000c29e41bf4'), 'available_resultset_size': 1, 'limit': 0, 'offset': 0, 'returned_resultset_size': 1})\n\n # Operation should not succeed again\n client.consume_token(\n transaction_id=\"2TR46IBB5C\", phone_number=\"254722123456\", till_number=703648)\n # MutableDictionaryObject({'transactions': [], 'tracking_uuid': UUID('c63774da-2c52-11e7-bd4c-000c29e41bf4'), 'available_resultset_size': 0, 'limit': 0, 'offset': 0, 'returned_resultset_size': 0})\n\n # Any incorrect field will not return a redemption transaction.\n client.consume_token(\n transaction_id=\"2TR46IBB5C\", phone_number=\"254716622446\", till_number=703646)\n # MutableDictionaryObject({'transactions': [], 'tracking_uuid': UUID('c63774da-2c52-11e7-bd4c-000c29e41bf4'), 'available_resultset_size': 0, 'limit': 0, 'offset': 0, 'returned_resultset_size': 0})\n\n # Transactions list\n client.transactions()\n # MutableDictionaryObject({'transactions': [DictionaryObject({'till_number': u'703648', 'payment_id': UUID('d2c29c60-0b1a-11e7-8f7b-061cf2e0e94d'), 'user_id': UUID('8dad2dea-7d7f-4e8b-a61c-53150f1b7452'), 'trans_amount': Decimal('799.23'), 'msisdn': u'254722123456', 'trans_time': datetime.datetime(2016, 5, 29, 21, 30, 52, 739072, tzinfo=tzoffset(None, 10800)), 'names': u'First M Last', 'trans_id': u'2TR46IBB5C'}), DictionaryObject({'till_number': u'703648', 'payment_id': UUID('d2c29c60-0b1a-11e7-8f7b-061cf2e0e94d'), 'user_id': UUID('8dad2dea-7d7f-4e8b-a61c-53150f1b7452'), 'trans_amount': Decimal('581.37'), 'msisdn': u'254722123456', 'trans_time': datetime.datetime(2017, 1, 24, 21, 30, 52, 739243, tzinfo=tzoffset(None, 10800)), 'names': u'First M Last', 'trans_id': u'0OZC02Q1OZ'}), DictionaryObject({'till_number': u'703648', 'payment_id': UUID('d2c29c60-0b1a-11e7-8f7b-061cf2e0e94d'), 'user_id': UUID('8dad2dea-7d7f-4e8b-a61c-53150f1b7452'), 'trans_amount': Decimal('657.56'), 'msisdn': u'254722123456', 'trans_time': datetime.datetime(2017, 1, 31, 21, 30, 52, 739409, tzinfo=tzoffset(None, 10800)), 'names': u'First M Last', 'trans_id': u'3PEYGJ6IVK'}), DictionaryObject({'till_number': u'703648', 'payment_id': UUID('d2c29c60-0b1a-11e7-8f7b-061cf2e0e94d'), 'user_id': UUID('8dad2dea-7d7f-4e8b-a61c-53150f1b7452'), 'trans_amount': Decimal('837.30'), 'msisdn': u'254722123456', 'trans_time': datetime.datetime(2017, 2, 1, 21, 30, 52, 739964, tzinfo=tzoffset(None, 10800)), 'names': u'First M Last', 'trans_id': u'O65UCIF7I6'}), DictionaryObject({'till_number': u'703648', 'payment_id': UUID('d2c29c60-0b1a-11e7-8f7b-061cf2e0e94d'), 'user_id': UUID('8dad2dea-7d7f-4e8b-a61c-53150f1b7452'), 'trans_amount': Decimal('808.16'), 'msisdn': u'254722123456', 'trans_time': datetime.datetime(2017, 2, 15, 21, 30, 52, 740086, tzinfo=tzoffset(None, 10800)), 'names': u'First M Last', 'trans_id': u'ZJZCT31FQE'})], 'tracking_uuid': UUID('93b6845a-2c53-11e7-bf31-000c29e41bf4'), 'available_resultset_size': 5, 'limit': 30, 'offset': 0, 'returned_resultset_size': 5})\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/east36/python-nifty-client", "keywords": "", "license": "GPLv3", "maintainer": "", "maintainer_email": "", "name": "niftyclient", "package_url": "https://pypi.org/project/niftyclient/", "platform": "any", "project_url": "https://pypi.org/project/niftyclient/", "project_urls": { "Homepage": "https://bitbucket.org/east36/python-nifty-client" }, "release_url": "https://pypi.org/project/niftyclient/0.3.0/", "requires_dist": null, "requires_python": "", "summary": "Official Python API client for Nifty", "version": "0.3.0" }, "last_serial": 4233157, "releases": { "0.2": [], "0.2.1": [ { "comment_text": "", "digests": { "md5": "57e343f91fa79e076c21b67f5be91a90", "sha256": "c9d2521c8743e59484202896fb0f965f65f0dde3948cce156aec77b74f7c2231" }, "downloads": -1, "filename": "niftyclient-0.2.1.tar.gz", "has_sig": false, "md5_digest": "57e343f91fa79e076c21b67f5be91a90", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5371, "upload_time": "2017-04-28T20:55:34", "url": "https://files.pythonhosted.org/packages/33/18/97de03fcdceed03d564ccdb9562d4272009c9e387694a5f77919447b83fd/niftyclient-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "5dac20aadc77b5997ffd3b0d2df081b8", "sha256": "c8a6384584d6fba5551176302fd9000da960c50ffcd194f756a21d4b853ddf09" }, "downloads": -1, "filename": "niftyclient-0.2.2.tar.gz", "has_sig": false, "md5_digest": "5dac20aadc77b5997ffd3b0d2df081b8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6473, "upload_time": "2017-07-23T20:34:20", "url": "https://files.pythonhosted.org/packages/18/96/6db1d94168b03873f2eaab8d90409849b0addc95b3ca4aff1a5398fc774b/niftyclient-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "4761bb6f3775b087cfaaafa5acccf227", "sha256": "7c20ff5eb5b732262d6e235912c524e2767fd87709ffa727fd1d86923381f86a" }, "downloads": -1, "filename": "niftyclient-0.2.3.tar.gz", "has_sig": false, "md5_digest": "4761bb6f3775b087cfaaafa5acccf227", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6525, "upload_time": "2017-09-08T20:09:58", "url": "https://files.pythonhosted.org/packages/f5/8a/48ec4c95f5567734832a40379fd4c69049ba0a7ddc41902ff67a4201bf5b/niftyclient-0.2.3.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "5510ef63d870a9eb7a920cc1b3a149d4", "sha256": "caf194a3a2010546ae700a9874035319d645797f3c8ccb02279d8c0d7d7aa9b0" }, "downloads": -1, "filename": "niftyclient-0.3.0.tar.gz", "has_sig": false, "md5_digest": "5510ef63d870a9eb7a920cc1b3a149d4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7132, "upload_time": "2018-09-03T03:19:28", "url": "https://files.pythonhosted.org/packages/fb/ce/8638a8fbf1d6d62132504bda75bd10450552ce579dfb407b6daaf1eb88fe/niftyclient-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5510ef63d870a9eb7a920cc1b3a149d4", "sha256": "caf194a3a2010546ae700a9874035319d645797f3c8ccb02279d8c0d7d7aa9b0" }, "downloads": -1, "filename": "niftyclient-0.3.0.tar.gz", "has_sig": false, "md5_digest": "5510ef63d870a9eb7a920cc1b3a149d4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7132, "upload_time": "2018-09-03T03:19:28", "url": "https://files.pythonhosted.org/packages/fb/ce/8638a8fbf1d6d62132504bda75bd10450552ce579dfb407b6daaf1eb88fe/niftyclient-0.3.0.tar.gz" } ] }