Streak-Python.

biblioteca para calcular as raias de vitória / perda usando o Redis como um back-end
Baixe Agora

Streak-Python. Classificação e resumo

Propaganda

  • Rating:
  • Licença:
  • MIT/X Consortium Lic...
  • Preço:
  • FREE
  • Nome do editor:
  • David Czarnecki
  • Site do editor:
  • https://github.com/czarneckid/

Streak-Python. Tag


Streak-Python. Descrição

Streak é uma biblioteca Python para calcular as raias de vitória / perda. Ele usa o Redis como backend para coletar os dados. Este é um porto de Python do original (https://github.com/czarneckid/streak) Ruby Gem.UsagePoThon >>> de Streak Import Streak >>> Streak = Streak () >>> streak.aggate ( 'David', 3) >>> streak.aggate ('David', -2) >>> streak.aggate ('David', 5) >>> streak.aggate ('David', -1) >>> Estatísticas = Streak.Statistics ('David') >>> Imprimir estatísticas {'perdas_streak': 2, 'Wins_streak': 5, 'vence': 0, 'perdas_total': 3, 'perdas': 1, 'wins_total': 8, 'Total': 11} >>> Streak.reset_Statistics ('David') >>> Estatísticas = Streak.Statistics ('David') >>> Imprimir estatísticas {'Losses_streak': 0, 'Wins_STreak': 0, 'vence': 0, 'perdas_total': 0, 'perdas': 0, 'WINS_TOTAL': 0, 'Total': 0} >>> Você também pode configurar as teclas usadas no Redis: Python >>> Streak = Streak (dict (namespace = 'streak', positivo_key = 'kills', positivo_total_key = 'kills_total', positivo_streak_key = 'kills_streak', negativo_key = 'mortes', negativo_total_key = 'deaths_total', negativo_strak_key ='aths_streak ', total_key =' total ' )) Se você ne ed para definir a instância de Redis para algo diferente de 'localhost: 6379/0 », você pode fazer: pitonstreak.redis = redis.strictredis (host =' alguns.host ', port = 6379, db = 7) página inicial do produto


Streak-Python. Software Relacionado