Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
August 29, 2022 11:51 am GMT

Building a service for Redis Hackaton

Overview of My Submission

This project is a small service whose purpose is to provide stats about GitHub repositories. It pulls info about the commits and draw some conclusions. It's intended to be integrated in a micro-service architecture.
I didn't provide any UI since I knew about this hackaton lately.

Submission Category:

Wacky Wildcards

Language Used

Python

Link to Code

Gitlytics

A service powered by Redis Streams to provide stats about Github repositories.

tasksRunnerResult 1Result 2Result 3

How it works

How the data is stored:

  • repositories is a stream where information is added about repositories to analyze.
  • For each analyzed repository
    • repos:{owner}:{repo} provides result of analysis

How the data is accessed:

  • List of Github repositories in process
XRANGE repositories - +
  • Result of repository analysis
GET repos:{owner}:{repo}

How to run it locally?

Prerequisites

Local installation

# use this to start redis or do it manuallyexport GLC_REDIS_PORT=6379 # modify this to customize your redis portdocker-compose up -dcd etlcp etl/.env.example etl/.env # customize to your environment# install dependenciespoetry install# activate your virtual environmentpoetry shellpython etl/main.py

In another tab:

# In another tab, use a redis client to create new taskspoetry shellowner=a_github_usernamerepo=a_repo_of_ownerXADD repositories * owner "$owner"

Original Link: https://dev.to/hanstognon/building-a-service-for-redis-hackaton-2ih5

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To