refactor: Move tokens/week value to global constant TOKENS_PER_WEEK

This commit is contained in:
Paul Gauthier (aider) 2025-03-20 14:20:09 -07:00
parent a93e7108e6
commit cca155c5c6

View file

@ -8,6 +8,8 @@ import requests
import yaml
from dotenv import load_dotenv
TOKENS_PER_WEEK = "15B"
def get_total_downloads(api_key, package_name="aider-chat"):
"""
@ -131,7 +133,7 @@ src="https://img.shields.io/github/stars/Aider-AI/aider?style=flat-square&logo=g
<a href="https://pypi.org/project/aider-chat/"><img alt="PyPI Downloads" title="Total number of installations via pip from PyPI"
src="https://img.shields.io/badge/📦%20Installs-{downloads_formatted}-2ecc71?style=flat-square&labelColor=555555"/></a>
<img alt="Tokens per week" title="Number of tokens processed weekly by Aider users"
src="https://img.shields.io/badge/📈%20Tokens%2Fweek-15B-e74c3c?style=flat-square&labelColor=555555"/>
src="https://img.shields.io/badge/📈%20Tokens%2Fweek-{TOKENS_PER_WEEK}-e74c3c?style=flat-square&labelColor=555555"/>
<a href="https://openrouter.ai/"><img alt="OpenRouter Ranking" title="Aider's ranking among applications on the OpenRouter platform"
src="https://img.shields.io/badge/🏆%20OpenRouter-Top%2020-9b59b6?style=flat-square&labelColor=555555"/></a>
<a href="https://aider.chat/HISTORY.html"><img alt="Singularity" title="Percentage of the new code in Aider's last release written by Aider itself"