Similar to what Codeforces Readme stats does.
- requests
- beautifulsoup4
- drawsvg
- Flask
codechef_readme_stats/
│
├── codechef_data_extractor.py
├── image_gen.py
├── app.py
├── static/
│ ├── One_chef's_hat.png
│ ├── codechef_logo.png
│ └── Chef_not_found.png
├── requirements.txt
└── README.md
Main files :-
-
codechef_data_extractor.py
: uses BeautifulSoup to extract data from CodeChef profile static HTML page -
image_gen.py
: Uses drawsvg to generate an svg image and make it self containing and not referencing any other image using base64. -
app.py
: runs a server to generate svg image from imported modules and then convert it to png before serving the user.

Please do not forget to type the section ....?v=1
since its essential force cache refresh in github to display images else sometimes images are not loaded as intended😐 Learnt it the hard way debugging!!!
Assume user is joy2022 so I will type the following :-
For Markdown

and for HTML it will be
<img src="https://codechef-readme-stats.onrender.com/joy2022?v=1" alt="something you like to put in here"/>
and output will be :-
Assume if user is maroonrk then output will be

then it will look something like this as shown below:-
Try this:
Markdown Format
[](https://www.codechef.com/users/{your_codechef_username})
or the HTML format
<a href="https://www.codechef.com/users/{your_codechef_username}">
<img src="https://codechef-readme-stats.onrender.com/{your_codechef_username}?v=1">
</a>