Piston - The Swiss army knife for STEEM

in piston •  4 years ago  (edited)

As some of you might have seen already, I have started to work on the command
line tool piston that helps people to interface with STEEM and is easy to
integrate into your scripts.

After two weeks of coding, piston turned out as a very powerful tool for me
already and I would like to share it with you and continue work on it even more
to grow it into the Swiss army knife for Steem.

Quick-Start

Using piston is quite easy, after installation with

pip3 install --user steem-piston

you will get a new executable piston installed in ~/.local/bin. You need to
add the posting private key in wallet import format (wif) with

piston addkey

You will be asked to provide a passphrase for encryption of your new piston
wallet. You can pick an empty password to prevent the prompt in future but make
sure to understand the risk of storing unencrypted private keys on your computer.

After providing your posting key. It will be stored in your local wallet and
you can list your accounts with

piston listaccounts

The account name listed can be used to post, reply, or edit (own) posts using
piston. Try posting a new post with

piston post

Edit a post with

piston edit @author/permlink

Or repy to an existing post (e.g. this post) with

piston reply @xeroc/piston

You can take a look at recent posts by simply using

piston list

Documentation

The full documentation can (of course) be
found on STEEM and is kept up to date with
github's version.

License

Well, it's open source and MIT licensed.

Get involved

There is much that can be added to piston that I can come up with on my own.
But I am sure, the STEEM crowd can come up with may more ways of improving
piston than me alone. You can participate in improving piston by joining

  • this discussion and report bugs
  • this discussion and proposing new features
  • the team as a python developer
  • the team as an application developer on top of piston

Since I am not getting payed for building this tool directly. I would appreciate
if you upvote this post, as well as posts of major contributors in this
read.

After installation of piston, you can join the discussion with:

piston reply @xeroc/piston

!"$%

Who can guess what piston stands for? Well, it's not a Swiss army knife :)

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:  
Loading...
  ·  3 years ago (edited)

INVALID

ditto bruh

For me, and maybe others on mac osx, I found that piston was installed to:

~/Library/Python/3.5/bin/piston

Python Implemetation of STeem over Network ?

I would guess piston stands for a part of a steem-machine

Great tool @xeroc - "This Reply is Powered by Piston"

Hi very nice work, i try to run Piston on a Raspberry Pi it installed without problem, but it generates this when i try to add my key, any suggestions what's happening and how it can be solved ?

[email protected]:~ $ piston addkey
Traceback (most recent call last):
File "/usr/local/bin/piston", line 5, in < module >
from pkg_resources import load_entry_point
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2876, in <
module >
working_set = WorkingSet._build_master()
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 449, in _build_master
ws.require(requires)
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 745, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 639, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: appdirs>=1.4.0

if i check the python version im running, with python -V

Python 2.79

if i do a install of python3 it says Python is already the latest version

  ·  4 years ago (edited)

Version 0.1.5 has been released. It allows to configure your local
environment with piston set <key> <value>. You can get all
configuration variables with piston set --help.

As of Tue May 3 14:57:52 CEST 2016, the develop branch has some more
keys for customization available.

  ·  3 years ago (edited)

Please unlock your existing wallet!

What he want? My plaintext password?

@xeroc
I enter pass and he again and again write "enter pass"

This happens if you already have a piston wallet and the password you provide is incorrect ..

So PIStON is somehow getting that user's public key and testing it against a provided password?.... Just saying.

~/.local/bin/piston --help

Hi xeroc. Tks for the tip.

I ran this command and the message i get is
bash: /home/julio/.local/bin/piston: No such file or directory

According to
https://steemit.com/piston/@xeroc/piston ,
piston should have been installed in this location when I ran
pip3 install --user steem-piston

Any suggestions?

PS Sorry for being such a noob :-)

I am having troubles install piston. I installed OpenSSL which helped with my install error, but now it installs and I am still unable to use the piston command. Is there something I am missing? I am using a bash terminal.

Do you get an error?
I would recommend to join the slack and ask for assistance in the #piston channel.

But the slack isn't currently working I believe. That link gave me a 404 error, but when it is up I'd love to join and discuss. I do not receive an error anymore when installing, it just doesn't show up on when I type, "piston --help" on terminal. Thank you.

  ·  2 years ago (edited)

Try this command sudo
$ apt-get install libssl-dev

Your guide install piston as a user. Does it work for all users if it is installed as root?

Your guide install piston as a user. Does it work for all users if it is installed as root?

Yes, of course but you need to prefix with sudo.
The advantage of the post above is that you don't need to be root to use piston.

Until now.. okay i make it to get piston running but it tells me to provide an account.
What can i do ?

Very nice @xeroc. Will tinker a bit around with it when i have some spare time in the next days/weeks. -Posted from Piston-

what the relationship between piston and steem-python?


author: febinkk
replyto: '@xeroc/piston'

just testing!

  ·  2 years ago (edited)

good tool!

hey @xeroc

which folder does piston stores the keys etc ?

@xeroc
I am having some major difficulties and have been researching and trying different things all day. However, unfortunately, I cannot find anything that works.

I'm trying use an upvote bot where the first lines are:
from piston.steem import Steem
from piston.steem import BroadcastingError

However, I get an error that says:
line 1, in < module >
from piston.steem import Steem
ModuleNotFoundError: No module named 'piston'

I have the Python 3.6 installed as well as piston lib and cli. They are all updated and I have steem installed as well. I did everything through pip3 installation and homebrew.

Do you have any solutions?

Thank you,
Spencer Coffman

You need to switch to steem-python, so instead of using from piston.steem import Steem, you would call from steem import Steem. Steem-python is the replacement for piston. You can find more information here:
https://steem.readthedocs.io/en/latest/

Okay, thank you. I'm trying to use an upvote bot code. However, all of the codes I have found on Steemit are outdated and no longer work. I'm trying to modify one, but I keep running into trouble. Is there a working one that you use? Or, would you be able to look at what I have done and help me get it working?

HI there! I keep getting an error
"Failed building wheel for scrypt"
any idea how to resolve this?

Any success getting past this? I've tried getting past this hurdle from several angles without success ... on multiple machines!

I installed steem module, piston module, really everything, and suddenly it worked. If you find me on discord, @samve, I can send you all commands I used

Loading...
  ·  2 years ago (edited)

https://github.com/xeroc/piston is obsolete and refers to https://github.com/xeroc/piston-cli
README.md of the last mentioned contains disclaimer:

UNMAINTAINED
This library is unmaintained, do not build productive buisness with it! Please not the disclaimer in the license file!

Could anyone recommend an alternative?

OK, I figured it by myself: https://github.com/steemit/steem-python

Hello fellas,

I am experiencing an annoying problem with Ubuntu while trying to install the Piston libraries.

After installing latest Phyton3 version I tried installing Piston via pip package manager and keep getting an error.

The error says Python requires version > 3 as if mine was lower.

Any idea how to fix this minor problem?

Thanks in advance.

-lightproject

yea, use pip3 instead of pip. You have both versions installed