{ "info": { "author": "Alex Shinkevich aka alexshin", "author_email": "alex.shinkevich@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# CoinGate API SDK (API v2)\n\nThe repo contains Python 3 SDK for [CoinGate API v2](https://developer.coingate.com/docs/api-overview). \nThis is open source library is provided by [SociumNET](https://socium.net) team and it is used in some internal\nprojects.\n\n## Installation\n\nYou can install the library using PIP:\n\n`$ pip install coingate-api`\n\n## Quick start\n\nTry it:\n```python\nfrom coingate_api import CoingateAPI\n\n\napi = CoingateAPI(auth_token='your-auth-token', environment='sandbox')\nprint(api.ping())\n```\n\nOnly replace \"your-auth-token\" to your token from CoinGate of CoinGate sandbox\n\n## How to\n\nDefault behavior of API uses retries for requests:\n\n* 3 retries\n* with back-off factor 0.2\n* http statuses of response for retries: 500, 502, 504\n\nYou can change all these params by initialization of API client:\n```python\nfrom coingate_api import CoingateAPI\napi = CoingateAPI(auth_token='your-auth-token', environment='sandbox', \n retries=5, backoff_factor=0.5, status_forcelist=(500, 502, 504, 505))\n\n```\n\n#### Methods of API:\n\n* `api.test_connection()` - tests authentication. Should return simple \"OK\"\n* `api.ping()` - tests connection to server. Should return \"pong\"\n* `api.exchange_rate(from_='EUR', to='USD')` - check documentation of API\n* `api.exchange_rates()` - check documentation of API\n* `api.ip_addresses()` - check documentation of API\n* `api.orders(per_page=100, page=1, sort='created_at_desc', **kwargs)` - check documentation of API. \nValues of kwargs can contain also `created_at_from` and `created_at_to`\n* `api.checkout(order_id, pay_currency='BTC')` - check documentation of API\n* `api.create_order(price_amount, price_currency, receive_currency, **kwargs)` - check documentation of API.\nValues of kwargs can contain also `order_id`, `title`, `description`, `callback_url`, `cancel_url`, `success_url`, `token`\n\n\n#### Exceptions\n\n```python\nfrom coingate_api import CoingateAPI, api_error\n\napi = CoingateAPI(auth_token='your-auth-token', environment='sandbox')\n\ntry:\n print(api.test_connection())\nexcept api_error.APIError as e:\n print(e)\n\n```\n\nExceptions hierarchy:\n\n* `APIError`\n * `Unauthorized` \n * `BadCredentials` \n * `BadAuthToken` \n * `AccountBlocked` \n * `IPAddressIsNotAllowed`\n * `NotFound`\n * `PageNotFound` \n * `RecordNotFound` \n * `OrderNotFound`\n * `UnprocessableEntity`\n * `OrderIsNotValid`\n * `RateLimitError`\n * `InternalServerError` - notice that client will do retries for this error by default\n\n\n## Contribution\n\nYou can be free to contribute in the project. You should only create PR with a short description what it is for and\nwhat the problem can be solved by your PR.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/Sociumnet/coingate-api-python/archive/v0.1.5.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Sociumnet/coingate-api-python", "keywords": "coingate coingate-api payment merchant", "license": "Apache License version 2", "maintainer": "", "maintainer_email": "", "name": "coingate-api", "package_url": "https://pypi.org/project/coingate-api/", "platform": "", "project_url": "https://pypi.org/project/coingate-api/", "project_urls": { "Download": "https://github.com/Sociumnet/coingate-api-python/archive/v0.1.5.tar.gz", "Homepage": "https://github.com/Sociumnet/coingate-api-python" }, "release_url": "https://pypi.org/project/coingate-api/0.1.5/", "requires_dist": null, "requires_python": "", "summary": "SDK of CoinGate API for Python 3+", "version": "0.1.5" }, "last_serial": 4312293, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "1b8692972363a51b2df1cb78a273b1ae", "sha256": "75eec266ed70644c767480218a7c5716b9c5b9282e7ba383431e8c2a3ad340c3" }, "downloads": -1, "filename": "coingate_api-0.1.1.tar.gz", "has_sig": false, "md5_digest": "1b8692972363a51b2df1cb78a273b1ae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4223, "upload_time": "2018-09-26T07:48:10", "url": "https://files.pythonhosted.org/packages/d0/40/1551e4b0c351e81b3ae53381059f1c8c5427576d01c0fe75372bf4d34181/coingate_api-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "f2b49c10e2e157188dc55389b0b6e9e1", "sha256": "9faef236378bad7d34ede1e3ad5f957b045ca0f9e0f6b352b6e99b75d89abe89" }, "downloads": -1, "filename": "coingate_api-0.1.2.tar.gz", "has_sig": false, "md5_digest": "f2b49c10e2e157188dc55389b0b6e9e1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4242, "upload_time": "2018-09-26T07:52:01", "url": "https://files.pythonhosted.org/packages/5f/ff/676df4cd2770891f0b31b0a244836b5c5295740d40f06e35347529ceef99/coingate_api-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "c18b1d45f5b09d0bfcc3195f02572e39", "sha256": "b1c86c14a54597fad495fd6584946b2cac233a2d3e6501ff0a43b724ebe6122a" }, "downloads": -1, "filename": "coingate_api-0.1.3.tar.gz", "has_sig": false, "md5_digest": "c18b1d45f5b09d0bfcc3195f02572e39", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4821, "upload_time": "2018-09-26T09:39:35", "url": "https://files.pythonhosted.org/packages/d7/f2/98cc00efcd849fbc480bb43a73dcdfbde893955dda9ed9be99bc09e23c68/coingate_api-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "9fb7ff62151f78609497b83978308bd9", "sha256": "c9282f28e554b83b65092f600d0e196ffe3a61b8cb6114348767c7ec1e9950c6" }, "downloads": -1, "filename": "coingate_api-0.1.4.tar.gz", "has_sig": false, "md5_digest": "9fb7ff62151f78609497b83978308bd9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4825, "upload_time": "2018-09-26T12:31:46", "url": "https://files.pythonhosted.org/packages/e8/48/d9f35c0119f9776e495c6c615bf6ce04bbdabb05ab4c45047d0a099cc7c6/coingate_api-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "fc65af3284ee5ee296d338526e632170", "sha256": "731f97ba5f96c6accf45d6b47e38e9d7ecf93d45b646d6b3a5bdd4c8479a265d" }, "downloads": -1, "filename": "coingate_api-0.1.5.tar.gz", "has_sig": false, "md5_digest": "fc65af3284ee5ee296d338526e632170", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4827, "upload_time": "2018-09-26T12:42:51", "url": "https://files.pythonhosted.org/packages/27/b5/c69051d53130fd8cd242a17e0076418107578c4aed3f38af5b607f0af6cb/coingate_api-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fc65af3284ee5ee296d338526e632170", "sha256": "731f97ba5f96c6accf45d6b47e38e9d7ecf93d45b646d6b3a5bdd4c8479a265d" }, "downloads": -1, "filename": "coingate_api-0.1.5.tar.gz", "has_sig": false, "md5_digest": "fc65af3284ee5ee296d338526e632170", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4827, "upload_time": "2018-09-26T12:42:51", "url": "https://files.pythonhosted.org/packages/27/b5/c69051d53130fd8cd242a17e0076418107578c4aed3f38af5b607f0af6cb/coingate_api-0.1.5.tar.gz" } ] }