Thanks to visit codestin.com
Credit goes to github.com

Skip to content

xwysyy-studio/github-contributions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Contributions

English | 中文

Python FastAPI Vercel

Turn any GitHub user's contribution calendar into an embeddable SVG card, or fetch the raw JSON. No token required — the data comes straight from the public GitHub profile page.

Preview

GitHub contributions of xwysyy

Embed it in your own Markdown or web page:

![](https://<your-deployment>.vercel.app/<username>/svg)

After deploying, replace <your-deployment> with your domain and <username> with the target user.

Endpoints

Method Path Description
GET /{username}/svg Contribution calendar as an SVG card, embeddable in Markdown / web pages
GET /{username} Contribution data as JSON: { total, contributions: [{date, count}] }
GET /health Health check

/{username}/svg accepts an optional cache_seconds query parameter (0–86400) that sets the Cache-Control max-age on the response.

Example JSON response:

{
  "total": 1234,
  "contributions": [
    { "date": "2025-06-01", "count": 6 },
    { "date": "2025-06-02", "count": 0 }
  ]
}

Run locally

python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
uvicorn api.index:app --reload --port 8000

# try it
curl http://localhost:8000/torvalds

Deploy to Vercel

The repo ships with vercel.json, which rewrites every request to the Python entry point api/index.py. Import the repo into Vercel and it runs as-is — no extra configuration needed.

Credits

The data interface takes inspiration from community projects such as hexo-github-calendar and python_github_calendar_api. Thanks to them.

About

Turn any GitHub user's contribution calendar into an embeddable SVG card or JSON.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages