Forums

IPython Notebook

The "New IPython Notebook" button on the Files tab is disabled for me even though I have a paid account, can you please take a look? Also, I know the DB isn't exposed publicly, but will I be able to access my sites Postgres DB from an IPython Notebook running on PythonAnywhere?

I'd really like to be able to access my sites DB locally, why is it you don't allow local connections?

I just tried to upload a notebook I had locally and that worked, just something goofy with that button I guess.

Also, I was able to connect to my DB, so I'm good there.

You can access the db directly over ipython notebooks. To access the db locally, use ssh tunnelling.

Perhaps the new ipython notebook button is disabled because you haven't filled in a new file name for it yet?

Does the SSH Tunelling work for Postgres? Does anyone have examples of doing this from Python (e.g. setting up a SQLAlchemy engine)?

Are you trying to access your pythonanywhere database from python code that's running on your own machine? I can't help with sqlalchemy code examples. I can't see any reason why SSH tunnelling wouldn't work, in exactly the same way as described on the page @bfg linked to (substituting your postgres hostname obviously)...