I've finished all of the initial features of pywit and released version 1.0.3 on Github! Pywit is a steem witness and wallet command line tool built in Python, using holger80's beem. I took inspiration from Netherdrake's conductor, but I added some extra features as well. I've released it under the GNU General Public License v3.0, and would love any input or contributions y'all may have!
Why 1.0.3
Pywit is at version 1.0.3 because, while I was writing this post after getting to 1.0.0, then 1.0.1 after adding the license, I decided to add some testing stuff with CircleCI because I've been meaning to figure out how to use CI tools. Not a lot of tests yet, but I've got CircleCI running now!
Features
It has both an interactive command mode, and shell commands for quicker access and automation. It keeps a configuration file for your witness account, as well as having a built in wallet to store your keys. It also includes a high-verbosity debug mode and a testing mode that won't broadcast transactions. To find out what you can do just from the shell, run pywit --help
.
Price Feed
Pywit can run a price feed for you, using several different markets through a Steem/BTC/USDT/USD proxy, as well as a separate Steem/BTC/USD proxy that are then averaged together (inspiration for these proxies, although not as well implemented, came from someguy123's steemfeed-js). You can adjust the wait time between updates, the minimum percent difference from your last price to publish an update, an option to immediately publish when you start the price feed, and pywit will also publish a feed if you haven't posted one in 24 hours. Outliers are also taken into account, and a difference too large (>25%, but might change), will not be published.
Missed Blocks Monitoring
Pywit can also monitor your witness's missed blocks for you, with several different options available. The number of missed blocks (within the current session) and the time between updates are two of the options you can pass in. You can pass in the public key for a backup server, which it will switch your witness signing key to when your primary server has missed too many blocks. If you don't pass in a backup key, it will disable your witness when too many blocks have been missed. There is currently not a notification sent when your witness server misses too many blocks (I don't know how to do it in Python yet), but a large warning appears in Terminal. If you keep an eye on your witness like you should, it shouldn't be an issue anyways as you'll notice quickly.
Witness Status
You can also quickly enable and disable your witness from the shell, and you can get your witness status printed out. The final shell command is witness update, which takes you through questions to update your witness information. This includes all props, and will confirm that you want to update.
Warning
Check out the emergency level warning with pywit test-warning, it's pretty cool. Got the ASCII art here and figured out how to center it in a console with some help from StackOverflow. This will only appear when something time sensitive (ish) occurs, e.g. your witness monitor switching keys to backup.
Interactive
The interactive console is great as well, with a lot more commands to use. First, just run pywit
by itself, and it will set up your configuration, with both a witness account and a wallet (in the future, the witness account will not be required as I'm planning on making this a more versatile utility). The wallet is encrypted with a BIP38 passphrase through beem, and the witness account is stored locally, holding just your account name, witness URL, props, and default public signing key (if you've set it, it does not pull it from the network). Help is your friend in there, I tried to document all the commands as well as I could, there are also some from Cmd2 (the plugin that runs the interactive console) that are still in there to be helpful, like alias if you'd rather call a command something else.
Testing
As I wrote earlier, while I was writing this post I decided to put together CircleCI and a basic test setup into the Github as well. I'm going to be fleshing out the testing to improve my skills in that area, as well as learning how to use CI so I can start working on the main steem repository with testing like some of the other witnesses. Right now I think I'm going to be using pytest with CircleCI and tox, mostly because half of this is me learning how to write Python test code by checking out what holger80 did.
Acknowledgments
This wouldn't have been possible at all if not for beem by the awesome @holger80, both because that's the base of this tool but also because I went looking at the repo for hints whenever I got stuck with some python stuff (especially the testing). @furion wrote the original conductor, and I wouldn't have gotten started on this if I hadn't originally been using it, tried to submit a PR for hard fork 20, and seen it not go through. After that, I looked through the whole base and decided I could figure it out myself! Next, @someguy123's steemfeed-js gave me a lot of help figuring out how I should be calculating the price of Steem in the feeds, even though I can barely read Javascript. Finally, I couldn't have done anything without such a great Steem community. Thanks for all your previous work!
If I have seen further, it is by standing on the shoulders of Giants.
Vote For Me as Your Witness
Cheers, thanks for reading! If you like my tools and content and would like to see more, Vote for me as witness or proxy your votes and I'll vote the best witnesses for you!
My Projects
Pywit- A witness tool-kit built in Python on top of Holger80's Beempy.
Posted using Partiko Android
@petertag you seem to impress me time and time again keep up the great work my friend ! 👍🏼
Posted using Partiko iOS
.
I've heard of it but haven't really looked into it, thanks for the tip and your work on beem man!
Posted using Partiko Android
I didn't see the message from @crokkon ... As he said, you MUST post with an utopian-io tag. You deserve lot more attention and love. Period.
@petertag - IMHO you must submit this via Utopian as this project can be very very useful and you deserve lot more attention and appreciation.
I have started looking into it and also mirrored the project here for CI and deployment testing : https://gitlab.com/SteemCommunity/pywit/pipelines/34674248
Two generic PRs : https://github.com/gitschwifty/pywit/pulls
Messaged about a small security fix - nothing major though.
I did not understand much. BUT I understand that you are king at codes. I am not..
Looks promising, im going to test it.
Yes, its a promising project
Congratulations! Your post has been selected as a daily Steemit truffle! It is listed on rank 4 of all contributions awarded today. You can find the TOP DAILY TRUFFLE PICKS HERE.
I upvoted your contribution because to my mind your post is at least 30 SBD worth and should receive 352 votes. It's now up to the lovely Steemit community to make this come true.
I am
TrufflePig
, an Artificial Intelligence Bot that helps minnows and content curators using Machine Learning. If you are curious how I select content, you can find an explanation here!Have a nice day and sincerely yours,
TrufflePig
Thanks! good bot :)
I upvoted your post.
Keep steeming for a better tomorrow.
@Acknowledgement - God Bless
Posted using https://Steeming.com condenser site.
You got a 57.24% upvote from @shares courtesy of @petertag! This is a service sponsored by @Yehey. Please consider voting for @Yehey as one of your Witness. Use this short URL link https://on.king.net/witness simply click and vote, this will redirect to steem connect for secure connection.
If you need an extra upvote, join us at https://SteemChat.com discord server. Or simply hang out and meet new friends with common interest.
WANTED SP DELEGATION. Let your Steem Powers (SP) works for you. Delegate SP to receive daily payouts. Choose the amount of your delegation. Start small or go big, it's all up to you.
10 SP
50 SP
100 SP
200 SP
500 SP
1000 SP
2000 SP
3000 SP
5000 SP
10000 SP
20000 SP
50000 SP
100000 SP
500000 SP
1000000 SP
Have a fun day.
@Shares - Keep Steeming for a better future.
Congratulations @petertag! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :
Click here to view your Board of Honor
If you no longer want to receive notifications, reply to this comment with the word
STOP
Do not miss the last post from @steemitboard:
Hi, @petertag!
You just got a 1.2% upvote from SteemPlus!
To get higher upvotes, earn more SteemPlus Points (SPP). On your Steemit wallet, check your SPP balance and click on "How to earn SPP?" to find out all the ways to earn.
If you're not using SteemPlus yet, please check our last posts in here to see the many ways in which SteemPlus can improve your Steem experience on Steemit and Busy.
?
Posted using Partiko Android