title
stringlengths 12
112
| published
stringlengths 19
23
| url
stringlengths 28
28
| video_id
stringlengths 11
11
| channel_id
stringclasses 5
values | id
stringlengths 16
31
| text
stringlengths 0
596
| start
float64 0
37.8k
| end
float64 2.18
37.8k
|
---|---|---|---|---|---|---|---|---|
How-to use the Kaggle API in Python
|
2020-11-22 20:29:27 UTC
|
https://youtu.be/DgGFhQmfxHo
|
DgGFhQmfxHo
|
UCv83tO5cePwHMt1952IVVHw
|
DgGFhQmfxHo-t454.0
|
If you have any questions, let me know in the comments below.
| 454 | 478 |
How-to use the Kaggle API in Python
|
2020-11-22 20:29:27 UTC
|
https://youtu.be/DgGFhQmfxHo
|
DgGFhQmfxHo
|
UCv83tO5cePwHMt1952IVVHw
|
DgGFhQmfxHo-t457.0
| 457 | 478 |
|
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t0.0
|
In this video, we are going to explore how we can put together a pretty simple API using Flask.
| 0 | 13.68 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t8.24
|
Now, what we're going to do is go through and build essentially what you can see here. So,
| 8.24 | 19.84 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t13.68
|
all of this code here is a single API. We're not going to go through all of it in this one video,
| 13.68 | 23.12 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t20.56
|
but we're going to go through the essentials and we're going to
| 20.56 | 29.84 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t23.12
|
step by step put an API together that is very similar to this.
| 23.12 | 37.12 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t29.84
|
Now, what this API is doing is pulling information from these two CSV files and either
| 29.84 | 43.2 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t37.68
|
presenting that information to us, that data, allowing us to modify, allowing us to add new entries
| 37.68 | 54.48 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t43.2
|
or allowing us to delete it. So, we get to use get, post, put and delete methods. Now, if you are
| 43.2 | 60.08 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t54.480000000000004
|
following along with this tutorial, you'll probably want this data so you can get it using
| 54.48 | 67.84 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t61.2
|
this code over here. So, over here we have, I'll make sure there's a link to this in the description
| 61.2 | 74.24 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t67.84
|
so you can get it. All we're doing is downloading the code or those two data files from here
| 67.84 | 81.76 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t75.2
|
and then storing it in a local directory. I mean, you can change that directory to whatever you
| 75.2 | 93.04 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t81.76
|
want, of course. Inside those two files, we have locations here, which is just a list of,
| 81.76 | 101.44 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t93.04
|
I think these are actually real coffee cafes, but I put this, I made this CSV quite a long time ago,
| 93.04 | 106.48 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t101.44000000000001
|
so I'm not 100% sure. Then over here, we just have some made up user data as well.
| 101.44 | 113.92 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t108.32000000000001
|
And the end result will be something like this. So, this is a program called Insomnia. I'll leave
| 108.32 | 119.28 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t113.92
|
a download link to that in the description, but it just allows us to send API requests very easily.
| 113.92 | 126.48 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t119.28
|
So, I'm going to send an API request to this address here, which is the API I just showed you.
| 119.28 | 133.68 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t127.12
|
And it's a user's endpoint. We will have two endpoints, which are essentially just separations
| 127.12 | 140.8 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t133.68
|
of the API. So, users and that's going to return all the user's data. And then we also have locations.
| 133.68 | 146.4 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t143.2
|
And we'll send that as well. And we return all the locations.
| 143.2 | 151.44 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t146.4
|
Now, we're going to start from scratch. And the first thing that we'll need to do is import
| 146.4 | 157.76 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t151.44
|
everything we need. So, we will need to import Flask. So, from Flask, import Flask.
| 151.44 | 167.92 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t159.6
|
We'll also need to import Flask RESTful. So, this is another Flask library that gives us a few
| 159.6 | 180.96 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t167.92
|
very useful tools for building an API. So, right from Flask RESTful, import resource API and rec
| 167.92 | 192.72 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t180.95999999999998
|
pass. Now, specific to what we're doing here, we will also want to import pandas and import AST.
| 180.96 | 200 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t192.72
|
Now, you will probably have to pip install these as well. So, the pip for those is pip install Flask
| 192.72 | 209.84 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t200.0
|
and Flask RESTful. Nothing weird there. All right. So, the first thing we need to do is initialize
| 200 | 217.52 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t209.84
|
our Flask app and then initialize our Flask API. So, we do that. So, this is typical Flask here.
| 209.84 | 230.08 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t217.52
|
So, we write Flask name and then the API is API equals API app. Okay. Super easy. Now,
| 217.52 | 236.08 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t231.84
|
we already touched on it, but our app is going to have two different endpoints.
| 231.84 | 242.56 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t237.28
|
So, we're going to have the users endpoints and we're also going to have the locations.
| 237.28 | 249.68 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t242.56
|
Endpoints. And we're going to go through building the users endpoint, but you'll be able to find the
| 242.56 | 256.64 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t249.68
|
code for both of those in the description. But the way that we separate both of these is we use a
| 249.68 | 263.92 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t256.64
|
class object. So, we're going to create our use class first. So, we write class users. And then
| 256.64 | 273.28 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t263.92
|
to initialize this as an endpoint for our API, we actually need to pass the resource object into it.
| 263.92 | 281.92 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t274.24
|
That will inherit the resource object and expose it to different like HTTP requests like get,
| 274.24 | 290.08 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t281.92
|
post and so on. For now, we're not going to add anything in there, but to make it easier,
| 281.92 | 301.44 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t290.08
|
we need to write API add resource. And then we need to specify the web address of this or the,
| 290.08 | 312.08 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t303.44
|
or the, it's almost like a page of a web address that the resource or endpoint will be.
| 303.44 | 320.08 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t312.08
|
So, we'll say users, which is our class and then the actual endpoint location, which is users.
| 312.08 | 329.84 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t320.08
|
Okay. So, this is saying I want you to map the class users here to this place in our API.
| 320.08 | 338.08 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t330.47999999999996
|
So, our web address. So, if for example, the user is a user, then we're going to pass the
| 330.48 | 347.2 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t338.08
|
API. So, our web address. So, if for example, the API was located at, let's say, API.com,
| 338.08 | 357.68 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t348.24
|
this resource would be located at API.com slash users. Okay. And we'll also create another one,
| 348.24 | 363.52 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t357.68
|
although we're not going to fill it out in this video, that will be called locations.
| 357.68 | 371.76 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t363.52
|
So, again, exactly the same thing. Yeah. Resource, we'll just pass for now and we'll copy that
| 363.52 | 388.56 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t372.47999999999996
|
and do the same for locations. Okay. Now, that's sort of the structure or the very high level
| 372.48 | 398.08 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t388.56
|
structure of our API itself. So, what I like to do is whilst we are building or writing the code
| 388.56 | 405.04 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t398.08
|
for our API, I like to also test it as we go along. I think it makes things a lot easier.
| 398.08 | 414.88 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t405.6
|
So, to run our API, we need to write this. If name is equal to main,
| 405.6 | 424.56 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t414.88
|
we write app.run. Okay. It's that easy. And now what we can do is just press the execute button up here.
| 414.88 | 438.96 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t429.12
|
Okay. Okay. So, we got this error because I, okay, I don't know why I did that. So, this is,
| 429.12 | 448.88 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t438.96
|
this needs to be the class, not a string of the class. Okay. So, now let's run that again.
| 438.96 | 454.48 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t448.88
|
It should work. Okay. So, we get this. This is a development server. Do not use it in production
| 448.88 | 459.6 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t454.47999999999996
|
environment. That's fine because we're just testing it. And then we can see this is running
| 454.48 | 466.48 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t460.24
|
at this address. Okay. So, if we take this, we'll copy it and we're going to take it over into
| 460.24 | 478.4 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t466.48
|
Insomnia. Okay. And I'll just clear everything that I was doing before. And we'll go into here.
| 466.48 | 485.52 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t478.40000000000003
|
Okay. And if we send this, we won't return anything yet. So, we'll just get this not found.
| 478.4 | 496.8 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t485.52
|
But if we go to users, we should at least return this internal server error. So, this means that,
| 485.52 | 502.8 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t496.79999999999995
|
okay, we are not getting anything back because there's an error on server side. So, in our API,
| 496.8 | 510.24 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t503.59999999999997
|
but there is something there. So, before when we just had this, so remember we have those two
| 503.6 | 515.44 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t510.24
|
endpoints. We're not actually using the base URL. So, there's not actually anything there.
| 510.24 | 521.68 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t516.64
|
We get this not found because there just isn't anything there. But if we type in the locations
| 516.64 | 528.8 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t521.6800000000001
|
or users, we will return this internal server error. Now, we're getting this because we haven't
| 521.68 | 535.2 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t528.8
|
written any code. So, it doesn't know what to do when we send that request. So, let's go back to
| 528.8 | 545.92 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t535.2
|
our code and we'll start writing something. So, first thing I want to do is we'll define a get
| 535.2 | 556.72 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t545.9200000000001
|
request. So, write find get bus self. And in here, what I want to do is load the users CSV. So,
| 545.92 | 564.56 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t556.72
|
to get that, I'm going to write users path.
| 556.72 | 575.44 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t570.5600000000001
|
So, this is the specific directory that I have stored my users data.
| 570.56 | 585.12 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t575.44
|
Of course, it might be different for you.
| 575.44 | 590.08 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t585.12
|
And what I'm going to do is down here, I'm going to use pandas to just read in that data. Whenever
| 585.12 | 597.68 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t590.08
|
I call this get request, I'm going to read it in. So, this is very similar to if we, for example,
| 590.08 | 603.68 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t597.6800000000001
|
had a database on a server somewhere. When the API gets a request, it would read that data quickly.
| 597.68 | 611.36 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t603.68
|
And return it to us. So, this is a very simple version of that. So, I'm going to do data equals
| 603.68 | 618.24 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t611.3599999999999
|
pd.read CSV. And we just go users path. And hopefully that's the right path. I think it is.
| 611.36 | 629.52 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t619.8399999999999
|
We can see. So, I come up to here. Yes, we have data. So, I guess that should be fine.
| 619.84 | 637.68 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t629.52
|
Yes, that should be fine. Users CSV. Cool. And then what we want to do, we can't pass a
| 629.52 | 645.2 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t638.4
|
we can't pass a pandas, a data frame object through an API. So, we need to convert this
| 638.4 | 653.84 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t645.1999999999999
|
into a dictionary. So, write data.toDate. Now, what we want to do is return. We want to return
| 645.2 | 659.6 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t653.84
|
the data. So, we're going to write data, which is equal to data, our dictionary. And we're going to
| 653.84 | 668.4 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t659.6
|
return the 200 code, which means the API request was successful. Here's your data. Okay, I'll save that.
| 659.6 | 677.12 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t671.2
|
And I believe it should, should update automatically. Let me check.
| 671.2 | 682.4 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t677.12
|
So, come over here. Let's send that again to users.
| 677.12 | 687.44 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t684.5600000000001
|
Okay, no. So, I think we need, we need to restart the API.
| 684.56 | 692 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t690.96
|
So, come over here.
| 690.96 | 700.88 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t695.52
|
Here, I'm just going to control C and run it again.
| 695.52 | 709.68 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t700.88
|
Now, you can, you can turn debug mode on. So, I think that will automatically reload everything.
| 700.88 | 715.84 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t710.48
|
So, to let's do that first. So, down here in app run, we're just going to set debug
| 710.48 | 723.76 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t716.8
|
equals true. Save that. I'm going to press control C down here and execute again.
| 716.8 | 731.04 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t723.76
|
And now, when we make changes, it should reload automatically.
| 723.76 | 736.16 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t733.36
|
So, come over here. Let's send that request again.
| 733.36 | 741.6 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t738.24
|
Now, we see user path is not defined. So,
| 738.24 | 753.2 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t741.6
|
see why that is wrong. So, it's user's path. So, I'll save that and that should reload automatically.
| 741.6 | 763.36 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t756.0
|
Let's try again. Okay, perfect. So, now we get a 200 response there. We get all of our users data.
| 756 | 766.88 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t763.36
|
Okay, so we're just returning that data frame in addition to the data frame.
| 763.36 | 774 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t766.88
|
Okay, cool. So, that's how get requests. Let's move on to, let's put requests, I think. So,
| 766.88 | 783.52 |
API Series #2 - Building an API with Flask in Python
|
2021-10-07 14:52:32 UTC
|
https://youtu.be/MF75aNH3Gjs
|
MF75aNH3Gjs
|
UCv83tO5cePwHMt1952IVVHw
|
MF75aNH3Gjs-t774.0
|
adding more data. Okay, so this time, what we're going to need to do is, so using post request,
| 774 | 790.24 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.