Implementing delete_comment operation in steem-python

in utopian-io •  7 years ago  (edited)

I'm working heavily with steem-python. (1, 2, 3, 4, 5)

What I needed in my latest steem project is to make delete_comment operations via steem-python but unluckily it wasn't implemented.

steem-python covers most of the blockchain operations but it's missing some of them.

Missing operations in steem-python

After seeing delete_comment is not implemented, I quickly implemented it in my version of steem-python. After initial tests, it works fine.

Usage

s = Steem(
    nodes=["RELIABLE_RPC_NODE"], 
    keys=["POSTING_KEY"]
)
c = Commit()
c.delete_comment("emrebeyler/testpost", account="emrebeyler")

Note that, first parameter is the identifier convention steem-python uses already. it's $username/$perm-link.

Unit tests

Also, added related unit tests and they ran perfectly fine. Waiting for upstream review.

$ pytest steem/test_transactions.py -k test_delete_comment
platform darwin -- Python 3.6.3, pytest-3.2.5, py-1.5.2, pluggy-0.4.0
collected 21 items
steem/test_transactions.py .
====================20 tests deselected===========
==== 1 passed, 20 deselected in 3.14 seconds =====

Pull Request

https://github.com/steemit/steem-python/pull/105



Posted on Utopian.io - Rewarding Open Source Contributors

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  
Qurator
Your Quality Content Curator
This post has been upvoted and given the stamp of authenticity by @qurator. To join the quality content creators and receive daily upvotes click here for more info.

Qurator's exclusive support bot is now live. For more info click HERE or send some SBD and your link to @qustodian to get even more support.

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Hey @emrebeyler I am @utopian-io. I have just upvoted you at 19% Power!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Congratulations! This post has been upvoted from the communal account, @minnowsupport, by Emrebeyler from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, theprophet0, someguy123, neoxian, followbtcnews/crimsonclad, and netuoso. The goal is to help Steemit grow by supporting Minnows and creating a social network. Please find us in the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.

Cool post! I'm totally new to the whole open-source contribution community and I feel like I have so much to learn. It was nice to be able to see a small example of this type of contribution. Thank you for the work you do.

Cheers.
|D|E|

But how do you know your comment $perm-link.
Here:
implementing-deletecomment-operation-in-steem-python comments become:
re-emrebeyler-implementing-deletecomment-operation-in-steem-python-20171121t092012255z

Can you know it without digging in steemd.com ?

Yes, but I will only tell you if you agree to stop scamming and remove your upvotes from @aluma's comments.

What you are doing is wrong and you should be ashamed if yourself for being a part of upvoting comment spam.

@noaommerrr

@steemcleaners @steemflagrewards

Advise using an environmental variable for posting key vice having it in the script for security reasons.

If I could turn back !BEER



Hey @emrebeyler, here is a little bit of BEER from @isnochys for you. Enjoy it!