Skip to main content

SteemConnect with pyhton

Project description

# steemconnect
>The first python client of the SteemConnect

## Getting Started
- **For general information about SteemConnect V2 and setting up your app please see
this post from @noisy**
>[How to configure SteemConnect v2 and use it with your application](

- **check this repository if you are looking for a python or django example that uses this library.**
>[Django application - django_steemconnect](
[Coogger-python | upvote bot](

### Installation
`pip install steem-connect`

### update
`pip install steem-connect - U`

## How to use it ?

#### First let's include the library in our project

from steemconnect.client import Client
from steemconnect.steemconnect import SteemConnect
from steemconnect.operations import Vote
from steemconnect.operations import CustomJson
from steemconnect.operations import Unfollow
from steemconnect.operations import Follow
from steemconnect.operations import Mute
from steemconnect.operations import Reblog
from steemconnect.operations import DeleteComment
from steemconnect.operations import ClaimRewardBalance
from steemconnect.operations import Comment
from steemconnect.operations import CommentOptions

c = Client(client_id:str, redirect_url:str, code=False, scope=None)
# scope is None : default scopes = "login,offline,vote,comment,delete_comment,comment_options,custom_json,claim_reward_balance"
# if code is True,you can get refresh_token using ,get_refresh_token()
c.get_refresh_token(code:str, app_secret:str)
- [scopes](
- [wiki/OAuth-2#code-authorization-flow](

### Vote

The Vote() method will cast a vote on the specified post or comment from the current user:

vote = Vote(voter:str, author:str, permlink:str, weight:int)
response = SteemConnect(token="your_access_token", data=vote.operation).run
if response.status_code == 200:
print("Your post upvoted")
- voter: The Steem username of the current user.
- author: The Steem username of the author of the post or comment.
- 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: would be "announcing-smart-media-tokens-smts".
- weight: The weight of the vote. 100 equale a 100% vote.

### CustomJson

custom_json = CustomJson(required_posting_auths:str, custom_json_id:str, structure:json, required_auths:list)
response = SteemConnect(token="your_access_token", data=custom_json.operation).run
if response.status_code == 200:
print("Your operation is success")

### Follow

follow = Follow(follower:str,following:str)
response = SteemConnect(token="your_access_token", data=follow.operation).run
if response.status_code == 200:
print("Your operation is success")

### Unfollow

unfollow = Unfollow(follower:str,following:str)
response = SteemConnect(token="your_access_token", data=unfollow.operation).run
if response.status_code == 200:
print("Your operation is success")

### Mute

mute = Mute(follower:str,following:str)
response = SteemConnect(token="your_access_token", data=mute.operation).run
if response.status_code == 200:
print("Your operation is success")

### Reblog

reblog = Reblog(account:str, author:str, permlink:str)
response = SteemConnect(token="your_access_token", data=reblog.operation).run
if response.status_code == 200:
print("Your operation is success")

### Comment

comment = Comment(parent_author:str, parent_permlink:str,author:str,permlink:str,title:str,body:str,json_metadata:dict)
response = SteemConnect(token="your_access_token", data=comment.operation).run
if response.status_code == 200:
print("Your operation is success")

### Comment with Comment_options

comment_class = Comment(parent_permlink:str, author:str, permlink:str, title:str, body:str, json_metadata:dict)
comment_options = CommentOptions(
comment_class = comment_class
max_accepted_payout:int, # default 100000.000
percent_steem_dollars:int, # default 10000
allow_votes:bool, # default True
allow_curation_rewards:bool #default True

"""beneficiaries ex :

response = SteemConnect(token="your_access_token", data=comment_options.operation).run
if response.status_code == 200:
print("Your operation is success")

### DeleteComment

delete_comment = DeleteComment(author:str, permlink:str)
response = SteemConnect(token="your_access_token", data=delete_comment.operation).run
if response.status_code == 200:
print("Your operation is success")

### ClaimRewardBalance

claim_reward_balance = ClaimRewardBalance(account:str, reward_steem:str, reward_sbd:str, reward_vests:str)
response = SteemConnect(token="your_access_token", data=claim_reward_balance.operation).run
if response.status_code == 200:
print("Your operation is success")

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
steem-connect-0.7.6.tar.gz (5.0 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page