Python Forum
API REST Package for Calling/Flask
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
API REST Package for Calling/Flask
#1
Greetings,

Is there an API package for calling REST api's? I looked into FastAPI but that is for creating APIs.

Can this be done with Flask?

I would want to rewrite the URLs based on what I want. Let's say I want to consume a Movie API. The URLs would look like this:

http://www.mydomain.com/movie/ID ID would be a place holder for a the movie id. Then I would click the link and view the details of the movie, etc...

I would have classes for each end point but I would not store the data in a database. Just send a partial request and and based on the Etag (I believe), I would request or do nothing.

Classes:
Titles = Movie or TV
Person
Category
Roles
etc...

I know I can use the 'requests' package but if I would need to use a web framework anyway if I wish to build a web site.

Maybe Flask has a package for APIs? I know Flask has a something close to the MVC convention. However, I looked over the docs and it seems as though the app.py is similar to a controller in PHP frameworks. However, I don't like the idea of having all of my functions in one file.

Can you split up the directories: Movie > movie.py (same as app.py but less code), etc...?



Thanks,
Reply


Messages In This Thread
API REST Package for Calling/Flask - by muzikman - Oct-16-2021, 06:39 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Help with return on REST API Flask korenron 0 1,319 Jun-13-2021, 10:40 AM
Last Post: korenron
  Calling Oracle REST SQL from Python johnjacob 2 2,054 Nov-05-2020, 04:19 AM
Last Post: johnjacob
  rest api parameter in flask bluefrog 3 3,290 Jun-21-2018, 05:03 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020