{ "info": { "author": "Hakan \u00c7elik", "author_email": "hakancelik96@outlook.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "# steemconnect\n>The first python client of the SteemConnect\n\n## Getting Started\n- **For general information about SteemConnect V2 and setting up your app please see\nthis post from @noisy**\n>[How to configure SteemConnect v2 and use it with your application](https://busy.org/steemconnect/@noisy/how-to-configure-steemconnect-v2-and-use-it-with-your-application-how-it-works-and-how-it-is-different-from-v1)\n>[ann-introducing-python-social-auth-steemconnect-library-integrate-steemconnect-v2-in-your-python-app-in-5-minutes-design-pack-as](https://steemit.com/steemconnect/@noisy/ann-introducing-python-social-auth-steemconnect-library-integrate-steemconnect-v2-in-your-python-app-in-5-minutes-design-pack-as)\n\n- **check this repository if you are looking for a python or django example that uses this library.**\n>[Django application - django_steemconnect](https://github.com/hakancelik96/django_steemconnect)\n[Coogger-python | upvote bot](https://github.com/coogger/coogger-python)\n\n### Installation\n`pip install steem-connect`\n\n### update\n`pip install steem-connect - U`\n\n## How to use it ?\n\n#### First let's include the library in our project\n\n```python\nfrom steemconnect.client import Client\nfrom steemconnect.steemconnect import SteemConnect\nfrom steemconnect.operations import Vote\nfrom steemconnect.operations import CustomJson\nfrom steemconnect.operations import Unfollow\nfrom steemconnect.operations import Follow\nfrom steemconnect.operations import Mute\nfrom steemconnect.operations import Reblog\nfrom steemconnect.operations import DeleteComment\nfrom steemconnect.operations import ClaimRewardBalance\nfrom steemconnect.operations import Comment\nfrom steemconnect.operations import CommentOptions\n\nc = Client(client_id:str, redirect_url:str, code=False, scope=None)\n# scope is None : default scopes = \"login,offline,vote,comment,delete_comment,comment_options,custom_json,claim_reward_balance\"\n# if code is True,you can get refresh_token using ,get_refresh_token()\nc.get_authorize_url()\nc.get_refresh_token(code:str, app_secret:str)\nc.me(access_token:str)\n```\n- [scopes](https://github.com/steemit/steemconnect/wiki/OAuth-2#scopes)\n- [wiki/OAuth-2#code-authorization-flow](https://github.com/steemit/steemconnect/wiki/OAuth-2#code-authorization-flow)\n\n\n### Vote\n\nThe Vote() method will cast a vote on the specified post or comment from the current user:\n\n```python\nvote = Vote(voter:str, author:str, permlink:str, weight:int)\nresponse = SteemConnect(token=\"your_access_token\", data=vote.operation).run\nif response.status_code == 200:\n print(\"Your post upvoted\")\n```\nParameters:\n- voter: The Steem username of the current user.\n- author: The Steem username of the author of the post or comment.\n- permlink: The link to the post or comment on which to vote. This is the portion of the URL after the last \"/\". For example the \"permlink\" for this post: https://steemit.com/steem/@ned/announcing-smart-media-tokens-smts would be \"announcing-smart-media-tokens-smts\".\n- weight: The weight of the vote. 100 equale a 100% vote.\n\n### CustomJson\n\n```python\ncustom_json = CustomJson(required_posting_auths:str, custom_json_id:str, structure:json, required_auths:list)\nresponse = SteemConnect(token=\"your_access_token\", data=custom_json.operation).run\nif response.status_code == 200:\n print(\"Your operation is success\")\n```\n\n### Follow\n\n```python\nfollow = Follow(follower:str,following:str)\nresponse = SteemConnect(token=\"your_access_token\", data=follow.operation).run\nif response.status_code == 200:\n print(\"Your operation is success\")\n```\n\n### Unfollow\n\n```python\nunfollow = Unfollow(follower:str,following:str)\nresponse = SteemConnect(token=\"your_access_token\", data=unfollow.operation).run\nif response.status_code == 200:\n print(\"Your operation is success\")\n```\n\n### Mute\n\n```python\nmute = Mute(follower:str,following:str)\nresponse = SteemConnect(token=\"your_access_token\", data=mute.operation).run\nif response.status_code == 200:\n print(\"Your operation is success\")\n```\n\n### Reblog\n\n```python\nreblog = Reblog(account:str, author:str, permlink:str)\nresponse = SteemConnect(token=\"your_access_token\", data=reblog.operation).run\nif response.status_code == 200:\n print(\"Your operation is success\")\n```\n\n\n### Comment\n\n```python\ncomment = Comment(parent_author:str, parent_permlink:str,author:str,permlink:str,title:str,body:str,json_metadata:dict)\nresponse = SteemConnect(token=\"your_access_token\", data=comment.operation).run\nif response.status_code == 200:\n print(\"Your operation is success\")\n```\n\n### Comment with Comment_options\n\n```python\ncomment_class = Comment(parent_permlink:str, author:str, permlink:str, title:str, body:str, json_metadata:dict)\ncomment_options = CommentOptions(\n comment_class = comment_class\n beneficiaries,\n max_accepted_payout:int, # default 100000.000\n percent_steem_dollars:int, # default 10000\n allow_votes:bool, # default True\n allow_curation_rewards:bool #default True\n)\n\n\"\"\"beneficiaries ex :\n[\n {\"account\":\"coogger.wallet\",\"weight\":500},\n {\"account\":\"coogger.pay\",\"weight\":500},\n {\"account\":\"hakancelik\",\"weight\":500}\n]\"\"\"\n\nresponse = SteemConnect(token=\"your_access_token\", data=comment_options.operation).run\nif response.status_code == 200:\n print(\"Your operation is success\")\n```\n\n### DeleteComment\n\n```python\ndelete_comment = DeleteComment(author:str, permlink:str)\nresponse = SteemConnect(token=\"your_access_token\", data=delete_comment.operation).run\nif response.status_code == 200:\n print(\"Your operation is success\")\n```\n\n### ClaimRewardBalance\n\n```python\nclaim_reward_balance = ClaimRewardBalance(account:str, reward_steem:str, reward_sbd:str, reward_vests:str)\nresponse = SteemConnect(token=\"your_access_token\", data=claim_reward_balance.operation).run\nif response.status_code == 200:\n print(\"Your operation is success\")\n```\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/hakancelik96/steemconnect", "keywords": "steem", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "steem-connect", "package_url": "https://pypi.org/project/steem-connect/", "platform": "", "project_url": "https://pypi.org/project/steem-connect/", "project_urls": { "Homepage": "https://github.com/hakancelik96/steemconnect" }, "release_url": "https://pypi.org/project/steem-connect/0.7.6/", "requires_dist": null, "requires_python": "", "summary": "SteemConnect with pyhton", "version": "0.7.6" }, "last_serial": 4306879, "releases": { "0.7.2": [ { "comment_text": "", "digests": { "md5": "596ca7517a960b52ced7a626a0de28d6", "sha256": "405f825a88f4e5fb6b53a8f0172fcdad7ccace4b01c44bf8f83ce7cbf99e8f46" }, "downloads": -1, "filename": "steem-connect-0.7.2.tar.gz", "has_sig": false, "md5_digest": "596ca7517a960b52ced7a626a0de28d6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4229, "upload_time": "2018-09-01T18:06:37", "url": "https://files.pythonhosted.org/packages/f1/ce/7ae02a72023065e1330aeb914e3f1133377cebeae87c5c3a05e1c09ce953/steem-connect-0.7.2.tar.gz" } ], "0.7.3": [ { "comment_text": "", "digests": { "md5": "ff1c6b0e1acad58055ecebeecc5e8c32", "sha256": "7b772afd532de7140b9fb79464e55e82a428c4cee4233fd47f8dd7f16987fb4e" }, "downloads": -1, "filename": "steem-connect-0.7.3.tar.gz", "has_sig": false, "md5_digest": "ff1c6b0e1acad58055ecebeecc5e8c32", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4863, "upload_time": "2018-09-01T23:21:46", "url": "https://files.pythonhosted.org/packages/a3/20/9b375fc4bf552015abde7b723f95d6704a60d99076d50ec3481dff4e34a1/steem-connect-0.7.3.tar.gz" } ], "0.7.4": [ { "comment_text": "", "digests": { "md5": "75b54066b9eaa24793d794627028620b", "sha256": "8edeada8316f4d1b8e402a2efa3085b54303661f1c07c48e705e398dd575b164" }, "downloads": -1, "filename": "steem-connect-0.7.4.tar.gz", "has_sig": false, "md5_digest": "75b54066b9eaa24793d794627028620b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4983, "upload_time": "2018-09-06T21:22:17", "url": "https://files.pythonhosted.org/packages/8e/3f/2f50750868f299815689c77b9de16e424b95575268a2868d89086059d572/steem-connect-0.7.4.tar.gz" } ], "0.7.5": [ { "comment_text": "", "digests": { "md5": "bebc2f8047e7eda9739b09eb6b3c9976", "sha256": "6471863ad41a72205e882bd8675ed175e05d0103c5c28815264bb8243d6e855c" }, "downloads": -1, "filename": "steem-connect-0.7.5.tar.gz", "has_sig": false, "md5_digest": "bebc2f8047e7eda9739b09eb6b3c9976", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4974, "upload_time": "2018-09-06T21:27:21", "url": "https://files.pythonhosted.org/packages/2e/b7/6e8501c9f026f22dc8c7626b89342e75c8bf9761038c828bd5380422759a/steem-connect-0.7.5.tar.gz" } ], "0.7.6": [ { "comment_text": "", "digests": { "md5": "9fb3f914aeddbff2f6fdaad99bb29b79", "sha256": "36e7c341d5de0dbae68613e4b02e3240b8a4e201eb2000846046acb4ba2d84b3" }, "downloads": -1, "filename": "steem-connect-0.7.6.tar.gz", "has_sig": false, "md5_digest": "9fb3f914aeddbff2f6fdaad99bb29b79", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4995, "upload_time": "2018-09-25T02:23:59", "url": "https://files.pythonhosted.org/packages/de/9b/0b20b38de85bd3aba9c353682b4fb4599660178b687d4140690fbf378650/steem-connect-0.7.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9fb3f914aeddbff2f6fdaad99bb29b79", "sha256": "36e7c341d5de0dbae68613e4b02e3240b8a4e201eb2000846046acb4ba2d84b3" }, "downloads": -1, "filename": "steem-connect-0.7.6.tar.gz", "has_sig": false, "md5_digest": "9fb3f914aeddbff2f6fdaad99bb29b79", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4995, "upload_time": "2018-09-25T02:23:59", "url": "https://files.pythonhosted.org/packages/de/9b/0b20b38de85bd3aba9c353682b4fb4599660178b687d4140690fbf378650/steem-connect-0.7.6.tar.gz" } ] }