
Those who read my posts or talk to me often around the Hive corners or discord know that I get very excited with initiatives that aim to help users retention. I try to participate as much as I can. I love @hivetrending initiative, for example, to refer a user per month. Now, the @apis.hive project is around, and some interesting new users are starting to take advantage of its benefits, led by @livinguktaiwan (LUT) . My participation in both projects is just as a supporter and trying to help as I can and I respect both project leaders. Yesterday I was talking with LUT and she brought a concern about manual following up the users.
If I am not mistaken, the project is almost reaching 200 users, which some of them are just receiving the first delegation rewards from the project. So she needs to keep up to check if all of them are still following the rules of the project. I offer a bit of help to automate. The logic isn't difficult, to establish. An input with names of the users and an output with a table after gathering all the information needed. For her, a python script was the best choice for having someone to help her there. So I offered a small script and using the BEEM library, which needs a bit of updates for sure, like @slobberchops talked in his post last Saturday.

It was a good challenge for me, I was helping the project and also growing my experience with Hive programming in Python. I guess I had some challenges in the script that maybe some more experienced guys can help me to solve it. The script is working, I tested, but in some parts it takes some time, especially when I use the account.history_reverse function from the library.
So the script accepts the excel file as argument plus some options from the file. Accounts have different categories in the project and the script can analyze each one of these categories. She needed some basic info of the user related to their account, such as current HP, reputation, total rewards and total HP delegated. This info is very easily accessible through the modules accounts, the only thing that I noticed is that depending on the API address that you are using the reputation isn't complete, hive.blog API isn't working very well with that. So I decided to use the openhive API and it was fixed. With HP and total rewards, I could calculate the famous KE that she is using as one of the measurements for the project.
BEEM library has a very nice function called vests_to_hp() which converts vests to hp without any worries and need of gathering the total vesting fund hive and total vesting shares, which are needed for the conversion. That saves some lines of codes. However, my script takes some time like I mentioned before in two checks, the last powerdown in the last 30 days executed and the percentage of selfvotes in the last 30 days. It runs ok, but when we are talking about accounts with too much history, it takes a while to execute the account.history_reverse function. I tried to add the "stop" option with the 30 days limit, but still it takes a while. Maybe someone can help with that.



I hope that she can start using it, it looks nice and produces a tab separated file that she can open in Excel or LibreOffice. Hopefully it will give some good usage and save some time to her.



Aqueles que leem meus posts ou falam comigo frequentemente nos cantos do Hive ou no Discord sabem que fico muito animado com iniciativas que visam ajudar na retenção de usuários. Tento participar o máximo que posso. Adoro a iniciativa @hivetrending, por exemplo, de indicar um usuário por mês. Agora, o projeto @apis.hive está por aí, e alguns novos usuários interessantes estão começando a aproveitar seus benefícios, liderados por @livinguktaiwan (LUT). Minha participação em ambos os projetos é apenas como apoiador e tentando ajudar como posso e respeito os dois líderes de projeto. Ontem eu estava conversando com a LUT e ela trouxe uma preocupação sobre o acompanhamento manual dos usuários.
Se não me engano, o projeto está quase chegando a 200 usuários, alguns dos quais estão apenas recebendo as primeiras recompensas de delegação do projeto. Então ela precisa acompanhar para verificar se todos eles ainda estão seguindo as regras do projeto. Ofereço um pouco de ajuda para automatizar. A lógica não é difícil de estabelecer. Uma entrada com os nomes dos usuários e uma saída com uma tabela após reunir todas as informações necessárias. Para ela, um script python era a melhor escolha para ter alguém para ajudá-la. Então, ofereci um pequeno script e usei a biblioteca BEEM, que precisa de algumas atualizações com certeza, como @slobberchops falou em seu post no último sábado.

Foi um bom desafio para mim, eu estava ajudando o projeto e também aumentando minha experiência com programação Hive em Python. Acho que tive alguns desafios no script que talvez alguns caras mais experientes possam me ajudar a resolver. O script está funcionando, eu testei, mas em algumas partes demora um pouco, especialmente quando eu uso a função account.history_reverse da biblioteca.
Então o script aceita o arquivo excel como argumento mais algumas opções do arquivo. As contas têm categorias diferentes no projeto e o script pode analisar cada uma dessas categorias. Ela precisava de algumas informações básicas do usuário relacionadas à sua conta, como HP atual, reputação, recompensas totais e HP total delegado. Essas informações são facilmente acessíveis através dos módulos accounts, a única coisa que notei é que dependendo do endereço da API que você está usando a reputação não está completa, a API hive.blog não está funcionando muito bem com isso. Então decidi usar a API openhive e foi corrigido. Com HP e recompensas totais, eu poderia calcular o famoso KE que ela está usando como uma das medidas para o projeto.
A biblioteca BEEM tem uma função muito boa chamada vests_to_hp() que converte vests para hp sem nenhuma preocupação e necessidade de reunir o total de vesting fund hive e o total de vesting shares, que são necessários para a conversão. Isso economiza algumas linhas de código. No entanto, meu script leva algum tempo, como mencionei antes, em duas verificações, o último powerdown nos últimos 30 dias executado e a porcentagem de selfvotes nos últimos 30 dias. Ele roda bem, mas quando estamos falando de contas com muito histórico, demora um pouco para executar a função account.history_reverse. Tentei adicionar a opção "stop" com o limite de 30 dias, mas ainda demora um pouco. Talvez alguém possa ajudar com isso.



Espero que ela possa começar a usá-lo, ele parece bom e produz um arquivo separado por tabulações que ela pode abrir no Excel ou no LibreOffice. Espero que ele dê um bom uso e economize algum tempo para ela.


Beem maintainer has been dormant, but I believe there is a community fork being assembled so that we can maintain the library as Hive evolves.
That would be awesome!! I would love to see that since python is a very fluent language ! Many people still aren’t doing stuff in JS which i believe has the best hive library for now.
Thanks so much for doing this! I can't wait to check it out tomorrow!
Take your time! I am testing some stuff while that 🤣
Congratulations, you received an ecency upvote through the curator @sahi1. Keep spreading love through ecency
Obrigado por promover a comunidade Hive-BR em suas postagens.
Vamos seguir fortalecendo a Hive
Bzzzrrr, que legalidade a gente vê aqui! Você, @gwajnberg, é um apoiador incrível e sempre alerta para projetos que ajudam a reter usuários. Eu adoro essa iniciativa!
#hivebr
AI generated content
Commands: !pixbee stop | !pixbee start | !pixbee price
Congratulations @gwajnberg! You have completed the following achievement on the Hive blockchain And have been rewarded with New badge(s)
Your next target is to reach 140000 upvotes.
You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word
STOP
Check out our last posts:
I was about to add a self-vote routine felt was doomed to use a HIVE-SQL call, but you have given me other ideas.. thanks for sharing!
Wow interesting tool, too bad I don't know anything about python
Delegate your HP to the hive-br.voter account and earn Hive daily!
🔹 Follow our Curation Trail and don't miss voting! 🔹
Your post was manually curated by @crazyphantombr.