{ "info": { "author": "OPEN Platform", "author_email": "openplatform@zensoft.io", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# open-api-sdk\n\nOpen-api-sdk is a library for interaction with Open Platform.\n\n## Content\n\n\n* [Installing](#installing)\n* [Get started](#get-started)\n* [API](#api)\n* [Scaffold](#scaffold)\n* [Shareholder](#shareholder)\n\n\n## Installing\nUsing pip:\n```sh\n$ pip install open-api-sdk\n```\n\n## Get started\nOPEN Platform uses OpenKeys to allow access to the API. You can register a new OpenKey at your [Account.](https://api.openfuture.io/ \"Open API\")\n\nOPEN Platform expects the OpenKey to be included in all API requests to the server in a header.\n\nWe assume that you have the OpenKey by this moment. \n\nTo access the library import an OpenPlatform class and call an instance with the OpenKey as following: \n\n\n```python\nfrom openp_py import OpenPy\n\n# Access API via instance of OpenPlatform class\nop = OpenPy(open_key)\n```\n`open_key` - your open key. \n\nIn the following examples, it is assumed that `op` is a result of instantiating the `OpenPlatform` class with the `open_key`\n\n### API\n\n#### Page request attributes\n\nAttribute | Type | Description\n----------|------|-----------\noffset |Long | Page offset\nlimit |Int | Page limit\n\n#### Page response attributes\n\nAttribute | Type | Description\n----------|------|-----------\ntotalCount|Long | Total count of entities in a database\nlist |[] | List of entities with type T (T is generic)\n\n#### Scaffold\n\n##### Scaffold attributes\n\nAttribute | Type | Description\n----------------|-----------------------------------------------------|-----------\naddress |String | Scaffold address\nabi |String | Scaffold json interface\ndescription |String | Scaffold description\nfiatAmount |String | Scaffold fiat amount\ncurrency |String | Fiat amount currency\nconversionAmount|String | Fiat amount converted to ethereum \ndeveloperAddress|String | Scaffold developer address\nwebHook |String | Scaffold webhook for events\nproperties |[ScaffoldProperty](#scaffold-properties-attributes)[]| Scaffold properties\n\n##### Scaffold properties attributes\n\nAttribute | Type | Description\n------------|------------|-----------\nname |String | Property name\ntype |PropertyType| Property type\ndefaultValue|String | Property default value\n\n##### get_all()\n\n```python\nscaffolds = op.scaffold.get_all()\n```\n\n##### get_single(address)\n\n```python\naddress = '0x1c297f40beb075936d6dbe4b245b92738867ecb1' # an address of the scaffold (example)\nscaffold = op.scaffold.get_single(address)\n```\n\n##### Scaffold summary attributes\n\nAttribute | Type | Description\n----------------|-----------------------------------------------------|-----------\nscaffold |[Scaffold](#scaffold-attributes) | Scaffold\ntransactionIndex|BigInteger | Transaction index\ntokenBalance |BigInteger | Scaffold token balance\nenabled |Boolean | Scaffold enabled\ncurrency |String | Fiat amount currency\nshareHolders |[ShareHolder](#shareholder-attributes) | Scaffold shareholders\n\n##### get_summary(address)\n\n```python\nsummary = op.scaffold.get_summary(address)\n```\n\n##### get_transactions(address)\n\n```python\ntransactions = op.scaffold.get_summary(address)\n```\n\n##### Set web hook request `data`\n\nAttribute | Type | Description\n----------------|-----------------------------------------------------|-----------\naddress |String | Scaffold address\nwebHook |String | Scaffold webhook for events\n\n##### example:\n\n```python\ndata = {'webHook': 'https://example.com'}\n```\n##### set_webhook(address, data)\n\n```python\nscaffold = op.scaffold.set_webhook(address, data)\n```\n\n##### Deploy scaffold request `data`\n\nAttribute | Type | Description\n----------------|-----------------------------------------------------|-----------\nopenKey |String | User open key\ndescription |String | Scaffold description\nfiatAmount |String | Scaffold fiat amount\ncurrency |String | Fiat amount currency\nconversionAmount|String | Fiat amount converted to ethereum \ndeveloperAddress|String | Scaffold developer address\nwebHook |String | Scaffold webhook for events\nproperties |[ScaffoldProperty](#scaffold-properties-attributes)[]| Scaffold properties\n\n##### example:\n\n```python\ndata = {\n 'openKey': open_key,\n 'developerAddress': '0x0000000000000000000000000000000000000000',\n 'description': \"any_description\",\n 'fiatAmount': \"123\",\n 'currency': \"USD\",\n 'conversionAmount': '0.2139521163',\n 'properties': [\n {\n 'name': \"property_name\",\n 'type': \"STRING\",\n 'defaultValue': \"property_value\"\n }\n ]\n }\n```\n\n##### deploy_scaffold(data)\n\n```python\nscaffold = op.scaffold.deploy(data)\n```\n\n##### deactivate_scaffold(address)\n\n```python\nscaffold = op.scaffold.deactivate(address)\n```\n\n##### Quota attributes\n\nAttribute | Type | Description\n----------------|-----------------------------------------------------|-----------\ncurrentCount |Int | Current deactivated scaffolds count\nlimitCount |Int | Limit of deactivated scaffolds count\n\n\n##### get_quota()\n\n```python\nquota = op.scaffold.get_quota()\n```\n#### Shareholder\n\n##### Shareholder attributes\n\nAttribute | Type | Description\n----------------|-----------------------------------------------------|-----------\naddress |String | Shareholder address\npercent |Int | Shareholder percent\n\n\n##### example:\n```python\n# Shareholder attributes\ndata = {\n 'address': '0x0000000000000000000000000000000000000000',\n 'percent': 30\n }\n```\n\n##### add(address, data)\n\n```python\nsummary = op.shareholder.create(address, data)\n```\n\n##### Update shareholder request `data`\n\nAttribute | Type | Description\n----------------|-----------------------------------------------------|-----------\npercent |Int | Shareholder percent\n\n##### example:\n\n```python\ndata = {'percent': 50}\n```\n\n##### update(address , holder_address , data)\n\n```python\nshareholder_address = \"0xDc29484cc9C02Ee01015f33BcA8bBb5C7293Fb54\" # an example of shareholder's address\nsummary = op.shareholder.update(address, shareholder_address, data)\n```\n\n##### remove(address, holder_address)\n\n```python\nsummary = op.shareholder.remove(address, shareholder_address)\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/OpenFuturePlatform/open-api-python-sdk", "keywords": "", "license": "MIT licence", "maintainer": "", "maintainer_email": "", "name": "open-api-sdk", "package_url": "https://pypi.org/project/open-api-sdk/", "platform": "", "project_url": "https://pypi.org/project/open-api-sdk/", "project_urls": { "Homepage": "https://github.com/OpenFuturePlatform/open-api-python-sdk" }, "release_url": "https://pypi.org/project/open-api-sdk/2.0.0/", "requires_dist": [ "requests" ], "requires_python": "", "summary": "SDK library for interactions with Open Platform.", "version": "2.0.0" }, "last_serial": 4485328, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "aafd3c167c63c1c0734e9f9ee9d7a2fb", "sha256": "cc206e65981f06ddc2f00980e7013742bdd96a1ba4ae6c4c32f2233bf650b085" }, "downloads": -1, "filename": "open_api_sdk-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "aafd3c167c63c1c0734e9f9ee9d7a2fb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8473, "upload_time": "2018-07-31T15:11:24", "url": "https://files.pythonhosted.org/packages/3c/f0/122369c328854217d8eb890bcd3c80d2212d87131a7776e642d9b40df302/open_api_sdk-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5c85677e6e98cf76e1d68aa3d463884c", "sha256": "fd7e2426db31479dbfc73ab55e3bfd49e3348e6eadc24481a5014b3cfd904c7d" }, "downloads": -1, "filename": "open-api-sdk-1.0.0.tar.gz", "has_sig": false, "md5_digest": "5c85677e6e98cf76e1d68aa3d463884c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7168, "upload_time": "2018-07-31T15:11:25", "url": "https://files.pythonhosted.org/packages/88/5c/d624055bacd8c98eee3545e9ff30c85e297c5450600994d3ec8abf5c6953/open-api-sdk-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "f6708bd5ef8572972d5519455cd76ec5", "sha256": "6cbdfa47193a0487a6011a500d5da7720b525bd5ed0c2b2fa9cdbc002331627f" }, "downloads": -1, "filename": "open_api_sdk-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "f6708bd5ef8572972d5519455cd76ec5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8934, "upload_time": "2018-08-01T12:20:47", "url": "https://files.pythonhosted.org/packages/c2/63/b4c9c7e049a18e5e8c6e047b12402725a8c027e885028e7edf7c546b3700/open_api_sdk-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b8c26e77a1893cd7b8e8d1ad8091d907", "sha256": "e67df6d5a4400452b45e8f405cd810d6a8b372b68db7a4222739a7bc2f2a0264" }, "downloads": -1, "filename": "open-api-sdk-1.0.1.tar.gz", "has_sig": false, "md5_digest": "b8c26e77a1893cd7b8e8d1ad8091d907", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7408, "upload_time": "2018-08-01T12:20:48", "url": "https://files.pythonhosted.org/packages/e5/fa/d02b8524b302c4529e20abbfdfc462b1aa88da164ae1a38b0531392139a1/open-api-sdk-1.0.1.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "c3ed0dc5f10093917f96d7002e48e27f", "sha256": "cecea0a7eeb1d27ff9a70669ef6c15e59f522b1bb1c26d6dced59f64cb1a353e" }, "downloads": -1, "filename": "open_api_sdk-2.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "c3ed0dc5f10093917f96d7002e48e27f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9607, "upload_time": "2018-11-14T12:01:33", "url": "https://files.pythonhosted.org/packages/d7/ca/b28daa465c6e3971145f189e5f608e06f57483bbca24738ea64fa7e9efdf/open_api_sdk-2.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4aa7ec41f5eae3ede26800a04c009f9c", "sha256": "e786f73374be620788bd66b3315740133d92f2a14b7f36782cf7829422360c8a" }, "downloads": -1, "filename": "open-api-sdk-2.0.0.tar.gz", "has_sig": false, "md5_digest": "4aa7ec41f5eae3ede26800a04c009f9c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7348, "upload_time": "2018-11-14T12:01:35", "url": "https://files.pythonhosted.org/packages/89/3f/92899b26d6e990f566d4fc94d0c167d941901ff6328b787af392728051eb/open-api-sdk-2.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c3ed0dc5f10093917f96d7002e48e27f", "sha256": "cecea0a7eeb1d27ff9a70669ef6c15e59f522b1bb1c26d6dced59f64cb1a353e" }, "downloads": -1, "filename": "open_api_sdk-2.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "c3ed0dc5f10093917f96d7002e48e27f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9607, "upload_time": "2018-11-14T12:01:33", "url": "https://files.pythonhosted.org/packages/d7/ca/b28daa465c6e3971145f189e5f608e06f57483bbca24738ea64fa7e9efdf/open_api_sdk-2.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4aa7ec41f5eae3ede26800a04c009f9c", "sha256": "e786f73374be620788bd66b3315740133d92f2a14b7f36782cf7829422360c8a" }, "downloads": -1, "filename": "open-api-sdk-2.0.0.tar.gz", "has_sig": false, "md5_digest": "4aa7ec41f5eae3ede26800a04c009f9c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7348, "upload_time": "2018-11-14T12:01:35", "url": "https://files.pythonhosted.org/packages/89/3f/92899b26d6e990f566d4fc94d0c167d941901ff6328b787af392728051eb/open-api-sdk-2.0.0.tar.gz" } ] }