Anvil: Web Apps with Nothing but Python Transcripts
Chapter: Adding APIs and HTTP Endpoints
Lecture: Why APIs?

Login or purchase this course to watch this video and the rest of the course contents.
0:00 in this chapter, we're going to see how to build http in points and Jason based AP eyes with our anvil application.
0:08 A good question that you might have is why would I build on a P I So let's talk about the power of AP eyes really quick.
0:15 Well, imagine we've got our Web app running an anvil up in, well, their servers. But, you know, maybe we consider our server.
0:22 It's got a Web app. It's got a database service, the data tables. All that stuff is over there. And how do people work with it?
0:28 Well, they open up their Web browser either on a PC or on a mobile device and find a phone, and they request the page.
0:37 And that's what we built so far they can interact with it, has the graphs. It has the ad measurement, the log in all that stuff.
0:43 It's super, but this is only one part of the world. It's the most visible part, to be sure, but it's not the only one.
0:50 I'm not necessarily the most important. We might also want to build a really sweet native app that we sell through the APP store for IOS or Android,
1:00 and we'd like to talk to the same data, basically have ah, native app version of the website that people were going to use
1:06 How does that talk to our server? Well, it's definitely not gonna just request the same pages.
1:12 Need data in a computer readable format like Jason or XML or something else,
1:17 but not HTML. Also, maybe some other websites or services want to integrate with ours. Maybe there's some healthcare company,
1:25 and they have, like a wellness program for their people. And they would like Teoh, have all the customers of fitness have their data integrated
1:33 in, so it automatically records this stuff into their system as well. So if we want to make this happen,
1:39 well, of course, we've got to build some AP eyes to allow that to happen. Now. Another really powerful reason for AP Eyes is to break up our
1:46 app into smaller pieces. This doesn't really make a lot of sense for inv elapse But when you hear people talk about micro services,
1:53 these are maybe a little Web app that does authentication one that compares measurements, one that grafts them things like that.
1:59 These are obviously connected with AP eyes as well. Like I said, probably not a use case for animal,
2:05 but certainly a use case for AP eyes AP Eyes are super important. They connect all these things that make our APS more amazing.
2:13 Make the integrations work, make architectural decisions more flexible. We're going to see how to build a P eyes that are http base and serve
2:22 Jason in Anvil. It's easy as you can expect.


Talk Python's Mastodon Michael Kennedy's Mastodon