Exporting LaunchDarkly Flag List into a CSV File with Python

At the moment, LaunchDarkly does not have functionality to export a list of flags as csv or excel file. This can change very near future (it may already have the functionality by the time you are reading this post). The workaround is to use API to ingest the data.

Here is the quick and dirty Python script to do it. You can replace the API key and endpoint and use it straight away!

I included epoch time conversion functions, too.

The catch is that I am not sure about the maximum number of flags we can get. I had about 140 flags and there was no pagenation. Documentation doesn’t really mention it, either. So, if you see the pagination in JSON file, you need to do a loop to get the next page.

But, wait. I’ve got something even better.

I created a React Feature Flag dashboard with TypeScript with AWS Cognito authentication. You can clone the repo and add the appropriate config file as in README. Then, you will have an awesome serverless web dashboard to visualise your flags.

Check out the repo here: launch-darkly-flag-dashboard

Data Engineering
Sending XML Payload and Converting XML Response to JSON with Python

If you need to interact with a REST endpoint that takes a XML string as a payload and returns another XML string as a response, this is the quick guide if you want to use Python. If you want to do it with Node.js, you can check out the post …

Data Engineering
Sending XML Payload and Converting XML Response to JSON with Node.js

Here is the quick Node.js example of interacting with a rest API endpoint that takes XML string as a payload and return with XML string as response. Once we get the response, we will convert it to a JSON object. For this example, we will use the old-school QAS (Quick …

Data Engineering
Downloading All Public GitHub Gist Files

I used to use plug-ins to render code blocks for this blog. Yesterday, I decided to move all the code into GitHub Gist and inject them from there. Using a WordPress plugin to render code blocks can be problematic when update happens. Plugins might not be up to date. It …