Sunday, December 28, 2025

Quick tip: retrieving raw, unprocessed files stored in Github

 The domain raw.githubusercontent.com serves raw, unprocessed files stored in Github repositories - think of it as GitHub's "direct file download" backend. Tools like curl, wget or Python scripts can fetch files directly using a specific url composed of the user name, repo, branch, folder and filename

curl -O https://raw.githubusercontent.com/[user]/[repo]/[branch]/[folder]/[filename] 

example: curl -O https://raw.githubusercontent.com/jorisp/tradingnotebooks/master/data/DJI.csv


You can also read these raw files form GitHub using pandas.read_csv


No comments: