Finally! I got steem-python installed and running on my Win 11 PC
TL;DR:
- This is a post to express my gratitude to @remlaps and @moecki - I've set both of them as 25% beneficiaries on this post to support their work and efforts to help me.
- I'm sharing few screengrabs from my process of installing steem-python library.
- I'm sharing here the results of a few tests as well.
So, finally, indeed, after trying for several times and spent many hours, I've managed to install and run, both no errors, the steem-python library on my Windows 11 PC.
Not just that, but it is running on the latest versions of Python (3.13.3 at the moment) and OpenSSL (3.5.0 at the moment)
The installation procedure is thoroughly described here ( https://steemit.moecki.online/hive-151113/@remlaps/getting-steem-python-to-run ) so I am not going to repeat it, just share a few screengrabs along.
As you can see, all ran smoothly, no errors at all.
I think the whole process took like fifteen minutes, tops.
... and the miracle happened :)
I went to my VSCode, activated the virtual environment and typed in the Terminal:
>>>import steem
and was really thrilled to see just:
>>>
instead of the error that tells me the library cannot be found! :)
Now, some tests!
In my previous tests with STEEM, I was making direct json calls to the APIs and then discovered some discrepancies of the number of total accounts on the blockchain returned by one of the full nodes.
So in my test, I use those two functions:
- get_account_count()
- get_account_history() (as I understand that one is supported just by the full nodes, I'm querying here for my last 3 ops)
As you could see, I call the same two functions, looping through three different full nodes.
Here is the result:
---
Current steemd node: https://api.steemit.com
Total number of accounts on Steemit: 3657268
My last 3 ops:
['curation_reward', {'curator': 'lightcaptured', 'reward': '249.875147 VESTS', 'comment_author': 'aneukpineung78', 'comment_permlink': 'miner-wewrite-statistical-report-78'}]
['vote', {'voter': 'event-horizon', 'author': 'lightcaptured', 'permlink': 'it-is-almost-the-weekend-imprinted-by-lightcaptured', 'weight': 10000}]
['transfer', {'from': 'coin-doubler', 'to': 'lightcaptured', 'amount': '0.002 STEEM', 'memo': '#5jh7hxYNF1KtFgo81K2xbLDJzKQpN3eDPUoCDm9jSKWhZ9vLepunr4dHTz3aYdvUtxcLHkngh2gzLNdYLwUPXasSLTg5X35aXmgq2Dr2TbNoyMRrYmz5NKeCWSbY8sXe54Y7cb1aF19xT6koGaJ1TWztUSr15WoWEF4gyopssHd8fg9WjbATAoy22hsJfFvdgKMGR6oj9EhfDg8hTraoSNQWT5LWr5L65JtgckQPvDhAkZdPVyBtJGfkMCpzaAafK1D9bHoBqniSMyS3BAR7py9Rva75whemhUnH7c4hKfMu7EeFj7qB5LRvQPK8bWWbcLvnpEXzpowtFj1ufByohpmKgDoD5fwgcXiLDm34dCQVy4Qc3wirc2fYezpvWb4zhJx3GLzveH6N2oxMcBLNXvZSyAbzaF2FS9ZFz68ZquV9SCerpFt6wTgnnMV8tJFvFJ1TBmivMVR8mt4AETtDZRmC92MBWXguhbEHZRdD67EnJVpFhmbzRbGXW2Brtdt21z6xiqhKJDgE'}]
Execution time, [s]: 0.366773
---
Current steemd node: https://steemd.steemworld.org
Total number of accounts on Steemit: 3657268
My last 3 ops:
['curation_reward', {'curator': 'lightcaptured', 'reward': '249.875147 VESTS', 'comment_author': 'aneukpineung78', 'comment_permlink': 'miner-wewrite-statistical-report-78'}]
['vote', {'voter': 'event-horizon', 'author': 'lightcaptured', 'permlink': 'it-is-almost-the-weekend-imprinted-by-lightcaptured', 'weight': 10000}]
['transfer', {'from': 'coin-doubler', 'to': 'lightcaptured', 'amount': '0.002 STEEM', 'memo': '#5jh7hxYNF1KtFgo81K2xbLDJzKQpN3eDPUoCDm9jSKWhZ9vLepunr4dHTz3aYdvUtxcLHkngh2gzLNdYLwUPXasSLTg5X35aXmgq2Dr2TbNoyMRrYmz5NKeCWSbY8sXe54Y7cb1aF19xT6koGaJ1TWztUSr15WoWEF4gyopssHd8fg9WjbATAoy22hsJfFvdgKMGR6oj9EhfDg8hTraoSNQWT5LWr5L65JtgckQPvDhAkZdPVyBtJGfkMCpzaAafK1D9bHoBqniSMyS3BAR7py9Rva75whemhUnH7c4hKfMu7EeFj7qB5LRvQPK8bWWbcLvnpEXzpowtFj1ufByohpmKgDoD5fwgcXiLDm34dCQVy4Qc3wirc2fYezpvWb4zhJx3GLzveH6N2oxMcBLNXvZSyAbzaF2FS9ZFz68ZquV9SCerpFt6wTgnnMV8tJFvFJ1TBmivMVR8mt4AETtDZRmC92MBWXguhbEHZRdD67EnJVpFhmbzRbGXW2Brtdt21z6xiqhKJDgE'}]
Execution time, [s]: 0.310036
---
Current steemd node: https://api.steemyy.com
Total number of accounts on Steemit: 3657268
My last 3 ops:
['curation_reward', {'curator': 'lightcaptured', 'reward': '249.875147 VESTS', 'comment_author': 'aneukpineung78', 'comment_permlink': 'miner-wewrite-statistical-report-78'}]
['vote', {'voter': 'event-horizon', 'author': 'lightcaptured', 'permlink': 'it-is-almost-the-weekend-imprinted-by-lightcaptured', 'weight': 10000}]
['transfer', {'from': 'coin-doubler', 'to': 'lightcaptured', 'amount': '0.002 STEEM', 'memo': '#5jh7hxYNF1KtFgo81K2xbLDJzKQpN3eDPUoCDm9jSKWhZ9vLepunr4dHTz3aYdvUtxcLHkngh2gzLNdYLwUPXasSLTg5X35aXmgq2Dr2TbNoyMRrYmz5NKeCWSbY8sXe54Y7cb1aF19xT6koGaJ1TWztUSr15WoWEF4gyopssHd8fg9WjbATAoy22hsJfFvdgKMGR6oj9EhfDg8hTraoSNQWT5LWr5L65JtgckQPvDhAkZdPVyBtJGfkMCpzaAafK1D9bHoBqniSMyS3BAR7py9Rva75whemhUnH7c4hKfMu7EeFj7qB5LRvQPK8bWWbcLvnpEXzpowtFj1ufByohpmKgDoD5fwgcXiLDm34dCQVy4Qc3wirc2fYezpvWb4zhJx3GLzveH6N2oxMcBLNXvZSyAbzaF2FS9ZFz68ZquV9SCerpFt6wTgnnMV8tJFvFJ1TBmivMVR8mt4AETtDZRmC92MBWXguhbEHZRdD67EnJVpFhmbzRbGXW2Brtdt21z6xiqhKJDgE'}]
Execution time, [s]: 0.29955
Logically, steemyy and steemworld nodes are quicker for me, as they are also hosted on servers in Europe, closer to me.
Few notes:
- quite expectedly, each time I run the script, it returns different times but they are usually within the same average values of 0.3 seconds or so.
- next step would be to measure the ping times of the nodes by calculating the average of a few pings to increase accuracy
- perhaps it makes sense to compare the execution of same queries by using steem-python and by directly json-ning the APIs? I am not quite sure it's worthy spending time on that as this would only measure the performance on my machine, running the library, lol.
Any ideas to do something that would be more useful, are welcome, critics are also welcome and appreciated :)
As I already shared, this is just to say I am now satisfied and happy to have that all running and so I can spend some spare time for something more entertaining.
LightCaptured is a proud SteemAtlasian.
Buy my stock photos at Alamy: https://www.alamy.com/portfolio/112427.html
Buy my stock photos at Adobe Stock: https://stock.adobe.com/contributor/206416265/lightcaptured
Copyright: LightCaptured
All the photographs, digital art and text in my posts, unless specified otherwise, are my own property and created by me.
Have a great day!
Here is an uncomplete list of some of my equipment I use on a regular basis:
Cameras | |
---|---|
Canon EOS 5D Mark III | |
Canon EOS M5 | |
Canon EOS 550D | |
Lenses | |
Canon EF 16-35mm f/2.8L II USM | |
Canon EF 135mm f/2L USM | |
Canon EF 100-400mm f/4.5-5.6L IS II USM | |
Canon EF 50mm f/1.4 USM | |
Canon EF-M 15-45mm f/3.5-6.3 IS STM | |
Canon EF-M 22mm f/2 STM | |
Tokina 11-16mm f/2.8 | |
7artisans 35mm f/1.2 | |
Strobes | Dynaphos Speedster |
Flashes | Metz |
Tripods and Mono-pods | Manfrotto |
Benro |
The divider I use in my posts I have created in Adobe Express.
I am pleased that
steem-python
is now working for you.And thank you for your beneficiaries. :-)
I would like to give you a little tip about your code. I was wondering why you received
3657268
as the result of the account query atsteemd.steemworld.org
and not a much lower number. I get (currently)1931826
.When instantiating
Steem
you passed the parameternode=curr_node
. This does not work. You have to pass alist
to the parameternodes
.With your code,
nodes
was not passed and the default nodehttps://api.steemit.com
is used for every query. This is why you receive the same (incorrect) response for all nodes. The different response times may be due to caching.The correct initialisation would be as follows:
Oh! Right, I'll redo the exercise! :)
Strange, why isn't this part raising any errors?
Thanks so much!