tgbotstat
1.0.0
TGBOTSTAT是一个Python软件包,可让您关注并保存使用电报机器人的统计信息。它可以节省每个订单的用途,使用这些命令的用户,使用命令的小时等等。
您可以使用pip安装TGBOTSTAT 。确保已安装pip ,然后运行以下命令:
pip install tgbotstat安装TGBOTSTAT后,您可以将其导入Python代码,以监视和保存使用统计信息。您可以在项目中使用它:
from tgbotstat import *
# Charger les statistiques existantes
statistiques = charger_statistiques ()
# Mettre à jour les statistiques pour une commande
commande = "/start"
user_id = 12345
heure_commande = "14"
jour_semaine = "Lundi"
mettre_a_jour_statistiques_commande ( statistiques , commande , user_id , heure_commande , jour_semaine )
# Enregistrer de nouvelles statistiques
sauvegarder_statistiques ( statistiques )
# Afficher les données d'utilisation
stats_text = "Statistiques d'utilisation des commandes: n "
for date , commands in statistiques [ 'commands' ]. items ():
stats_text += f" n Date: { date } n "
for command , data in commands . items ():
nombre_utilisations = data [ 'nombre_utilisations' ]
utilisateurs_commande = len ( data [ 'utilisateurs' ])
heures = data . get ( 'heures' , {})
heures_text = ', ' . join ([ f" { heure } : { utilisations } utilisations" for heure , utilisations in heures . items ()])
stats_text += f"- { command } : { nombre_utilisations } utilisations par { utilisateurs_commande } utilisateurs ( { heures_text } ) n "
print ( stats_text )您还可以使用软件包暴露的其他功能和类,例如Loading_utilizers , save_utilizer , laste_commandes_popular等,根据您的需求个性化您的统计信息。
欢迎捐款!如果要改善TGBOTSTAT或添加新功能,请随时在https://github.com/codingtoto/tgbotstat上打开提取请求(请求毛衣)或报告问题。
我们计划在未来版本中为tgbotstat添加一些功能和改进。这是计划中的工作的概述:
我们对社区建议和贡献开放。如果您想在tgbotstat中看到改进的想法或新功能,请随时开放出路或为我们的Restory Github提供请求。
请不要犹豫,遵循我们的发展,并为改进此包装做出贡献。我们迫不及待地想看看tgbotstat将来会如何发展!
该项目符合MIT许可。有关更多信息,请参阅许可证文件。