Pirana is a collection of data manipulation scripts built with Python and Go to support consenting students in accessing their academic results efficiently. It consists of three key components:
- Web scraper: Extracts result data directly from the college portal for students who have opted in.
- Centralized storage: Saves scraped records into a scalable database backend.
- Go backend + CLI tool: A Go-based REST-like service paired with a CLI application (
alfred) that enables fast and flexible querying of stored results right from the terminal.
This is the origin of The Alfred Project
- Consent-first scraping: Only fetches data for students who opt in, respecting privacy.
- Efficient storage & retrieval: Uses structured database models to store student results, optimized for quick access.
- Go-based CLI utility: Enables queries like
alfred sc <ROLLNO>, returning formatted results instantly. - Modular architecture: Clean separation of concerns—scraper, backend, and CLI—facilitating easy extension and maintenance.
-
Clone the repo:
git clone https://github.com/ashblend17/pirana.git
-
Modules:
hunt/: scraper logic and database migration code.- Pirana-CLI : Alfred, the CLI tool to access the data.
The hunt module has python scripts to scrape the data as well as help you migrate it to MongoDB.
- Run: Input the required credentials file and scrape the data using the python code.
Pirana transforms a scattered, manual process into a cohesive, automated, and consent-based pipeline. Ideal for small colleges or clubs aiming to manage result data internally, it illustrates:
- Practical use of Go for web scraping, backend APIs, and CLI apps
- Responsible data handling with student consent
- Scalable architecture suitable for expansion (e.g. adding auth, reporting, scheduling)