An Interest In:
Web News this Week
- April 24, 2024
- April 23, 2024
- April 22, 2024
- April 21, 2024
- April 20, 2024
- April 19, 2024
- April 18, 2024
August 29, 2022 11:51 am GMT
Original Link: https://dev.to/hanstognon/building-a-service-for-redis-hackaton-2ih5
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.
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
- Python 3.10
- poetry 1.1.x
- Docker (optional)
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"
- Check out Redis OM, client libraries for working with Redis as a multi-model database.
- Use RedisInsight to visualize your data in Redis.
- Sign up for a free Redis database.
Original Link: https://dev.to/hanstognon/building-a-service-for-redis-hackaton-2ih5
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To