{ "info": { "author": "Guillaume VILLENA", "author_email": "contact@guillaumevillena.fr", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Build Tools" ], "description": "# A Simple python library for coinswitch\n\nThis is a simple library that uses coinswitch APIs. \nIt is just a collection of utils to manipulate, interpret and simplify calls to their APIs \n\n## How to use\n\nFirst install the package with pip\n\n```\npip install coinswitchclient\n```\n\nThen be sure to have your API key. If not it defaults to a sandbox api key\nThere are two major blocks inside this package:\n1. `TransactionManager` : it is a set of function that call the v2 instant API\n2. `CoinSwitchV1Client` : function that reflect the v1 coinswitch api\n3. `CoinSwitchV2FixedClient` : function that reflect the v2 fixed coinswitch api\n4. `CoinSwitchV2InstantClient` : function that reflect the v2 instant coinswitch api\n5. `ApiResponse` : an object that represent the reponse from coinswitch apis\n\nYou can find examples inside the `test` directory of this repo. \n\n#### Usage of ApiResponse\n\nYou never have to crete this object, but it will be return by each api calls.\nHere is the global structure of an ApiResponse\n\n```json\n{\n \"success\": true,\n \"code\": \"\",\n \"data\": \"\",\n \"error\": \"\"\n}\n```\n\nThe ApiResponse object provide simple method to access basic information\n\n```python\n\napi_response.is_success() # returns a boolean\napi_response.code() # return the code string in the \"code\" field\napi_response.message() # returns the content of error or msg depending on the remote response\napi_response.data() # return a dict object that represent the data\n\n```\n\nPlease see https://developer.coinswitch.co/ for any information of the returned fields in the data message\n\n#### Usage for TransactionManager\n\n```python\n\n# import required modules and classes\nfrom coinswitch_client.TransactionManager import TransactionManager\nfrom coinswitch_client.APIClient import Address\n\n# create an instance of the transaction manager\nmanager = TransactionManager(api_key=\"MY_API_KEY\")\n\n# Ask to convert 1 BTC to ETH with \nmanager.convert('btc', 'eth', 1.0, Address('ETH_ADDRESS').json(),\n Address('REFUND_ADDRESS').json())\n\n#this function returns the response from the coinswitch api as a ApiResponse\n```\n\n#### Usage for CoinSwitchV1Client\n\nIt follows the https://developer.coinswitch.co/ apis\nHere is a simple usage though\n\n```python\nfrom coinswitch_client.APIClient import CoinSwitchV1Client\n\nclient = CoinSwitchV1Client(api_key=\"MYKEY\")\napi_response = client.coins()\nif api_response.is_success():\n print(api_response.data())\n\n```\n\n#### Usage for CoinSwitchV2InstantClient\n\nIt follows the https://developer.coinswitch.co/ apis\nHere is a simple usage though\n\n```python\nfrom coinswitch_client.APIClient import CoinSwitchV2InstantClient\n\nclient = CoinSwitchV2InstantClient(api_key=\"MYKEY\")\napi_response = client.coins()\nif api_response.is_success():\n print(api_response.data())\n\napi_response = client.rates('btc', 'eth')\nif api_response.is_success():\n print(api_response.data())\n\n```\n#### Usage for CoinSwitchV2FixedClient\n\nIt follows the https://developer.coinswitch.co/ apis\nHere is a simple usage though\n\n```python\nfrom coinswitch_client.APIClient import CoinSwitchV2FixedClient\n\nclient = CoinSwitchV2FixedClient(api_key=\"MYKEY\")\napi_response = client.coins()\nif api_response.is_success():\n print(api_response.data())\n\napi_response = client.place_offer('btc', 'eth',quantity_from=1.0)\nif api_response.is_success():\n print(api_response.data())\n\n```\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Willena/PythonCoinSwitchClient", "keywords": "api lib library coinswicth client cryptos", "license": "", "maintainer": "", "maintainer_email": "", "name": "coinswitchclient", "package_url": "https://pypi.org/project/coinswitchclient/", "platform": "", "project_url": "https://pypi.org/project/coinswitchclient/", "project_urls": { "Bug Reports": "https://github.com/Willena/PythonCoinSwitchClient/issues", "Funding": "https://paypal.me/GuillaumeVillena", "Homepage": "https://github.com/Willena/PythonCoinSwitchClient", "Say Thanks!": "https://paypal.me/GuillaumeVillena", "Source": "https://github.com/Willena/PythonCoinSwitchClient" }, "release_url": "https://pypi.org/project/coinswitchclient/0.0.2/", "requires_dist": [ "requests" ], "requires_python": "", "summary": "A simple coinswitch (v1,v2) client api", "version": "0.0.2" }, "last_serial": 4637683, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "b05e2411b4b439047714864d3d87c546", "sha256": "6282e1d8bfb5aa25f3ec5c427678e3675cb8b18a2a48d7110918b1d034891a1e" }, "downloads": -1, "filename": "coinswitchclient-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b05e2411b4b439047714864d3d87c546", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6545, "upload_time": "2018-12-27T11:53:23", "url": "https://files.pythonhosted.org/packages/c9/92/142bd260f8b1e0265007a89df237514098c6ce4ddea9fefb77f39a3d4fbb/coinswitchclient-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f24b12f0f1b7b7351f6693042d52d69e", "sha256": "a87deab662e022cb6056cf40cf0c4b86a58acada6b8378a64ea52109bc2cfc9b" }, "downloads": -1, "filename": "coinswitchclient-0.0.2.tar.gz", "has_sig": false, "md5_digest": "f24b12f0f1b7b7351f6693042d52d69e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6021, "upload_time": "2018-12-27T11:53:26", "url": "https://files.pythonhosted.org/packages/4c/68/2b97c81cebc216f254984a0e14958a4a12a9514b467079382030e2a1bac6/coinswitchclient-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b05e2411b4b439047714864d3d87c546", "sha256": "6282e1d8bfb5aa25f3ec5c427678e3675cb8b18a2a48d7110918b1d034891a1e" }, "downloads": -1, "filename": "coinswitchclient-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b05e2411b4b439047714864d3d87c546", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6545, "upload_time": "2018-12-27T11:53:23", "url": "https://files.pythonhosted.org/packages/c9/92/142bd260f8b1e0265007a89df237514098c6ce4ddea9fefb77f39a3d4fbb/coinswitchclient-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f24b12f0f1b7b7351f6693042d52d69e", "sha256": "a87deab662e022cb6056cf40cf0c4b86a58acada6b8378a64ea52109bc2cfc9b" }, "downloads": -1, "filename": "coinswitchclient-0.0.2.tar.gz", "has_sig": false, "md5_digest": "f24b12f0f1b7b7351f6693042d52d69e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6021, "upload_time": "2018-12-27T11:53:26", "url": "https://files.pythonhosted.org/packages/4c/68/2b97c81cebc216f254984a0e14958a4a12a9514b467079382030e2a1bac6/coinswitchclient-0.0.2.tar.gz" } ] }