Skip to content
developersIndiaPublic

Latest commit

Β 

History

1,417 Commits

Folders and files

Repository files navigation

metrics πŸ“ˆ

All Contributors Discord Subreddit subscribers

Generate developersIndia Community Stats from Subreddit

Currently the stats are generated in following JSON format:

{
    "totalMembers": 66600,
    "lastMonthUniquePageViews": 79519,
    "lastMonthTotalPageViews": 1286500,
    "yesterdayUniquePageViews": 18929,
    "yesterdayTotalPageViews": 71916,
    "discordTotalMembers": 7269,
    "discordTotalActiveMembers": 633
}

Setup πŸ‘·

  1. Clone the repo

    git clone https://github.com/developersIndia/metrics.git
  2. Initialise a virtual environment.

    cd metrics
    python3 -m venv venv
    source venv/bin/activate
  3. Install dependencies

    pip install -r requirements.txt
  4. Export environment variables.

    • Reddit(Make sure you are have moderator privileges for the subreddit you want stats for).
      export REDDIT_CLIENT_ID=<YOU_REDDIT_APP_CLIENT_ID>
      export REDDIT_CLIENT_SECRET=<YOU_REDDIT_APP_CLIENT_SECRET>
      export REDDIT_PASSWORD=<REDDIT_PASSWORD>
      export REDDIT_USER=<REDDIT_USERNAME>
      
    • Discord(If possible set expiry to never)
      export DISCORD_INVITE_CODE=<YOUR_DISCORD_INVITE_CODE>
      

Testing

Run the following command to run the test suite:

python -m unittest

Resources & Learning Material πŸ“š

πŸ“œ License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

MaDDogx
MaDDogx

πŸ’» ⚠️
Anil Khatri
Anil Khatri

πŸ’»

This project follows the all-contributors specification. Contributions of any kind welcome!

Used by

Contributors

Languages