Forums

CSV files and Power BI

Hi, I am creating some csv files in my django app. I would like to access the file I am creating from Power BI. Is that possible? In power BI you can download the data from a WEB URL and consequently I tried to point at the URL of one csv I have created (for example: https://www.pythonanywhere.com/user/xxx/files/home/xxx/xxx/csv_folder/name_of_file.csv and unfortunately POWER BI is taking a html script as data.)

Create a static file mapping to that directory. See https://help.pythonanywhere.com/pages/StaticFiles

is this secure? I mean they would accessible to everyone right?

They would be, yes. However, so long as you use HTTPS to access the file, and you make the filename unguessable (say, NWhMh81VAs6BToGnOw6c.csv) then you should be secure. You could also switch on password protection for the website (assuming that it's only used for these CSVs -- obviously that wouldn't work for a generally-accessible website).

An alternative would be to set things up using our files API.

Yeah, I went for the first solution! Thank you, Luca.

Glad to hear that you made it work!