DEV Community

Tyler N
Tyler N

Posted on

How I Built a Python Script to Export and Analyze Your DEV.to Followers

It was a Friday, and school was out for the weekend. I made a bit of a Spelling Bee page for my website while I was at school, but that wasn't enough. I was bored and had no clue what to make (because I always code over the weekend).

When I was at a free 'boost' period at school, I checked my DEV.to notifications to find some new articles to read. And, I was shocked by how fast you can gain an audience on DEV.to. But there was just one thing I couldn't completely get a grasp on. There wasn't a good way to view and export your follower base, or even print a list of your followers in a nice format without it just being a big list of profile pictures, names, and usernames (from the dashboard).

So, when I came home, I began to create devto-followers2md, an open-source Python program that exports information about a user's followers on DEV.to in a beautiful Markdown file or a complete CSV or JSON file.

Here is an example of a nice Markdown output the program made (yes, I spent a long time making sure the program outputs it in a way that looks nice):


devto-followers2md

Generated by devto-followers2md.
It is not limited to Markdown files; it supports Markdown, JSON, and CSV exports

Profile: Tyler N

Attribute Details
Name Tyler N
Username thetylern
Summary Hello, I am Tyler N. On GitHub, I am @tyleruploads. I just ditched my default green geometric identicon profile picture using Inkscape--check out my latest post to hear more about it!
Location The United States of America
Joined At May 28, 2026
User ID 3956829
Profile
Index Username Name Followed At User ID
0 @charice_silverman_975926c Charice Silverman 2026-06-06T10:55:55Z 3971127
1 @david_maina_0fa61e59b303c David Maina 2026-06-05T05:06:24Z 3957041
2 @youngalpaccino Amir Mohammad Hemmati 2026-06-03T09:54:01Z 3966207
3 @coreuptech1 Coreuptech 2026-06-02T21:14:19Z 3965374
4 @uixlaby Natalia 2026-06-02T21:03:15Z 3965362
5 @lenovatus Lenovatus Levelian 2026-06-02T20:57:38Z 3965358
6 @asraym Ashishraymajhi 2026-06-02T20:53:05Z 3965353

The Features

devto-followers2md has many features that make it a solid, quality project.

Easy Usage

The project allows people who are not able to comfortably use CLI (command-line interface) applications to still benefit from the detailed and beautiful information it provides. It employs a custom banner, an API Key security notice, and a custom-made function that asks you to input save paths for each file format. Simple instructions on how to make a DEV.to API Key and a simple download and usage process is outlined in the README file.

Multi-Format Exporting

The project allows you to export to Markdown, CSV, and JSON files seamlessly in the terminal, without out-of-place GUI file pickers. This ensures that you can see both a beautiful overview and a complete log of the information about your audience. The CSV and JSON files contain the same data that was received from the server.

Secure API Key Handling

The script handles the input of your DEV.to API Key with the Python Standard Library module getpass, which, in this case, allows you to enter your API Key without it appearing in your terminal history. This prevents you from accidentally including your API Key when copying and pasting the output of the program, or experiencing other security issues.

The program also includes a notice near the top of its output that helps you understand how an API Key is not just a toy, but is essentially an all-accessing password. This notice helps prevent your DEV.to account from getting compromised.

Smart Rate-Limiting

The script ensures that every call to the DEV.to API endpoint is almost always accepted in 3 ways:

  1. The script waits one second in between each call to ensure the server will not be angry (one second is its favorite wait time—yes, this is not a joke).
  2. The script inspects the Retry-After header to find the optimal time to pause after receiving an HTTP code 429 Too Many Requests response, which means we are above the server's stated usage thresholds. This ensures that you will not get your IP address banned from the API endpoint and that no time is wasted on unnecessary wait times.
  3. The script includes a user-agent in the header of the request to ensure full acceptance.

Beautiful and Detailed, but Concise

The application allows you to export the follower information into a beautiful and detailed but concise Markdown file, or a CSV or JSON file that has every single field of information the DEV.to API gives the script. And, you don't have to choose between beautiful and complete! The program gives you the opportunity to export to any one or all of those formats in one execution.

More on how I built it

While 300 lines of code may seem very simple (which is true on the outside because of how short it is), each line of its code is in a compact form and contributes greatly to the final result, including formatting and white space.

Behind the small 300 lines of code were hours of development, thinking, debugging, linting (to the best of my ability; I am not even in high school), Information Architecture (deciding how to structure and organize information), and Document Engineering (converting messy API data to a beautiful Markdown output—in my case).

Originally, it only supported Markdown outputs. But after some thinking, I determined that it was best to add JSON and CSV outputs to enable you to analyze your data with code or spreadsheet formulas and to do other similar tasks. The way the program helps with analysis—other than the beautiful human-readable output—is by automatically collecting each page of your followers into one output, which you would have to do manually or create your own script to do so without the application.

Future Plans

A simple weekend project turns into a trustworthy and handy tool when it is contributed to and updated over time. I am already envisioning new features that I can add to the project, such as:

  • More Platforms: Imagine if you had one tool that analyzed your audience across many different platforms, and even compared those audiences to find users who are engaging with you in multiple mediums. Think of one space to understand all of your audience, both for developers and non-developers. This is a large goal for the project, and would require community input as to what platforms should be targeted.
  • Gender and Nationality Analytics: Understanding your user base in this sense can help you decide when to publish articles based on time zones, routines, and preferences. It can also help you decide what topics may be more appealing to your user base. This data could be added as 2 columns to the main followers table.
  • Collecting More Information: The reason each user does not have all the information that the main user's profile does is simple: time. To comply with the API thresholds of DEV.to, it would take a long time to gather this information for each of your audience members. In the future, I am planning on making it gather this information about each audience member, which will take time to ensure it is coded to run as fast as it can while still complying with the DEV.to API thresholds.
  • Comparing to Past Outputs: Currently, the script does not compare the new API responses to any old ones, meaning it can not tell you the rate at which you are growing, if you gained or lost followers, or any more detailed information. I plan to have it compare multiple outputs to give more detailed analytics.
  • More File Formats: While the application already supports Markdown, JSON, and CSV exports, I plan on adding support for more export formats. Some of the formats I plan on incorporating into the application are: HTML table snippet, full HTML page, PDF, SQLite, and more.
  • An Analytics Section: I am planning on adding a simple section in between the header and the followers table in the Markdown output that tells you how many followers you have, and the date the program was run. Aggregated gender and nationality information could also be put here.

Wrap-Up and Contributing

This project started as a simple weekend project to keep me from being profusely bored. But, as you just saw, I plan to maintain it.

If you want to try it out, export your own follower list, or contribute to help the ideas above become more possible, look at the repository on GitHub:

https://github.com/tyleruploads/devto-followers2md

What is your favorite project that you or someone else made? Also, which one of the features do you think I should prioritize?

Top comments (1)

Collapse
 
thetylern profile image
Tyler N

What is your favorite project that either you or someone else made? Also, which one of the features should I prioritize?