Oct-16-2021, 06:39 PM
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,
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,