Forums

Creating an API and accessing information with PythonAnywhere

Hello, I am relatively new to APIs and webcoding, so I am a little confused as to how to get a simple API working. If my goal was to create an API hosted on PythonAnywhere and access the result locally using the requests module, how would I approach this.

I have read through this post but I am confused as to which files are offering the data and which files are receiving it. Would anyone be able to share an example of code for a super simple API on the server-side and how to access it on the client-side? My goal is to have a simple API which can return to the user a simple array based on the data they input.

Thanks for any help you can provide.

The page you link to is about our API. If you want to make your own, you need to create a web app on your account and implement it there.