Building data-driven web apps with Flask and SQLAlchemy Transcripts
Chapter: Using SQLAchemy
Lecture: Inserting real PyPI data
0:00 One other thing, we also need to add system.path
0:03 Append to our path, this folder right here.
0:07 Because we're importing pypi.org
0:10 in PyCharm this is going to totally work smooth
0:13 because guess what?
0:14 PyCharm does that for us right there.
0:16 But if we try to run this outside
0:18 without setting this up as a package or something like this
0:21 it's not going to work so great.
0:24 So we're going to run Python out of our virtual environment.
0:27 Point it at and load data, here it goes.
0:29 So in the end we found 84 users, 96 packages, 5400 releases
0:34 embedded within those documents, 10 maintainers
0:36 25 languages, and 30 different licenses.
0:41 All right, well, that's it.
0:42 We should now have a whole lot more data over here.
0:45 And if we go look real quick
0:46 let's just go to the packages and jump to the console.
0:53 Say select * from packages, we run it.
0:58 We got a whole bunch of 'em.
0:59 Here's amqp, apters, argparse, flake8 and so on.
1:06 If we run it for releases
1:07 you're going to see a whole bunch of stuff.
1:08 And they're related to they're various packages
1:11 over here on the right. Pretty awesome huh?
1:13 So now when we run our app.
1:16 Move here and we click on it.
1:18 You can see, well, we're not quite using the data yet.
1:21 But, we're going to start using
1:22 all that data we just loaded up.
1:24 And dropping it into these locations.
1:27 So, that's going to be real awesome.
1:28 We have true, accurate, realistic, or even snapshot in time
1:33 real data from pypi
1:35 to work with to finish building out and testing our app.