Forums

Can I access PA files without a webapp setup?

I've got a brand new free PA account and have created a new directory with a .py script and a .rss file in it. The .rss file should be updated once each day. I'd like to be able to access this from http://feed2js.org to generate a JS version of the feed to populate my blog.

Is there any way that I can access the file without setting up a webapp? I'm thinking no, but would like your inputs/suggestions/comments.

Thank you!

I don't think there's any easy way to do that without using a web app. But setting up a web app is really quite simple -- I recommend you take a look at Flask, it's great for quick-and-dirty apps like this.

Just to add - we're working on better static files support at the moment. Once we have that, it should be really easy to specify a directory as being directly available to the outside world, without needing to configure a specific web app...

That's probably a week or three away though!

Thank you Giles and Harry! @giles -- I've created a flask webapp and modified the default code in /home/rishimaharaj/mysite/flask_app.py to:

from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
    return 'Hello'

I've saved/saved & run numerous times, yet the text on the site page (http://rishimaharaj.pythonanywhere.com/) still says "Hello from Flask!"

How to get it to update on the front end?

You need to click on 'Reload Web App' in the Web tab!

RCS1000, you, kind sir, are a genius.

Wow...genius level. WTG rcs1000!!!

We all love rcs1000 ;-)