pierrotsmnrd / flat_data_py_example

How to use Python in Github's Flat Data

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using python as postprocess script for Github's Flat Data actions

This repository demonstrates how to run a python script as postprocess step for Github's Flat Data actions.

The idea is basic : Use Deno to trigger the execution of a python script.

This example also shows how to install requirements and write a new file.

Execution :

  • the Flat Data action is scheduled daily, and download the BTC prices data (as seen in Github Octo's example) and stores it in btc-price.json

  • the postprocess.ts script is then run, triggers the install of python packages, and runs the main python script postprocess.py. it also forwards the arguments.

  • postprocess.py prints out its received arguments, and then generates a dummy output CSV file df_output.csv, for the sake of the example.

Next steps, ideas and TODOs :

  • make an example using conda

Thanks

About

How to use Python in Github's Flat Data

License:MIT License


Languages

Language:TypeScript 57.0%Language:Python 43.0%