{ "info": { "author": "Bayonet", "author_email": "support@bayonet.io", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "## Bayonet\nBayonet enables companies to feed and consult a global database about online consumers\u2019 reputation, based on historic payments. Start making smarter business decisions today.\n\n### Introduction\nBayonet\u2019s API is organized around REST and exposes endpoints for HTTP requests. It is designed to have predictable, resource-oriented URLs and uses standard HTTP response codes to indicate the outcome of operations. Request and response payloads are formatted as JSON.\n\n### About the service\nBayonet provides an Ecosystem of Trust and Protection where companies can colaborate with each other to combat online fraud together. We provide a secure platform to share and consult data to understand when a consumer is related to fraudulent activity or has a fraud-free record. Different technologies that run algorithms to link parameters seen in different transactions, fed by companies connected to the ecosystem are employed in order to build consumer profiles. By consulting Bayonet\u2019s API, a response with data provided by companies themselves is available in real-time for your risk assesment process to analyze it and take better decisions.\n\n### Bayonet's API details\nTo know more about Bayonet's API and its domain and technical details, please see the \"Integration Specs V 1.0\" document provided by the Bayonet team.\n\n## Getting started\nTo use this SDK, please make sure:\n * You have Python 2.7 or superior installed on your system.\n * Your system supports TLS v1.2.\n * You have an API KEY (sandbox and/or live) provided by Bayonet's team.\n * Install the 'bayonet' package on your system\n \n ```sh\n pip install --upgrade bayonet\n ```\n or using easy_install:\n \n ```sh\n easy_install --upgrade bayonet\n ```\n If you're not using virtualenv, you may have to prefix those commands with `sudo`.\n \n You can also install from source:\n \n ```sh\n python setup.py install\n ```\n * Import 'bayonet' in your file\n\n ```py\n import bayonet\n ```\n * Create config options, with parameters (api_key, api_version).\n\n ```py\n client = bayonet.BayonetClient(api_key, api_version)\n ```\n \n## Usage\nOnce you have Bayonet's SDK configured, you can call the three APIs with the following syntax:\n * Consulting API\n \n ```py\n client.consulting({\n \"channel\": \"mpos\",\n \"email\": \"example@bayonet.io\",\n \"consumer_name\": \"Example name\",\n \"cardholder_name\": \"Example name\",\n \"payment_method\": \"card\",\n \"card_number\": 4111111111111111,\n \"transaction_amount\": 999,\n \"currency_code\": \"MXN\",\n \"transaction_time\": 1476012879,\n \"coupon\": False,\n \"payment_gateway\": \"stripe\",\n \"shipping_address\" : {\n \"address_line_1\" : \"example line 1\",\n \"address_line_2\" : \"example line 2\",\n \"city\" : \"Mexico City\",\n \"state\" : \"Mexico DF\",\n \"country\" : \"MEX\",\n \"zip_code\" : \"64000\"\n }\n })\n ```\n * Feedback API\n \n ```py\n client.feedback({\n \"transaction_status\": \"success\",\n \"transaction_id\": \"uhffytd65rds56yt\",\n ...\n })\n ```\n * Feedback-historical API\n \n ```py\n client.feedback_historical({\n \"channel\": \"mpos\",\n \"type\": \"transaction\",\n \"email\": \"example@bayonet.io\",\n \"consumer_name\": \"Example name\",\n \"payment_method\": \"card\",\n \"card_number\": 4111111111111111,\n \"transaction_amount\": 999,\n \"currency_code\": \"MXN\",\n \"transaction_time\": 1423823404,\n \"transaction_status\": \"bank_decline\",\n \"transaction_id\": \"uhffytd65rds56yt\",\n \"coupon\": False,\n \"payment_gateway\": \"stripe\",\n \"device_fingerprint\": \"AF567GHGJJJ87JH\",\n \"bank_auth_code\": \"5353888\",\n \"telephone\": \"0000000000\",\n \"expedited_shipping\": False,\n \"bank_decline_reason\": \"stolen_card\",\n \"shipping_address\": {\n \"address_line_1\": \"example line 1\",\n \"address_line_2\": \"example line 2\",\n \"city\": \"Mexico City\",\n \"state\": \"Mexico DF\",\n \"country\": \"MEX\",\n \"zip_code\": \"64000\"\n }\n })\n ```\n \n## Error handling\nBayonet's SDK raises exceptions both when setting up the client object and executing functions:\n```py\ntry:\n client = bayonet.BayonetClient(api_key, api_version)\nexcept bayonet.exceptions.InvalidClientSetupError as e:\n print (e.message)\n```\n\n```py\ntry:\n client.consulting(params) # Or, client.feedback(params) Or, client.feedback_historical(params)\nexcept bayonet.exceptions.BayonetError as e:\n print (e.reason_code)\n print (e.reason_message)\n```\n\nFor a full list of error codes and their messages, please refer to the Bayonet API documentation.\n\n## Testing\nYou can run the test suite with the following command:\n```sh\npython setup.py test\n```", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Bayonet-Client/bayonet-python", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "bayonet", "package_url": "https://pypi.org/project/bayonet/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/bayonet/", "project_urls": { "Homepage": "https://github.com/Bayonet-Client/bayonet-python" }, "release_url": "https://pypi.org/project/bayonet/1.1.0/", "requires_dist": null, "requires_python": "", "summary": "Bayonet python client library", "version": "1.1.0" }, "last_serial": 2927906, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "aa1d0894718d5450c1b3f43d79f2de57", "sha256": "8bc0ce9f6bf00459e49addd261eb50e56eda5611101618ad453d98ca5fbdab4c" }, "downloads": -1, "filename": "bayonet-0.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "aa1d0894718d5450c1b3f43d79f2de57", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7623, "upload_time": "2017-03-03T19:25:29", "url": "https://files.pythonhosted.org/packages/51/98/f97d9972accfd8069e9abb0de317d3476e114d00315a13c4b0828b170707/bayonet-0.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2089664ef42cbf4c7bbf9330666ecab6", "sha256": "b6853b1b95662b6c2385cde7e7ac6c33bf399a1b02b97514ec0aa76c26b77107" }, "downloads": -1, "filename": "bayonet-0.0.0.tar.gz", "has_sig": false, "md5_digest": "2089664ef42cbf4c7bbf9330666ecab6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5914, "upload_time": "2017-03-03T19:25:31", "url": "https://files.pythonhosted.org/packages/1f/9b/83aad0c390f58ab4390776c178d9b12ce42ca51cfe5730522643ed5ae578/bayonet-0.0.0.tar.gz" } ], "0.0.1": [ { "comment_text": "", "digests": { "md5": "ea29211e19619ac8f7ef630367e67645", "sha256": "7c70db391c29df48a85c9caf4cbdcc36ccaed25ba4e3627ddd19636627a08b97" }, "downloads": -1, "filename": "bayonet-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ea29211e19619ac8f7ef630367e67645", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7657, "upload_time": "2017-03-03T21:23:54", "url": "https://files.pythonhosted.org/packages/29/7e/2eefffc5c2433adcd769cf342144a27cb8d829223c5001b561cd5c010473/bayonet-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a36fca8389967055d5e6494004e59785", "sha256": "cd4dda0d514cb76edaa49ef584ddd2cac4b64d5e3d6243b74d929f09dd0eb291" }, "downloads": -1, "filename": "bayonet-0.0.1.tar.gz", "has_sig": false, "md5_digest": "a36fca8389967055d5e6494004e59785", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5900, "upload_time": "2017-03-03T21:23:56", "url": "https://files.pythonhosted.org/packages/82/36/275949d677c2b5afebe9aa81b20b140462d066fe1cf493a460625699f138/bayonet-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "97f06620e0c8a6c338fbb25a0dd35204", "sha256": "2e1911a48407ff8d675a41a0107b54aa4962a07ff628f6de7cd3299b349886c7" }, "downloads": -1, "filename": "bayonet-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "97f06620e0c8a6c338fbb25a0dd35204", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7739, "upload_time": "2017-03-03T21:38:39", "url": "https://files.pythonhosted.org/packages/38/fd/16290d6a28aac8b1a0e9510ddc7e179b64031a31a8bee3cdbd5853df6652/bayonet-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fb568029629a3a6e6a13bbb6dff2d7fe", "sha256": "a93b87c06bfd916f63fcd8ac32474e5358e6fc61c099d9690a80b274d3ed5b20" }, "downloads": -1, "filename": "bayonet-0.0.2.tar.gz", "has_sig": false, "md5_digest": "fb568029629a3a6e6a13bbb6dff2d7fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5915, "upload_time": "2017-03-03T21:38:41", "url": "https://files.pythonhosted.org/packages/f2/23/e0dd963aca41d9037214b2f0afd11458acf8e6027b2343b83f7cec1b78af/bayonet-0.0.2.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "9ca7eb79364ae599854ffdc3c7fff30a", "sha256": "53afdd072230fca7f6e650e7e684119281973b3d79b00ae154bbba879ce4f85f" }, "downloads": -1, "filename": "bayonet-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9ca7eb79364ae599854ffdc3c7fff30a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7740, "upload_time": "2017-03-03T22:38:28", "url": "https://files.pythonhosted.org/packages/dd/dd/3ffaa137ac6baa1bcc37a98609f078032d3e3a38ddd5035b6cff72532d5c/bayonet-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d0e02c775d7b2515251ede056d5f8b62", "sha256": "4fb78a0795c0a80e6bae4604e9104dc6f2ce0153c9e0c1e1da5677dcaa78d7ac" }, "downloads": -1, "filename": "bayonet-1.0.0.tar.gz", "has_sig": false, "md5_digest": "d0e02c775d7b2515251ede056d5f8b62", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5927, "upload_time": "2017-03-03T22:38:30", "url": "https://files.pythonhosted.org/packages/cf/61/60414f74ff08f6c033e4fdc320ccef4d43a123c3d90341faa4f2a5ecc777/bayonet-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "77f5b026ba02941a0e1d6b4d2dbb62b6", "sha256": "9e92a5ee4d6a82eada04418453de6523c7deb447600341c1654dea7f1fa38554" }, "downloads": -1, "filename": "bayonet-1.1.0.tar.gz", "has_sig": false, "md5_digest": "77f5b026ba02941a0e1d6b4d2dbb62b6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7906, "upload_time": "2017-06-05T23:44:50", "url": "https://files.pythonhosted.org/packages/5b/4a/eab228c4b96791af84c60b9fe6d14c9a5ba70df499db7aaa59a24b54fb5f/bayonet-1.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "77f5b026ba02941a0e1d6b4d2dbb62b6", "sha256": "9e92a5ee4d6a82eada04418453de6523c7deb447600341c1654dea7f1fa38554" }, "downloads": -1, "filename": "bayonet-1.1.0.tar.gz", "has_sig": false, "md5_digest": "77f5b026ba02941a0e1d6b4d2dbb62b6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7906, "upload_time": "2017-06-05T23:44:50", "url": "https://files.pythonhosted.org/packages/5b/4a/eab228c4b96791af84c60b9fe6d14c9a5ba70df499db7aaa59a24b54fb5f/bayonet-1.1.0.tar.gz" } ] }