python

Bibliothèque pour calculer des stries de victoire / perte à l'aide de Redis en tant que backend
Télécharger maintenant

python Classement & Résumé

Publicité

  • Rating:
  • Licence:
  • MIT/X Consortium Lic...
  • Prix:
  • FREE
  • Nom de l'éditeur:
  • David Czarnecki
  • Site Internet de l'éditeur:
  • https://github.com/czarneckid/

python Mots clés


python La description

Streak est une bibliothèque Python pour calculer des stries de victoire / perte. Il utilise Redis comme backend pour la collecte des données. Ceci est un port Python de l'original (https://github.com/czarneckid/streak) Ruby Gem.USAGEPYTHON >>> de Streak Import Streak >>> Streak = Streak () >>> Streak.Accréat ( 'David', 3) >>> Streak.Accrégée ('David', -2) >>> Streak.Accréat ('David', 5) >>> Série.Accrégation ('David', -1) >>> Statistiques = Streak.Statistics ('David') >>> Statistiques d'impression {'Losses_streak': 2, 'Wins_streak': 5, 'Wins': 0, 'Losses_Total': 3, 'Pertes': 1, 'Wins_Total': 8, 'Total': 11} >>> Streak.Reset_Statistics ('David') >>> Statistiques = Streak.Statistique ('David') >>> Statistiques d'impression {'Losses_streak': 0, 'Wins_streak': 0, 'gagne': 0, 'pertes_total': 0, 'pertes': 0, 'wins_total': 0, 'Total': 0} >>> Vous pouvez également configurer les clés utilisées dans Redis: Python >> Streak = Streak (dict (namepace = 'string', positif_key = 'tue', positif_total_key = 'kills_total', positif_streak_key = 'kills_streak', négatif_key = 'morts_streak', négatif_total_key = 'deaths_total', négatif_streak_key = 'deaths_streak', total_key = 'Total' )) Si vous ne Ed pour définir l'instance Redis à autre chose que `localhost: 6379 / 0`, vous pouvez faire: pythonstreak.redis = redis.strictredis (hôte = 'Quelqu'un's.host', port = 6379, dB = 7) Page d'accueil du produit


python Logiciels associés