WEBVTT

00:00:00.001 --> 00:00:04.720
Flask is now eight years old, and until recently had been going along pretty steady state.

00:00:04.720 --> 00:00:09.240
It had been hanging around at version 0.11 and 0.12 for some time.

00:00:09.240 --> 00:00:14.520
After a year-long effort, the web framework has now been updated to Flask 1.0.

00:00:14.520 --> 00:00:17.100
David Lord is here to share the big news with us.

00:00:17.100 --> 00:00:20.640
He's the maintainer of Flask, and we dive into the new features,

00:00:20.640 --> 00:00:22.780
as well as the future directions of Flask with him.

00:00:22.780 --> 00:00:28.620
This is Talk Python To Me, episode 177, recorded August 30th, 2018.

00:00:28.620 --> 00:00:45.700
Welcome to Talk Python To Me, a weekly podcast on Python,

00:00:45.700 --> 00:00:48.780
the language, the libraries, the ecosystem, and the personalities.

00:00:48.780 --> 00:00:52.900
This is your host, Michael Kennedy. Follow me on Twitter, where I'm @mkennedy.

00:00:52.900 --> 00:00:56.780
Keep up with the show and listen to past episodes at talkpython.fm,

00:00:56.780 --> 00:00:59.320
and follow the show on Twitter via at Talk Python.

00:00:59.320 --> 00:01:04.200
This episode is brought to you by Linode and 10x Agent On Demand.

00:01:04.200 --> 00:01:07.720
Please check out what they're offering during their segments. It really helps support the show.

00:01:07.720 --> 00:01:09.680
David, welcome to Talk Python.

00:01:09.680 --> 00:01:11.340
Hello. Thanks for having me.

00:01:11.340 --> 00:01:13.300
Hello. Yeah, it's great to have you here.

00:01:13.300 --> 00:01:17.920
It's really good to see lots of vibrant activity around Flask,

00:01:17.920 --> 00:01:20.580
and I know you're at the heart of much of this activity,

00:01:20.580 --> 00:01:23.280
and I'm super excited about diving into it with you.

00:01:23.280 --> 00:01:24.440
Yeah, let's get started.

00:01:24.560 --> 00:01:29.480
Yeah, for sure. And so we're going to dive into Flask and the news that Flask 1.0 is now out.

00:01:29.480 --> 00:01:32.520
That's a big deal, but let's get started with just your background.

00:01:32.520 --> 00:01:33.720
How do you get into programming in Python?

00:01:33.720 --> 00:01:36.460
Let's see. So I've been programming most of my life.

00:01:36.460 --> 00:01:39.600
I got into it probably around like second grade or so.

00:01:39.600 --> 00:01:42.040
Got a book about HTML, started making websites.

00:01:42.040 --> 00:01:42.540
Nice.

00:01:42.620 --> 00:01:44.920
Where I really like started and what I thought I wanted to do,

00:01:44.920 --> 00:01:46.840
and I think this is the story for a lot of people,

00:01:46.840 --> 00:01:49.940
is I thought I wanted to make video games when I grew up,

00:01:49.940 --> 00:01:54.400
because I started with a game maker when I was in like middle school and everything,

00:01:54.400 --> 00:01:56.200
making like 2D games.

00:01:56.200 --> 00:02:00.200
I wish I had saved now, but I didn't know about Git back then,

00:02:00.200 --> 00:02:02.120
so I didn't know about this back then maybe.

00:02:02.120 --> 00:02:05.300
So they faded into the digital dust?

00:02:05.960 --> 00:02:06.900
Yeah, unfortunately.

00:02:06.900 --> 00:02:11.820
So yeah, I got started that way and then went to college for computer science

00:02:11.820 --> 00:02:15.840
and eventually just kind of settled on like, oh, web apps are pretty cool.

00:02:15.840 --> 00:02:19.460
Like I started making like some small things for groups I was involved with,

00:02:19.460 --> 00:02:23.160
and eventually that's how I got into Python also.

00:02:23.160 --> 00:02:26.540
There was like a Python course in college, but even before that,

00:02:26.540 --> 00:02:29.640
I started thinking like, hmm, what can I do next?

00:02:29.640 --> 00:02:31.640
Because I'm just doing Java here and it's not that exciting.

00:02:32.260 --> 00:02:36.240
So I went one summer and I was looking at how to make a web application

00:02:36.240 --> 00:02:38.840
and I came across Ruby on Rails and Django.

00:02:38.840 --> 00:02:40.440
So I looked at both of them.

00:02:40.440 --> 00:02:43.340
Two very different directions that could have gone great.

00:02:43.340 --> 00:02:44.120
Yes.

00:02:44.120 --> 00:02:45.380
I looked at both of them.

00:02:45.380 --> 00:02:49.300
Looking at the growth curves and popularity curves of these two languages,

00:02:49.300 --> 00:02:50.780
you know, 10 years out or whatever,

00:02:50.780 --> 00:02:54.280
you probably got a good choice on the fork in the road there.

00:02:54.280 --> 00:02:55.040
Yeah.

00:02:55.040 --> 00:02:58.660
I mean, I'm sure there's plenty of good stuff you can do with Ruby also,

00:02:58.660 --> 00:03:01.340
but back when I was starting, I looked at both of them,

00:03:01.560 --> 00:03:04.180
looked at the code and said, not knowing Python or Ruby,

00:03:04.180 --> 00:03:05.800
hey, I can read this Python.

00:03:05.800 --> 00:03:06.620
It makes sense.

00:03:06.620 --> 00:03:09.020
And so I just started using that.

00:03:09.020 --> 00:03:13.340
Picked up the Django tutorial back when I think it was like 0.8 or so.

00:03:13.340 --> 00:03:18.980
And I think Flask may have just come out or was going to come out the next year.

00:03:18.980 --> 00:03:22.180
So it was like 2008, 2009 around that.

00:03:22.180 --> 00:03:23.320
And so that's how I got started.

00:03:23.320 --> 00:03:24.540
It just kind of went from there.

00:03:24.540 --> 00:03:26.100
Yeah, that's awesome.

00:03:26.100 --> 00:03:29.800
So I guess one of the interesting follow-up things is like,

00:03:29.800 --> 00:03:31.740
how do you go from Django to Flask?

00:03:31.740 --> 00:03:37.120
Like I just interviewed some folks for the Python survey done with the PSF

00:03:37.120 --> 00:03:38.580
and JetBrains collaboratively.

00:03:38.580 --> 00:03:40.660
And the number one framework,

00:03:40.660 --> 00:03:45.780
the most popular framework that anybody picks up for anything in Python is Django.

00:03:46.260 --> 00:03:48.260
And so it's certainly really popular.

00:03:48.260 --> 00:03:50.040
So you've strayed.

00:03:50.040 --> 00:03:51.140
You've strayed from Django.

00:03:51.140 --> 00:03:52.720
How did you get over to Flask?

00:03:52.720 --> 00:03:53.500
It's funny.

00:03:53.500 --> 00:03:56.160
I want to touch on those most popular things also.

00:03:56.160 --> 00:03:57.860
I don't want to start a fight with Django or anything.

00:03:57.860 --> 00:03:59.960
But we'll go into how I did Flask first.

00:04:00.220 --> 00:04:06.180
So for my job after college, I got put on a contract where it was basically open-ended.

00:04:06.180 --> 00:04:07.380
Like they wanted this.

00:04:07.380 --> 00:04:12.320
I mean, this is literally the line I got the first day I walked into the client's office was,

00:04:12.320 --> 00:04:13.900
we have this spreadsheet.

00:04:13.900 --> 00:04:15.600
Can we put it online?

00:04:15.600 --> 00:04:18.660
Like an Excel spreadsheet.

00:04:18.660 --> 00:04:22.140
And so the company I was working at, and I still work for them,

00:04:22.140 --> 00:04:23.520
they were a Java shop.

00:04:23.520 --> 00:04:26.960
And that's what my previous projects had been in.

00:04:27.500 --> 00:04:31.140
But I was the only person on this contract over at the client's office.

00:04:31.140 --> 00:04:34.600
I said, yeah, we can put that spreadsheet online in Django,

00:04:34.600 --> 00:04:37.980
which I've been learning, which I was learning before I started here.

00:04:37.980 --> 00:04:41.040
And I did it before anybody could say anything, you know.

00:04:41.040 --> 00:04:47.460
You know, the best way to quiet dissenting voices in those situations

00:04:47.460 --> 00:04:49.520
is to show them something working.

00:04:49.520 --> 00:04:51.780
They're like, oh, you should use Java.

00:04:51.780 --> 00:04:52.660
Wait, that works.

00:04:52.660 --> 00:04:53.540
You're already done.

00:04:53.540 --> 00:04:54.060
Okay.

00:04:54.060 --> 00:04:55.900
Well, I guess, all right, fine.

00:04:55.900 --> 00:04:56.640
You can do that, right?

00:04:57.180 --> 00:04:58.400
Did it go something like this?

00:04:58.400 --> 00:05:00.560
By the time they checked in a couple weeks later,

00:05:00.560 --> 00:05:02.400
we already had like a working prototype.

00:05:02.400 --> 00:05:05.320
And, you know, we've gone beyond the spreadsheet at that point.

00:05:05.320 --> 00:05:05.760
Yeah.

00:05:05.760 --> 00:05:10.620
Have they been using like the spreadsheet as like almost a web app database?

00:05:10.620 --> 00:05:12.140
Were they like mailing it around?

00:05:12.140 --> 00:05:13.040
What was the story?

00:05:13.040 --> 00:05:17.240
I don't know how many details I want to give like publicly.

00:05:17.240 --> 00:05:18.320
Yeah, yeah, sure.

00:05:18.840 --> 00:05:25.920
It was basically they were keeping track of how secure their computers were for various audits that they needed to do.

00:05:25.920 --> 00:05:30.660
And everybody was just basically reporting about their computers and somebody was filling out a spreadsheet.

00:05:30.660 --> 00:05:33.580
And then they would go and look at the statistics every now and then.

00:05:34.120 --> 00:05:37.620
So they wanted some way to people can like report that automatically.

00:05:37.620 --> 00:05:42.160
They can get the reports about compliance automatically.

00:05:42.160 --> 00:05:45.740
So it's kind of like just a data collection and reporting.

00:05:46.300 --> 00:05:52.140
Yeah, I just I asked because it seems like there's just so many sort of holes like that that Excel fills.

00:05:52.140 --> 00:05:54.260
That was just a little bit of skill.

00:05:54.260 --> 00:05:56.920
You know, like a much better solution would be in place.

00:05:56.920 --> 00:05:57.480
Yeah.

00:05:57.580 --> 00:06:03.220
Well, the contract ended up lasting like three years and far outgrew what Excel would ever have done.

00:06:03.220 --> 00:06:05.940
But it started from pretty humble beginnings.

00:06:05.940 --> 00:06:06.940
Nice.

00:06:06.940 --> 00:06:08.340
Okay, so that's Django.

00:06:08.340 --> 00:06:09.260
So how'd you get to Flask?

00:06:09.260 --> 00:06:09.800
Right, right.

00:06:09.800 --> 00:06:10.640
So we were on Django.

00:06:10.640 --> 00:06:13.760
And so we made this prototype and it was working well.

00:06:13.760 --> 00:06:17.380
And they're like, well, we want to start using this every, you know, for the company now.

00:06:17.380 --> 00:06:22.000
And so we deployed it and it ended up being too slow.

00:06:22.000 --> 00:06:24.380
Now, I'm not saying Django is too slow.

00:06:24.380 --> 00:06:26.640
That's probably partially on me.

00:06:26.640 --> 00:06:28.200
Like I was still learning and everything.

00:06:28.200 --> 00:06:32.540
But at the time, you know, it was a SQLite database.

00:06:32.540 --> 00:06:36.400
The templates were kind of slowing down in rendering.

00:06:36.400 --> 00:06:39.580
And the biggest problem was the ORM at the time.

00:06:39.580 --> 00:06:42.340
And I know you can do clever things even in the Django ORM.

00:06:42.340 --> 00:06:46.580
But I like was trying to do all these reports and aggregates and everything.

00:06:46.580 --> 00:06:48.760
And it was kind of finding Django.

00:06:48.760 --> 00:06:52.000
So I started looking for something, you know, alternatives.

00:06:52.000 --> 00:06:53.100
I found SQLAlchemy.

00:06:53.700 --> 00:06:56.940
And I found Flask, which SQLAlchemy was used with a lot.

00:06:56.940 --> 00:07:01.080
So I said, okay, I'm just going to rewrite the whole thing in Flask and see what happens.

00:07:01.080 --> 00:07:02.440
And that's about how it happened.

00:07:02.440 --> 00:07:08.100
I just had a Django site and I needed more performance and more customizability.

00:07:08.700 --> 00:07:09.960
And so I switched to Flask.

00:07:09.960 --> 00:07:10.780
Yeah.

00:07:10.780 --> 00:07:11.740
And was it pretty easy?

00:07:11.740 --> 00:07:13.020
Was it like a couple days?

00:07:13.020 --> 00:07:15.340
This is like six years ago now.

00:07:15.340 --> 00:07:18.120
But yeah, it was pretty straightforward.

00:07:18.120 --> 00:07:22.780
And like I said, like, I think I probably could have accomplished the same thing in Django eventually.

00:07:23.040 --> 00:07:24.660
I knew a lot less at the time also.

00:07:24.660 --> 00:07:26.700
And so I was more just exploring what was out there.

00:07:26.700 --> 00:07:30.040
But it was definitely, we built something on it for three years after that.

00:07:30.040 --> 00:07:30.780
Yeah.

00:07:30.780 --> 00:07:32.620
So it was a really good foundation in the end, huh?

00:07:32.620 --> 00:07:33.260
Yeah.

00:07:33.260 --> 00:07:35.880
I'm a fan of the micro framework style.

00:07:35.880 --> 00:07:43.740
You know, take a small web framework, pick the ORM and other tools that you want to use for that situation and put them together.

00:07:43.740 --> 00:07:44.220
I don't know.

00:07:44.220 --> 00:07:44.820
That's my style.

00:07:44.940 --> 00:07:46.780
So I'm a fan of that style as well.

00:07:46.780 --> 00:07:47.420
Yeah.

00:07:47.420 --> 00:07:50.580
I'm not biased or anything, but I'm definitely a fan of that also.

00:07:50.580 --> 00:07:52.500
For sure.

00:07:52.500 --> 00:07:53.760
Yeah.

00:07:53.760 --> 00:08:01.420
So we're going to talk a lot about Flask, but let's start at a more higher level umbrella style angle here.

00:08:01.420 --> 00:08:08.720
So when I went to look about Flask, it's now under this Palette Project umbrella.

00:08:08.720 --> 00:08:11.220
And a couple of years ago, I don't think it was.

00:08:11.220 --> 00:08:15.540
So what is Palette and how did Flask get there?

00:08:15.540 --> 00:08:23.880
So Palette is, it's like basically the new organization that's managing Flask and the other projects related to Flask.

00:08:23.880 --> 00:08:28.560
So VerkZoik, Jinja, Click, MarkupSafe, It's Dangerous.

00:08:28.560 --> 00:08:35.980
And there was a previous organization called Poku, which your listeners are probably familiar with,

00:08:35.980 --> 00:08:40.920
because when you go to the Flask documentation, you're still going to flask.poku.org.

00:08:40.920 --> 00:08:41.740
Right.

00:08:41.740 --> 00:08:44.220
That was Armin Roeneker's stuff, right?

00:08:44.220 --> 00:08:46.520
It was him and some of his friends.

00:08:46.520 --> 00:08:50.380
They had started various projects and Flask came out of that.

00:08:50.380 --> 00:08:51.560
Spinks came out of that.

00:08:51.560 --> 00:08:54.720
Other projects came out of it that I'm remembering off the top of my head.

00:08:54.720 --> 00:08:58.200
But everybody just kind of ended up moving on eventually.

00:08:58.520 --> 00:09:03.780
And so it had become just Armin managing all these projects himself.

00:09:03.780 --> 00:09:06.860
And he wanted to open it up more to the community.

00:09:06.860 --> 00:09:12.860
And so he created this new Palettes website and said, okay, everything belongs to this organization now.

00:09:12.860 --> 00:09:15.460
And I'm going to try to get more community involved.

00:09:15.460 --> 00:09:20.120
And so that's how I kind of, that's about the same time that I got into the project as well.

00:09:20.840 --> 00:09:25.080
And honestly, we haven't really picked up a lot more maintainers since then or anything.

00:09:25.080 --> 00:09:28.160
It's still just a couple of maintainers going at things.

00:09:28.160 --> 00:09:33.160
But it was like more of a significant like, it's not Armin's project anymore.

00:09:33.160 --> 00:09:33.600
Right.

00:09:33.600 --> 00:09:37.620
I was going to say, it kind of got Flask out of the shadow of Armin.

00:09:37.620 --> 00:09:38.140
Right.

00:09:38.360 --> 00:09:40.640
And he's still there.

00:09:40.640 --> 00:09:43.620
Like I chat with him about like, hey, do we want to do things like this?

00:09:43.620 --> 00:09:47.920
Or he still manages a lot of the assets behind the scenes like servers and that sort of thing.

00:09:47.920 --> 00:09:52.620
But day to day, it's me and the contributors that I kind of have gotten on board.

00:09:52.620 --> 00:09:53.660
All right.

00:09:53.660 --> 00:09:54.160
Right.

00:09:54.160 --> 00:09:55.480
Are you looking for more contributors?

00:09:55.480 --> 00:09:56.560
Absolutely.

00:09:56.560 --> 00:10:00.280
I don't know if you want to go in depth on that now.

00:10:00.280 --> 00:10:02.180
Yeah, sure.

00:10:02.180 --> 00:10:03.900
Let's talk about it just a little bit.

00:10:03.900 --> 00:10:08.620
Because I know a lot of listeners will reach out to me and say, hey, I'm getting into open source.

00:10:08.620 --> 00:10:10.920
I'm getting into this whole Python world.

00:10:10.920 --> 00:10:12.620
And I would like to contribute to something.

00:10:12.620 --> 00:10:17.260
But I feel like they contemplate creating something for themselves.

00:10:17.260 --> 00:10:20.800
And like, well, I could build this thing, but I don't really have a great use case for it.

00:10:20.800 --> 00:10:21.980
Or I'm not sure it'll be popular.

00:10:21.980 --> 00:10:24.780
And then they look at contributing to other projects.

00:10:24.780 --> 00:10:25.740
We talked about Django.

00:10:25.740 --> 00:10:32.300
Django is really like a big polished project that is super hard and approachable for people to get into.

00:10:33.720 --> 00:10:39.580
And so they're like, well, I can't get into these major projects because they're too advanced or too, you know, widely used.

00:10:39.580 --> 00:10:42.820
Whereas the small, simple stuff, I don't think it's going to make a lot of sense.

00:10:42.820 --> 00:10:45.380
So they ask you, well, what projects could I get involved with?

00:10:45.380 --> 00:10:46.780
And like, where can I help out?

00:10:46.780 --> 00:10:52.520
So if there's like a good place for people getting started or people who love Flask and want to get more involved, that'd be great.

00:10:52.520 --> 00:10:52.840
Yeah.

00:10:52.840 --> 00:10:57.980
So we're definitely looking for more contributors in all of the projects that I mentioned earlier.

00:10:57.980 --> 00:11:00.820
So Flask, Berkswake, Jinja, everything out there.

00:11:01.140 --> 00:11:05.260
The biggest success I have at finding contributors is at PyCon.

00:11:05.260 --> 00:11:08.880
And I'll run the sprints and I'll find people who are interested.

00:11:08.880 --> 00:11:10.540
You know, they'll come to me basically.

00:11:10.540 --> 00:11:13.880
And I get to walk through everything in person, which is really helpful.

00:11:13.880 --> 00:11:19.540
But I am trying to, I do get contacted occasionally, like saying, hey, can I contribute to Flask?

00:11:19.540 --> 00:11:20.300
And I'm like, absolutely.

00:11:20.640 --> 00:11:21.840
Do you want to write documentation?

00:11:21.840 --> 00:11:22.960
Do you want to write tests?

00:11:22.960 --> 00:11:29.220
Do you want to make sure our configurations are consistent across all six projects?

00:11:29.220 --> 00:11:33.580
Do you want to triage issues and see, can you reproduce things?

00:11:33.580 --> 00:11:35.500
Can you get more information out of people?

00:11:35.500 --> 00:11:37.280
Can you identify where a problem is?

00:11:37.280 --> 00:11:37.900
Right.

00:11:38.120 --> 00:11:40.640
Triage all the issues that come rolling in, right?

00:11:40.640 --> 00:11:41.280
Right.

00:11:41.280 --> 00:11:46.040
So like, even if you're not comfortable, like writing code yet, and you should be, you absolutely

00:11:46.040 --> 00:11:48.160
can contribute code to any of our projects.

00:11:48.160 --> 00:11:53.440
But there's plenty of non-code related contributions out there that are really helpful to me.

00:11:53.440 --> 00:11:55.180
So they give me more time to focus on the code.

00:11:55.180 --> 00:11:56.180
Yeah, that's awesome.

00:11:56.180 --> 00:12:01.660
Do you feel like it's a little easier to contribute to Flask because it's like six projects?

00:12:02.300 --> 00:12:05.640
And each project is a little easier to hold conceptually in your mind?

00:12:05.640 --> 00:12:06.680
It might be.

00:12:06.680 --> 00:12:09.660
I mean, there are really, there's four main projects.

00:12:09.660 --> 00:12:14.440
Flask, VarxSoy, Jinja, and Click are all pretty large code bases in themselves.

00:12:14.440 --> 00:12:16.500
And they're pretty distinct use cases.

00:12:16.500 --> 00:12:21.480
So there's not too much to do actually in Flask specifically anymore.

00:12:21.480 --> 00:12:28.880
1.0 kind of said like, acknowledge, you know, here we're stable and we have the features we want

00:12:28.880 --> 00:12:29.520
at this point.

00:12:30.000 --> 00:12:34.080
So like, in terms of like bug fixes, like there's some bug fixes every now and then,

00:12:34.080 --> 00:12:38.060
but a lot of the work is in VarxSoy and Click especially.

00:12:38.060 --> 00:12:41.840
There's a lot of stuff behind the scenes that people don't see when they use Flask every day,

00:12:41.840 --> 00:12:42.760
but it affects them.

00:12:42.760 --> 00:12:45.140
I think a lot fewer people are aware of those also.

00:12:45.140 --> 00:12:49.960
So like, people just being aware of those projects and looking at them also and not just Flask would

00:12:49.960 --> 00:12:50.600
be really helpful.

00:12:50.600 --> 00:12:55.100
And there's always tutorials and documentation that could use upkeep, right?

00:12:55.100 --> 00:13:01.900
Like I went through and just for Flask 1.0, rewrote the entire Flask tutorial from scratch,

00:13:01.900 --> 00:13:07.920
just kind of based on the questions and stuff I had experienced answering questions on Stack

00:13:07.920 --> 00:13:13.160
Overflow, answering, helping people at meetups or conferences.

00:13:13.680 --> 00:13:20.920
And so identifying those kinds of things like, hey, this didn't work for me in the docs, you know, or this could have been clearer and going and contributing there.

00:13:20.920 --> 00:13:21.820
Yeah, that's cool.

00:13:21.900 --> 00:13:26.960
I often think of like, every time there's a question about something that I thought was explained well,

00:13:26.960 --> 00:13:28.640
but then it turns out there's a question about it.

00:13:28.640 --> 00:13:32.240
You're kind of like, ah, it's almost like an issue on that explanation, right?

00:13:32.240 --> 00:13:37.200
Most of the issues in Flask right now, the open issues on the bug tracker are documentation, really.

00:13:37.200 --> 00:13:40.880
Like people have brought up, like, this is confusing or this could be clearer.

00:13:41.500 --> 00:13:48.940
And if you're looking for even more issues, just go on Stack Overflow, go to the Flask tag and sort by most voted questions.

00:13:48.940 --> 00:13:52.680
And just look at the top one, see if it's documented.

00:13:52.680 --> 00:13:53.740
Look at the next one.

00:13:53.740 --> 00:13:56.140
Yeah, that's a really good point, actually.

00:13:56.140 --> 00:14:02.300
So it occurs to me that it might be worthwhile to spend just a moment talking about these projects that you discussed.

00:14:02.620 --> 00:14:07.300
So we just quickly ran through it, like there's Flask and there's Jinja and there's Werkzeug and stuff like that.

00:14:07.300 --> 00:14:12.440
And could you maybe give us a rundown of like what each one of those actually is so people know what they're about?

00:14:12.440 --> 00:14:13.180
Sure.

00:14:13.180 --> 00:14:16.120
So, yeah, Flask is definitely the most popular.

00:14:16.120 --> 00:14:21.480
But if you're using Flask, you're using the five other libraries also behind the scenes.

00:14:21.480 --> 00:14:23.920
Like, so every time you pip install Flask, you get all these also.

00:14:23.920 --> 00:14:28.180
And Flask, honestly, is just a wrapper around all these other libraries.

00:14:28.180 --> 00:14:32.360
It's using what's provided there and just putting a nice framework around it.

00:14:32.360 --> 00:14:36.660
So Werkzeug is the closest to what Flask is doing.

00:14:36.660 --> 00:14:42.580
It's also a WSGI library, but it's dealing with kind of a lower level than what Flask is.

00:14:42.580 --> 00:14:57.300
So Flask is providing like an application framework and Werkzeug is providing all the parts for taking a HTTP request and a WSGI request and parsing out the headers and producing some data structure,

00:14:57.300 --> 00:15:04.640
like a request that we can use and look at and turning our response into something that our server can understand.

00:15:04.640 --> 00:15:13.580
Jinja is a templating library, which means you write text files with special syntax in it that kind of looks like Python.

00:15:13.760 --> 00:15:16.260
It actually compiles to Python behind the scenes.

00:15:16.260 --> 00:15:27.820
And then you can render these templates and produce different web pages, for example, different HTML pages with user information or different details about different objects.

00:15:27.820 --> 00:15:33.980
Click is the most recent Palettes project, but it's four years old at this point.

00:15:33.980 --> 00:15:35.180
So it's not that recent, I guess.

00:15:35.180 --> 00:15:37.880
It's probably also the one used most independently.

00:15:38.680 --> 00:15:40.180
Yeah, that's true.

00:15:40.180 --> 00:15:48.780
I wish I could name more projects off the top of my head that used it, but I do know PIPend uses it, Cookie Cutter uses it, and Flask uses it, obviously.

00:15:48.780 --> 00:15:51.700
And that's our command line tool.

00:15:51.700 --> 00:15:57.480
So it's kind of like Flask in a sense, but for command line applications instead.

00:15:57.480 --> 00:16:07.480
So you use decorators to turn functions into commands that you can run with options and arguments and produce terminal output.

00:16:08.280 --> 00:16:08.820
Right. Nice.

00:16:08.820 --> 00:16:10.480
And there's all sorts of...

00:16:10.480 --> 00:16:11.280
Click is kind of unique.

00:16:11.280 --> 00:16:24.720
It tries to be very correct about how it interacts with the environment it's running in, in terms of encodings for the terminal, for the file system, for user input.

00:16:25.500 --> 00:16:38.600
And it actually, I think, I don't know the full history, but I think in part influenced some recent changes in Python 3.7, where Python now handles UTF-8 encodings better, detecting those on Linux machines.

00:16:38.600 --> 00:16:43.700
Because Click would actually complain, like, your system is not configured right, and I'm not going to try to get...

00:16:43.700 --> 00:16:44.040
Right.

00:16:44.040 --> 00:16:44.220
Right.

00:16:44.580 --> 00:16:47.380
Which led to a lot of headaches for people writing tools.

00:16:47.380 --> 00:16:48.620
But it did make people...

00:16:48.620 --> 00:16:48.620
Yeah.

00:16:48.620 --> 00:16:49.120
...better.

00:16:49.120 --> 00:16:50.020
Yeah, yeah.

00:16:50.020 --> 00:16:59.920
So one thing I want to highlight, and I'm not sure if people are aware of this, that GitHub recently added dependency computations or dependency reports for Python.

00:17:00.060 --> 00:17:02.900
That used to be just for Ruby and JavaScript.

00:17:02.900 --> 00:17:15.440
But if you go to, like, palette slash Click on GitHub and go to Insights, then Dependency Graph, and then Dependents, you can see there are 82,408 repositories and 4,774 packages that depend on Click.

00:17:15.440 --> 00:17:16.340
And there's the list of them.

00:17:16.340 --> 00:17:17.060
Okay.

00:17:17.060 --> 00:17:17.540
Wow.

00:17:17.540 --> 00:17:20.520
I haven't actually...

00:17:20.520 --> 00:17:24.440
I remember vaguely seeing that they had released that, and I haven't looked at it yet.

00:17:24.440 --> 00:17:25.680
That's really surprising.

00:17:25.680 --> 00:17:26.740
It's really cool.

00:17:26.740 --> 00:17:28.200
Dependency Graph.

00:17:28.200 --> 00:17:29.140
I'm looking at it right now.

00:17:29.140 --> 00:17:29.820
Oh, yeah.

00:17:29.920 --> 00:17:30.100
Yeah.

00:17:30.100 --> 00:17:31.320
It's good to draw you in, right?

00:17:31.320 --> 00:17:33.380
And you can also see the dependencies, like, in reverse.

00:17:33.380 --> 00:17:40.560
So it's good for, like, saying, what does this project depend upon if you're going to try to decide if you want to use it, right?

00:17:40.560 --> 00:17:47.260
But I think the other one is interesting for people like you who create these packages and then other people depend upon them.

00:17:47.260 --> 00:17:49.000
And you'll see, like, well, what else is out there?

00:17:49.000 --> 00:17:50.200
Yeah, it's really cool.

00:17:50.200 --> 00:17:52.160
It's just, like, an absolute number.

00:17:52.160 --> 00:17:56.160
The other package I use for getting statistics like that is PyPInfo.

00:17:56.160 --> 00:17:59.900
I don't know if anybody's discussed that on your podcast before.

00:17:59.900 --> 00:18:01.160
No, I don't think we talked about it.

00:18:01.160 --> 00:18:08.740
Yeah, you have, they have all the statistics about PyPI downloads, and you can just query that through Google BigQuery.

00:18:08.740 --> 00:18:18.420
That's why I was questioning your, Django's the most popular earlier, because if you go look at it month to month, it's not like I monitor this every month or anything.

00:18:18.420 --> 00:18:22.300
But Flask and Django are neck and neck.

00:18:22.300 --> 00:18:23.020
Really?

00:18:23.020 --> 00:18:29.340
And some months, Flask will be higher by a couple tens of thousands, even, and sometimes Django will be higher.

00:18:29.340 --> 00:18:43.080
It's really surprising, though, because despite them being downloaded the same amount, if you look at statistics like number of questions asked on Stack Overflow, Django has, like, probably, I think, like 50,000 times more questions.

00:18:43.580 --> 00:18:44.840
It's like a ridiculous number.

00:18:44.840 --> 00:18:44.840
Yeah.

00:18:44.840 --> 00:18:50.200
Well, I wonder if that's a micro framework versus sort of, I think of, like, Lego building block frameworks like Django.

00:18:50.200 --> 00:18:56.260
Like, you wouldn't ask so much, you wouldn't say tie a question about SQLAlchemy to Flask because it's about SQLAlchemy.

00:18:56.420 --> 00:19:05.520
But you very much, it's very common that you might do that for, say, Django ORM being tied to Django, even though it's the data, because it's more like grouped together.

00:19:05.520 --> 00:19:06.220
I don't know.

00:19:06.220 --> 00:19:09.320
Yeah, I'm not sure if you can even read anything into that.

00:19:09.320 --> 00:19:16.340
Like, it's maybe there's just a bigger community, and so there's bigger awareness of Django that people think to ask questions about in the first place.

00:19:17.040 --> 00:19:23.860
Yeah, but I think maybe the main takeaway is Flask and Django are both well up there as some of the most popular frameworks for Python.

00:19:23.860 --> 00:19:24.260
Sure.

00:19:24.260 --> 00:19:25.300
Okay, so let's see.

00:19:25.300 --> 00:19:28.500
We talked about Flask, Jinja, Vixoy, Vixoy.

00:19:28.500 --> 00:19:29.840
Yeah, thank you.

00:19:29.840 --> 00:19:30.960
And we just touched on Click.

00:19:30.960 --> 00:19:33.280
So we got MarkupSafe and It's Dangerous.

00:19:33.280 --> 00:19:34.080
Right.

00:19:34.220 --> 00:19:45.320
So MarkupSafe is kind of used internally by Jinja, and it is just a very fast implementation of escaping unsafe characters in HTML.

00:19:45.320 --> 00:19:46.660
So basically...

00:19:46.660 --> 00:19:54.260
Like, if you're going to take something from a database and plunk it into the web page as a string, you're going to HTML encode that before you do that so it doesn't get owned.

00:19:54.260 --> 00:19:55.220
Right, right.

00:19:55.220 --> 00:20:04.320
So if you have user input or anything like that, you're going to make sure it's safe to display to people without them being able to inject unsafe code into their browser.

00:20:04.320 --> 00:20:07.640
And so it's just a very fast implementation of that.

00:20:07.640 --> 00:20:10.720
And plenty of other projects use it behind the scenes.

00:20:10.720 --> 00:20:11.820
Okay, that's interesting.

00:20:11.820 --> 00:20:15.020
But I think Django might even use it.

00:20:15.020 --> 00:20:17.780
Yeah, you can go to the Insights on GitHub now.

00:20:17.780 --> 00:20:20.900
Or just their requirements at DXT.

00:20:20.900 --> 00:20:23.860
But yeah, and then we have It's Dangerous as well, right?

00:20:24.300 --> 00:20:26.160
Yeah, so It's Dangerous is the last one.

00:20:26.160 --> 00:20:30.240
And that's just a way to securely sign messages.

00:20:30.240 --> 00:20:34.440
And I know there's other solutions out there now, like JWT, that sort of thing.

00:20:34.440 --> 00:20:37.100
But those didn't really exist at the time this was written.

00:20:37.100 --> 00:20:39.420
And this is a lot simpler than JWT.

00:20:39.420 --> 00:20:42.620
So basically, it's kind of like JSON.dumpS.

00:20:42.620 --> 00:20:43.060
Yeah.

00:20:43.060 --> 00:20:46.200
Just throw out some data, and it will dump it into a JSON string.

00:20:46.200 --> 00:20:51.860
Then it will also securely sign that string so that you know that it can't be tampered with.

00:20:51.860 --> 00:20:53.300
Right, tamper-proof marker.

00:20:53.380 --> 00:20:54.820
But they can't edit it.

00:20:54.820 --> 00:21:01.340
So we use it for our secure cookies and for signing things like login tokens and preset tokens.

00:21:01.340 --> 00:21:02.040
Yeah.

00:21:02.040 --> 00:21:03.660
Yeah, you don't want people tampering with that stuff.

00:21:06.240 --> 00:21:09.020
This portion of Talk Python To Me is brought to you by Linode.

00:21:09.020 --> 00:21:12.960
Are you looking for bulletproof hosting that's fast, simple, and incredibly affordable?

00:21:12.960 --> 00:21:17.900
Look past that bookstore and check out Linode at talkpython.fm/Linode.

00:21:17.900 --> 00:21:19.820
That's L-I-N-O-D-E.

00:21:19.820 --> 00:21:24.300
Plans start at just $5 a month for a dedicated server with a gig of RAM.

00:21:24.580 --> 00:21:26.840
They have 10 data centers across the globe.

00:21:26.840 --> 00:21:29.340
So no matter where you are, there's a data center near you.

00:21:29.340 --> 00:21:44.660
Whether you want to run your Python web app, host a private Git server, or file server, you'll get native SSDs on all the machines, a newly upgraded 200-gigabit network, 24-7 friendly support, even on holidays, and a seven-day money-back guarantee.

00:21:44.660 --> 00:21:47.040
Do you need a little help with your infrastructure?

00:21:47.040 --> 00:21:53.240
They even offer professional services to help you get started with architecture, migrations, and more.

00:21:53.240 --> 00:21:56.340
Get a dedicated server for free for the next four months.

00:21:56.340 --> 00:21:59.180
Just visit talkpython.fm/Linode.

00:21:59.180 --> 00:22:06.800
Then there's a few other projects that are not directly under Flask, but are under the palettes or related to palettes, right?

00:22:06.800 --> 00:22:08.560
Yeah, there's plenty of extensions.

00:22:08.560 --> 00:22:10.060
There's some that I'm involved with.

00:22:10.260 --> 00:22:17.380
Flask SQLAlchemy, which is the kind of official extension for tying SQLAlchemy's sessions with Flask sessions.

00:22:17.380 --> 00:22:32.240
There's Flask WTF, which is a wrapper around WTForms, which is a form library that lets people interact with data submitted from web pages and render those forms that submit that data, do validation, that sort of thing.

00:22:32.240 --> 00:22:38.400
So the other things I'm involved with, I wrote this library called Flask Alembic, which is kind of like Flask SQLAlchemy.

00:22:38.780 --> 00:22:44.260
It takes Alembic, which is the migration library for SQLAlchemy and wraps that in kind of the Flask configuration.

00:22:44.260 --> 00:22:45.340
That's really cool.

00:22:45.340 --> 00:22:48.180
So I don't believe we've talked about Alembic very much.

00:22:48.180 --> 00:22:58.960
We've mentioned SQLAlchemy plenty of times, but I feel like Alembic, if you're doing real production relational database stuff with SQLAlchemy, you should know about Alembic to be using it.

00:22:59.020 --> 00:23:04.060
Maybe give people a quick overview of what Flask Alembic does to that whole mix.

00:23:04.060 --> 00:23:04.680
Yeah.

00:23:04.680 --> 00:23:09.680
So I never just use SQLAlchemy unless it's just like a really quick example project.

00:23:09.680 --> 00:23:12.440
What Alembic does is it does something called migrations.

00:23:12.440 --> 00:23:26.140
So if you write your model in SQLAlchemy and you create a table in your database, if you want to change that model, the only thing SQLAlchemy lets you do is drop the table completely and then recreate it.

00:23:26.140 --> 00:23:36.400
Instead, you can run migrations, which lets you add or move columns or change data and just kind of keep version control over what your database looks like.

00:23:37.040 --> 00:23:46.440
Right. Because with these ORMs, the structure and schema of your database has to at least be a superset of exactly what you have in your SQLAlchemy definition.

00:23:46.440 --> 00:23:54.440
So if you add like a column or field to your SQLAlchemy class, it can no longer talk to your database without also adapting the database schema.

00:23:54.440 --> 00:23:54.800
Right.

00:23:54.800 --> 00:23:59.940
Right. So you need some way to tell the database there is this new column that you need to know about.

00:23:59.940 --> 00:24:01.120
And that's what Alembic does.

00:24:01.520 --> 00:24:14.980
So Flask Alembic just kind of ties Alembic, which comes with its own CLI, for example, into Flask's CLI and moves the configuration from Alembic into Flask.

00:24:14.980 --> 00:24:16.800
Just kind of a...

00:24:16.800 --> 00:24:18.220
I think so it's kind of like a wrapper.

00:24:18.220 --> 00:24:20.220
Yeah, it's a wrapper around it.

00:24:20.220 --> 00:24:23.840
Just like, I mean, mainly like Flask SQLAlchemy is for SQLAlchemy.

00:24:24.080 --> 00:24:29.140
There's another library out there called Flask Migrate, which is another wrapper around Alembic.

00:24:29.140 --> 00:24:31.720
And that one's developed by Miguel Grinberg.

00:24:31.720 --> 00:24:41.800
And we basically, from what I remember, because I developed, it was like four years ago now, but I think we developed them at basically the exact same time.

00:24:41.800 --> 00:24:44.560
Really, something like a month of each other, completely independently.

00:24:45.340 --> 00:24:51.480
His is a lot more of a direct wrapper around Alembic, which a lot of people, for a lot of people, is exactly what they need.

00:24:51.480 --> 00:24:53.280
And it's a lot more straightforward a lot of the time.

00:24:53.280 --> 00:25:01.500
Mine, on the other hand, I wanted to like be able to dig into all the internals of Alembic and like introspect exactly what was going on at any time.

00:25:01.500 --> 00:25:05.300
So it's more of a very opinionated framework on my end.

00:25:05.300 --> 00:25:07.000
And people can choose.

00:25:07.000 --> 00:25:07.240
Yeah.

00:25:07.780 --> 00:25:08.800
It's good to have options.

00:25:08.800 --> 00:25:09.560
That's really cool.

00:25:09.560 --> 00:25:18.160
Let's spend a little time talking about maybe the biggest news for Flask and that it went from, what was it, like 0.12 to 1.0?

00:25:18.160 --> 00:25:21.940
Yeah, 0.12.4 to 1.0.

00:25:21.940 --> 00:25:29.660
Well, here's a major open source project going to 1.0, which is actually, I think, really, really positive.

00:25:29.660 --> 00:25:34.560
And I think it's, I'm just super excited to see that you guys did that because it's time, I think.

00:25:34.560 --> 00:25:36.080
Oh, it was absolutely time.

00:25:36.180 --> 00:25:41.180
I mean, I was, I had been working on that, getting that happening for about a year prior to it, at least.

00:25:41.180 --> 00:25:46.800
We joked about it, this at PyCon, because Mamuta Shemi had come out with this thing called ZeroVert for ZeroVert.

00:25:46.800 --> 00:25:52.360
And making fun of projects that were still on like Zero, not something that were 10 years old and Flask was on that list.

00:25:52.360 --> 00:25:58.740
Yeah, that was actually, I didn't find out about that until after I released 1.0.

00:25:58.740 --> 00:26:01.160
And then people were like, oh, it was because of ZeroVert.

00:26:01.160 --> 00:26:02.140
No.

00:26:02.140 --> 00:26:03.640
I've been doing it.

00:26:03.640 --> 00:26:04.200
You set the record straight.

00:26:04.200 --> 00:26:05.720
This is going a lot longer before that.

00:26:05.720 --> 00:26:05.880
Yeah.

00:26:05.880 --> 00:26:06.560
ZeroVert.

00:26:06.560 --> 00:26:07.720
I was very amused by it.

00:26:07.720 --> 00:26:11.820
I was like, yeah, this is, and I actually got them to put us on the Emeritus list.

00:26:11.820 --> 00:26:12.980
Aha.

00:26:12.980 --> 00:26:13.380
Nice.

00:26:13.380 --> 00:26:16.020
So we're, we're graduated now on their website.

00:26:16.020 --> 00:26:17.640
But yeah, I've been working on it for a while.

00:26:17.920 --> 00:26:22.660
And we always have people asking like, hey, this is, this is 0.12.

00:26:22.660 --> 00:26:26.300
My boss doesn't want me to use it because it's not software.

00:26:26.300 --> 00:26:31.380
And we kept having to tell people, this has been stable for years.

00:26:32.080 --> 00:26:33.080
Nothing's really going to change.

00:26:33.080 --> 00:26:33.380
Nothing's going to change.

00:26:33.380 --> 00:26:35.740
There's no breaking bugs or anything.

00:26:35.740 --> 00:26:37.040
It's more just a number.

00:26:37.040 --> 00:26:42.120
I think for a long time I told them, just tell them it's version 12 and we misplaced to zero or something.

00:26:42.120 --> 00:26:42.820
Yeah.

00:26:42.820 --> 00:26:44.180
But yeah, we finally got it.

00:26:44.180 --> 00:26:44.600
They are.

00:26:44.600 --> 00:26:53.060
I mean, that is the impression for a lot of people, especially people coming from commercial oriented software backgrounds.

00:26:53.060 --> 00:26:57.120
I'm thinking like Microsoft shops, you know, .NET folks.

00:26:57.120 --> 00:27:00.080
I'm thinking Java and those types of people.

00:27:00.080 --> 00:27:03.300
They're just like, well, I mean, I think they even have a rule of the Microsoft shops.

00:27:03.300 --> 00:27:06.620
Like you can't use this whole version three because the first two are messed up.

00:27:06.620 --> 00:27:06.840
Right.

00:27:06.840 --> 00:27:13.180
And I just think there's so many large organizations that at least some of the folks in there have that mindset.

00:27:13.180 --> 00:27:19.420
And I think having this become one O is like a pretty big step to just sort of sidestep that conversation.

00:27:19.420 --> 00:27:20.000
Yeah.

00:27:20.000 --> 00:27:31.680
And I mean, it feels, it feels significant, even if like the actual stability of the software hasn't changed or, you know, the acceptability to use it in production environments hasn't changed really.

00:27:31.680 --> 00:27:32.380
But, you know.

00:27:32.380 --> 00:27:34.540
But there are some major changes.

00:27:34.540 --> 00:27:35.820
Oh, yeah.

00:27:35.820 --> 00:27:38.240
I mean, there's, the list is not trivial.

00:27:38.240 --> 00:27:38.840
Right.

00:27:38.840 --> 00:27:46.500
I was kind of surprised when I made that release slot or those release notes, just how much it changed.

00:27:46.640 --> 00:27:50.280
It's a lot of small things, honestly, like, but it adds up.

00:27:50.280 --> 00:27:50.800
Right.

00:27:50.800 --> 00:27:53.980
You want to talk us through some of the changes, some of the major changes?

00:27:53.980 --> 00:27:59.740
So, yeah, we dropped support for Python 2.6 and Python 3.3, which made me really happy.

00:27:59.740 --> 00:28:01.060
That's really nice.

00:28:01.060 --> 00:28:06.860
I was looking at, I was trying to use the PyPI info, which I mentioned earlier, to figure out stats about how people were using it.

00:28:06.860 --> 00:28:12.060
And I think less than 0.1% of installs were on Python 2.6.

00:28:13.060 --> 00:28:16.240
Yeah, 3.3 itself went unsupported, right?

00:28:16.240 --> 00:28:17.020
Yeah.

00:28:17.020 --> 00:28:19.180
It, like, 2.6 itself is unsupported.

00:28:19.180 --> 00:28:26.280
And in the future, I'm definitely going to be sticking with, as soon as Python drops support for a release, I'm going to drop support for it.

00:28:26.280 --> 00:28:27.240
Yeah, that makes sense.

00:28:27.240 --> 00:28:31.440
That doesn't mean we're going to, like, rip out support and, like, it's suddenly going to break.

00:28:31.440 --> 00:28:32.640
But we're not going to test on it.

00:28:32.640 --> 00:28:33.340
You know, we're going to...

00:28:33.340 --> 00:28:36.300
Not going to inject breaking changes to force it to not work.

00:28:36.300 --> 00:28:39.900
But you're going to no longer run tests and not care if it breaks it.

00:28:39.900 --> 00:28:40.540
Right.

00:28:40.540 --> 00:28:44.340
And actually, Flask 1.0 secretly supports Python 2.6.

00:28:44.340 --> 00:28:57.960
Even though I removed it a couple months before we made the release, I kept testing it internally because I wanted to give people who were deployed at least one chance to be on 1.0 before they had to make a bigger upgrade.

00:28:57.960 --> 00:28:59.500
Yeah, that was generous.

00:29:00.220 --> 00:29:03.540
Yeah, I probably shouldn't have done it in retrospective, but it's done.

00:29:03.540 --> 00:29:07.500
You talked about the versioning going 1.0, like, in the comparison to Django.

00:29:07.500 --> 00:29:12.260
Django is now in sort of this 1.0.2.0 versioning as well.

00:29:12.260 --> 00:29:14.600
And they dropped support for Python 2 altogether.

00:29:14.600 --> 00:29:18.860
Do you have plans for that outside of the deadline of 2020?

00:29:18.860 --> 00:29:19.860
Yeah.

00:29:19.860 --> 00:29:23.620
As soon as 2020 comes around, I am dropping support for Python 2.

00:29:23.620 --> 00:29:26.080
Yeah, and I think that's basically what Django said.

00:29:26.160 --> 00:29:32.500
It was like their end of life was, it was pretty far out before you could, you're fully unsupported on like an older version of Django or something.

00:29:32.500 --> 00:29:34.920
Yeah, I'm looking forward to that day.

00:29:34.920 --> 00:29:38.680
I mean, we'll still be supporting from, I think, 3.4 and up at that point.

00:29:38.680 --> 00:29:38.880
Sure.

00:29:38.880 --> 00:29:42.340
So we're still a little behind in terms of features that we're allowed to use.

00:29:42.340 --> 00:29:44.560
Right, like async and await, for example.

00:29:44.560 --> 00:29:47.780
Yeah, that's a whole other discussion that we'll get into.

00:29:47.780 --> 00:29:49.140
Yeah, yeah, for sure.

00:29:49.140 --> 00:29:50.260
Actually, it is, isn't it?

00:29:50.760 --> 00:29:54.240
But do you think it will reduce the amount of code that you have to write?

00:29:54.240 --> 00:29:59.380
Do you think it'll be easier for people to contribute if you don't have to do version checks or compatibility?

00:29:59.380 --> 00:30:02.780
I haven't really considered it in a while.

00:30:02.780 --> 00:30:07.220
I think it will cut down on, I think mostly it'll just cut down on mental overhead.

00:30:07.220 --> 00:30:09.040
Like people don't have to think about it as much.

00:30:09.040 --> 00:30:16.740
When I write code at this point, I'm so used to doing it for Flask that I just kind of, by default, write code that is compatible with both.

00:30:16.740 --> 00:30:19.660
And occasionally get a mistake that CI catches.

00:30:19.660 --> 00:30:24.720
But just having less surface to have to remember and to test, I think will be beneficial.

00:30:24.720 --> 00:30:28.620
But for the most part, there's, I mean, there's cool features that come out.

00:30:28.620 --> 00:30:33.900
But clearly all our code can be written in Python 2.7 and compatible code.

00:30:33.900 --> 00:30:41.980
Yeah, I think what's more important is that people that use Flask get to use the new features where and how they want, you know?

00:30:41.980 --> 00:30:47.740
Oh, well, people writing applications in Flask can already use Python 3.7 if they want.

00:30:47.740 --> 00:30:52.040
And they can use f-strings and what was the controversial change that got into 3.7?

00:30:52.040 --> 00:30:54.700
It's coming in 3.8.

00:30:54.700 --> 00:31:00.580
It was PEP 572, the like assignment equality thing, the inline assignment.

00:31:01.060 --> 00:31:01.560
Yeah.

00:31:01.560 --> 00:31:06.000
Hey, I'm looking forward to when Flask only supports 3.8 and up because I'm going to switch all my code to that also.

00:31:06.000 --> 00:31:07.820
I personally like the change.

00:31:07.820 --> 00:31:08.700
Yeah.

00:31:08.700 --> 00:31:09.560
Yeah, I do as well.

00:31:09.560 --> 00:31:10.440
Yeah, very nice.

00:31:10.440 --> 00:31:12.760
Okay, so another major change is the CLI.

00:31:12.760 --> 00:31:14.180
Tell us about the changes there.

00:31:14.180 --> 00:31:16.460
Yeah, so I'll talk about the CLI in a second.

00:31:16.460 --> 00:31:26.820
But basically like all the changes that are, a lot of the significant changes that went into 1.0 are, were basically me trying to make things easier for people.

00:31:27.460 --> 00:31:30.420
So easier for people to learn, easier for people to understand.

00:31:30.420 --> 00:31:36.300
So a lot of this stuff is improving documentation, better error messages, and then a better CLI also.

00:31:36.300 --> 00:31:48.300
So we did a lot of work on improving how the Flask command, which is like the recommended way to run the development server while you're working, how it detects your application.

00:31:48.700 --> 00:31:52.700
So when you write code, you just write app equals Flask somewhere in your code.

00:31:52.700 --> 00:31:59.260
And there's even a common pattern called the factory, the application factory, where you write a function that creates your application.

00:31:59.260 --> 00:32:02.580
So you never actually have an instance of your application where you code.

00:32:02.580 --> 00:32:05.320
That's what the server is in charge of setting up.

00:32:05.320 --> 00:32:16.640
And so we did a lot of work to improve how the CLI can detect where your application is, what it's called, how it should be imported, and if it's behind a factory or not.

00:32:16.760 --> 00:32:23.600
So that the command can just, like everything will just work when you're writing it, instead of having to set up some extra glue in between.

00:32:23.600 --> 00:32:24.560
Yeah, that's cool.

00:32:25.200 --> 00:32:33.920
So you no longer have to say set the Flask underscore EMV, no, the Flask debug rather, or the Flask app environment variables, right?

00:32:33.920 --> 00:32:35.560
It can detect some of that stuff automatically.

00:32:35.560 --> 00:32:36.260
Yeah.

00:32:36.260 --> 00:32:46.540
A lot of the times for like really for simple applications, which is really useful for tutorials, especially like Flask app will just know that you have an app, you have a file called app.py.

00:32:46.540 --> 00:32:48.360
That's where your application is.

00:32:48.360 --> 00:32:49.000
I'll just look there.

00:32:49.000 --> 00:32:53.320
You do still have to set Flask app in most significant cases.

00:32:53.320 --> 00:33:02.180
Like once you're writing a big application, you know, a more significant application, you'll probably have to tell it like at least where the, which files are important, but nothing.

00:33:04.680 --> 00:33:08.340
This portion of Talk Python To Me is brought to you by 10x Agent On Demand.

00:33:08.340 --> 00:33:09.220
Here's a guess.

00:33:09.220 --> 00:33:12.380
If you're listening to my podcast, you're likely a Python pro.

00:33:12.380 --> 00:33:14.880
You may be even pretty well paid to code in it.

00:33:14.880 --> 00:33:15.960
Here's another guess.

00:33:15.960 --> 00:33:18.160
You likely aren't being paid what you're worth.

00:33:18.160 --> 00:33:18.740
Why?

00:33:18.740 --> 00:33:21.000
Because negotiating isn't your thing.

00:33:21.000 --> 00:33:25.240
Even the best tech talent can get taken advantage of when negotiating their comp packages.

00:33:25.240 --> 00:33:26.640
Don't let this happen to you.

00:33:26.640 --> 00:33:33.320
10x Agent On Demand has negotiated more than $50 million worth of deals for senior level tech talent just like you.

00:33:33.500 --> 00:33:39.060
When you've got a job offer at hand or expecting one soon, contact 10x and they'll help you level the playing field.

00:33:39.060 --> 00:33:46.460
Just visit talkpython.fm/10x when you're ready to roll and mention Python for a three 30-minute consultation.

00:33:46.460 --> 00:33:48.260
10x Agent On Demand.

00:33:48.260 --> 00:33:50.800
You handle the tech, they'll handle the negotiation.

00:33:50.800 --> 00:33:56.120
Another thing, actually, I think this was a, wasn't a warning message.

00:33:56.120 --> 00:34:01.220
It was like an info message when I ran Flask recently that I had a virtual environment named .env.

00:34:01.420 --> 00:34:06.380
And it said, hey, we think we can help you with some files that are hanging out in this .env thing.

00:34:06.380 --> 00:34:07.040
Yeah.

00:34:07.040 --> 00:34:09.140
So maybe tell us about the python.env.

00:34:09.140 --> 00:34:09.880
Yeah.

00:34:09.880 --> 00:34:18.380
So as part of the CLI improvements, we also, previously when you were using the CLI, you had to kind of type these environment variables in every time you opened a terminal.

00:34:18.580 --> 00:34:23.680
So you had to tell it like export Flask app equals, you know, my app, export Flask app equals development.

00:34:23.680 --> 00:34:34.860
And so we integrated python.env, which is a library that reads these .env files and automatically sets up your environment variables based on it.

00:34:35.100 --> 00:34:37.900
So people can just have one of these sitting in their project.

00:34:37.900 --> 00:34:43.580
And they won't have to set up their terminal every time they start working on the project again.

00:34:43.580 --> 00:34:44.540
Yeah, that's really cool.

00:34:44.540 --> 00:34:49.920
One thing I recently learned is the script that activates virtual environments.

00:34:49.920 --> 00:34:52.020
You can export stuff from there.

00:34:52.020 --> 00:34:53.660
You know, you set every virtual environment.

00:34:53.660 --> 00:34:55.700
Go in there and sort of configure your virtual environment.

00:34:55.700 --> 00:35:02.360
So in addition to just having the packages you want, it also kind of kicks off with the right environment variables, which is handy.

00:35:02.360 --> 00:35:07.080
The downside of that, and we do have that listed in our CLI documentation.

00:35:07.080 --> 00:35:08.660
Like this is an option.

00:35:08.660 --> 00:35:11.320
You're using virtual lines, go edit your activate script.

00:35:11.320 --> 00:35:18.340
But the downside of that is if you have multiple people developing or if you're on multiple machines, you know, and you recreate your virtual line.

00:35:18.340 --> 00:35:21.240
If you suddenly don't have that stuff and so it doesn't work again.

00:35:21.240 --> 00:35:21.860
Right.

00:35:21.860 --> 00:35:22.160
Right.

00:35:22.160 --> 00:35:25.060
It's a pain in the CLI, sorry, in continuous integration.

00:35:25.060 --> 00:35:32.460
And also you can check your .flask env into source control, whereas you can't, you shouldn't check your virtual environment into.

00:35:32.460 --> 00:35:33.180
Yeah.

00:35:33.180 --> 00:35:38.440
If you've managed to check your virtual env into Git and it works somewhere else, that's amazing.

00:35:38.440 --> 00:35:40.220
Yeah, exactly.

00:35:40.220 --> 00:35:43.460
A lot of stuff has to line up just so for that dork, right?

00:35:43.460 --> 00:35:44.080
Nice.

00:35:44.080 --> 00:35:44.340
Okay.

00:35:44.340 --> 00:35:45.800
Another one, another big change.

00:35:45.800 --> 00:35:49.880
I thought this was pretty cool is it's got to help people when they're testing for performance.

00:35:50.000 --> 00:35:53.920
And how's my app going to behave when I ship it to production?

00:35:53.920 --> 00:35:56.560
Is the development server is now multi-threaded by default?

00:35:56.560 --> 00:35:57.020
Yeah.

00:35:57.020 --> 00:36:04.800
So the development server actually had threading previously pretty much for its entire existence, but you had to explicitly enable it.

00:36:04.800 --> 00:36:09.200
So you had to say like when you were starting, you had to say like threading equals true or something.

00:36:09.740 --> 00:36:10.000
Right.

00:36:10.000 --> 00:36:19.140
And so now people were just always running into things like, hey, I'm trying to serve some media and like make an API request at the same time.

00:36:19.140 --> 00:36:20.180
And suddenly it's hanging.

00:36:20.180 --> 00:36:23.720
Well, that's because the dev server would only handle one request at a time.

00:36:23.720 --> 00:36:27.260
But we decided to go, let's just enable threading by default.

00:36:27.660 --> 00:36:37.060
It makes some things more difficult to reason about, but debuggers nowadays are pretty good at figuring out, you know, what threads are running and where to do breakpoints and all that.

00:36:37.060 --> 00:36:38.360
I think it's a good change.

00:36:38.360 --> 00:36:40.520
I mean, we're living in a multi-threaded world, right?

00:36:40.520 --> 00:36:41.460
A multi-core world.

00:36:41.940 --> 00:36:50.620
That's actually one of the big kind of hidden bugs that needs, or not bugs, but things that needs to be improved in Fairkzweig now.

00:36:50.620 --> 00:36:57.960
Because we're threaded by default, Fairkzweig has this nice debugger that pops up the traceback and lets you interact with it when there's an error.

00:36:57.960 --> 00:37:00.340
But it only works in single threaded environments.

00:37:00.340 --> 00:37:04.060
It'll still output correctly.

00:37:04.060 --> 00:37:10.660
But if you have multiple requests going on at the same time and you try to interact with the traceback, you might just get like junk data back.

00:37:10.940 --> 00:37:16.460
And so figuring out how to get that working in a threaded environment is actually on my to-do list.

00:37:16.460 --> 00:37:18.240
It still works for us.

00:37:18.240 --> 00:37:18.420
Yeah.

00:37:18.420 --> 00:37:19.700
It's not like a huge issue.

00:37:19.700 --> 00:37:19.860
Yeah.

00:37:19.860 --> 00:37:26.160
How many people are actually interacting with the debugger and hitting concurrency at, you know, exactly that moment, right?

00:37:26.160 --> 00:37:26.480
Probably.

00:37:26.480 --> 00:37:27.820
Very few.

00:37:27.820 --> 00:37:31.000
I think we got a couple people who reported it.

00:37:31.000 --> 00:37:35.240
And I just said, you know, you just kind of try to make your thing synchronous when you're debugging a list.

00:37:35.240 --> 00:37:36.360
Right, right.

00:37:36.360 --> 00:37:38.180
Use this command line that makes it not threaded.

00:37:38.180 --> 00:37:39.240
Yeah.

00:37:40.180 --> 00:37:45.560
So there's still things to be fixed, but we're basically trying to improve the 80% case, right?

00:37:45.560 --> 00:37:52.020
Like the 80% of the time you're going to have this and then we can fix the, or whatever that's saying is, 90, 90, 10 or something.

00:37:52.020 --> 00:37:52.760
Yeah, yeah.

00:37:52.760 --> 00:37:56.240
Get people to fall into the best case scenario most of the time.

00:37:56.240 --> 00:37:56.720
Right.

00:37:57.500 --> 00:38:02.020
So another thing that changed is accessing missing keys from request.form.

00:38:02.020 --> 00:38:02.740
Yes.

00:38:02.740 --> 00:38:03.280
That was...

00:38:03.280 --> 00:38:05.360
That's one of your error message type things, right?

00:38:05.360 --> 00:38:06.160
Right.

00:38:06.160 --> 00:38:06.460
Yeah.

00:38:06.460 --> 00:38:07.560
So we had a couple of things.

00:38:07.560 --> 00:38:14.300
So basically the way Flask looked up error handlers and reported errors was improved.

00:38:14.460 --> 00:38:16.880
So it's more consistent in more cases.

00:38:16.880 --> 00:38:19.840
And as part of that, I noticed that...

00:38:19.840 --> 00:38:30.400
And this is an issue that comes up on Stack Overflow all the time is like, hey, I tried to access, you know, request.form name and I got a 400 error.

00:38:31.600 --> 00:38:32.080
Why?

00:38:32.080 --> 00:38:38.000
Well, the answer is because you didn't submit a form field called name.

00:38:38.000 --> 00:38:40.680
But we don't tell you that we...

00:38:40.680 --> 00:38:43.320
Like the dev server never told you that.

00:38:43.320 --> 00:38:53.380
I guess if you're deeply familiar with status codes, you would know that 400 means something is wrong with the data you submitted, but it's still not even obvious there, right?

00:38:53.380 --> 00:38:53.960
Yeah.

00:38:54.040 --> 00:39:03.940
So now when you're running in debug mode, the error, we still raise the same error, but I inject some extra information into it about like, hey, you tried to access this key and it wasn't there.

00:39:03.940 --> 00:39:07.420
So go check your HTML and see if it's...

00:39:07.420 --> 00:39:08.960
If you're sending what you expect.

00:39:08.960 --> 00:39:09.680
Yeah.

00:39:09.680 --> 00:39:10.220
That's cool.

00:39:10.220 --> 00:39:11.740
Like that could be the difference from...

00:39:11.740 --> 00:39:12.420
Oh yeah, of course.

00:39:12.420 --> 00:39:15.940
I'll check my HTML versus hunting Stack Overflow.

00:39:15.940 --> 00:39:16.620
Yeah.

00:39:16.620 --> 00:39:23.180
Now I know like Stack Overflow probably isn't the best metric for this, but like we still get plenty of questions about like,

00:39:23.360 --> 00:39:24.820
why am I getting a 400 error?

00:39:24.820 --> 00:39:30.380
Like I've even gotten questions with the error message saying you're missing this key right there in the question.

00:39:30.380 --> 00:39:33.680
So like I'm not going to, you know, solve everybody's problems, but it's a lot clearer.

00:39:33.680 --> 00:39:36.840
And that was basically the number one problem that I always saw.

00:39:36.840 --> 00:39:37.240
Yeah.

00:39:37.240 --> 00:39:38.760
I'm seeing it less at least.

00:39:38.760 --> 00:39:40.920
Yeah, it'll definitely be less.

00:39:40.920 --> 00:39:42.860
That's cool.

00:39:42.860 --> 00:39:47.700
I mean, you're never going to solve the problem of somebody just sees it doesn't work.

00:39:47.700 --> 00:39:51.860
I'm just going to Stack Overflow and pasting the error and not reading through it and thinking through it.

00:39:51.860 --> 00:39:54.360
Or, you know, maybe they're just so new they don't make sense of...

00:39:54.360 --> 00:39:55.520
They don't see what should be obvious.

00:39:55.520 --> 00:39:55.860
Sure.

00:39:55.860 --> 00:39:59.080
I mean, there's still a lot of information, even if that's at the bottom, you know.

00:39:59.080 --> 00:40:00.780
So I understand, obviously.

00:40:00.780 --> 00:40:01.220
Yeah.

00:40:01.220 --> 00:40:02.080
Yeah, yeah.

00:40:02.080 --> 00:40:02.640
For sure.

00:40:02.640 --> 00:40:03.660
Let's see.

00:40:03.660 --> 00:40:05.600
You changed error handlers a little bit.

00:40:05.700 --> 00:40:10.460
Like the thing that will run if, say, there's a 400 bad request or a 404 or something like that?

00:40:10.460 --> 00:40:11.980
That's more of an internal change.

00:40:11.980 --> 00:40:13.460
Like, I don't think most people noticed.

00:40:13.460 --> 00:40:16.420
But technically, when you've raised...

00:40:16.420 --> 00:40:27.700
You can register error handlers on Flask and on the blueprints inside of it so that when certain errors are raised, they'll be handled by those instead of causing a 500 exception, you know, to be sent to the browser.

00:40:28.260 --> 00:40:33.920
And in certain cases or for certain types of exceptions, the behavior was just kind of inconsistent.

00:40:33.920 --> 00:40:35.380
And so we kind of...

00:40:35.380 --> 00:40:38.420
We just went back and looked, like, how is this actually working?

00:40:38.420 --> 00:40:40.900
Oh, there's, like, this mess of different if statements.

00:40:40.900 --> 00:40:43.000
Well, let's just, like, simplify that.

00:40:43.000 --> 00:40:47.140
So there's, like, a strict set of rules that it goes through now and it's documented and all that.

00:40:47.400 --> 00:40:47.860
Yeah, that's cool.

00:40:47.860 --> 00:41:01.100
So one thing that you just mentioned that I think is worth touching on a little bit for the listeners, a lot of the frameworks, it's a little easier to partition your view methods into different files and categorize them and stuff.

00:41:01.100 --> 00:41:04.940
Because you just take a static decorator that comes out of, say, like, Pyramid.

00:41:04.940 --> 00:41:06.980
You say, at view config and you just drop it there.

00:41:06.980 --> 00:41:10.040
In Flask, you create the app and then you say app.route.

00:41:10.040 --> 00:41:15.020
And so in order to split that stuff apart, you have to pass that app around in certain ways.

00:41:15.260 --> 00:41:19.000
But then you also have blueprints, which really simplify that.

00:41:19.000 --> 00:41:24.140
Do you want to just tell people real quickly who maybe only know about app.route, about blueprints and, like, that problem solves?

00:41:24.140 --> 00:41:24.800
Yeah.

00:41:24.800 --> 00:41:33.040
So I mentioned the application factory pattern earlier, where you don't actually ever have an instance of your application when you're coding.

00:41:33.040 --> 00:41:34.800
You have a function that creates it.

00:41:34.800 --> 00:41:44.140
And that's actually the recommended way to use Flask in the official tutorial now is use an application factory because it solves a lot of problems that people run into, even if it's a little more confusing.

00:41:44.940 --> 00:41:52.520
But one of the problems with using that is, well, you can't just decorate your function, view function, with at app.route anymore because you don't have app.

00:41:52.520 --> 00:42:01.740
So instead, Flask has this thing called blueprints, which are basically ways to defer calling app.route.

00:42:01.940 --> 00:42:04.000
So you call blueprint.route.

00:42:04.000 --> 00:42:07.100
And that just kind of registers, like, hey, this is here.

00:42:07.100 --> 00:42:16.340
And now later, when you have your application and you register the blueprint with your application, take all those deferred registrations and perform them now.

00:42:16.560 --> 00:42:19.660
And so you don't have to have access to the application.

00:42:19.660 --> 00:42:28.640
You can split your code up into different modules so that all the stuff about users is over here and all the stuff about blog posts is over here.

00:42:28.640 --> 00:42:31.800
You don't have to worry about circular imports or any of that.

00:42:31.800 --> 00:42:32.440
Right.

00:42:32.440 --> 00:42:33.120
And that has been tricky.

00:42:33.120 --> 00:42:35.200
And I think the blueprint stuff is really beautiful.

00:42:35.200 --> 00:42:39.620
It just makes it so much easier to partition your code in a more healthy way for large apps.

00:42:40.020 --> 00:42:41.420
Yeah, it's a really good pattern.

00:42:41.420 --> 00:42:42.880
And that's why I tried to...

00:42:42.880 --> 00:42:44.600
It's something that confuses a lot of users.

00:42:44.600 --> 00:42:48.400
I think they expect more of it than it actually does.

00:42:48.400 --> 00:42:53.520
Like you said, it's a pretty straightforward, or it's a pretty simple pattern.

00:42:53.520 --> 00:42:55.740
It just defers calls.

00:42:55.740 --> 00:42:56.760
Yeah.

00:42:56.760 --> 00:42:59.220
So people are doing Flask and they don't know about blueprints.

00:42:59.220 --> 00:43:01.700
They should go spend the five minutes and learn about it.

00:43:01.700 --> 00:43:02.220
Yeah.

00:43:02.220 --> 00:43:03.380
Read the official tutorial.

00:43:03.380 --> 00:43:06.080
Flask.poku.org slash docs slash tutorial.

00:43:06.080 --> 00:43:10.000
It'll walk you through an application factory, making a blueprint, all that.

00:43:10.000 --> 00:43:10.400
Yeah.

00:43:10.400 --> 00:43:10.740
Yeah.

00:43:10.740 --> 00:43:11.120
Very cool.

00:43:11.120 --> 00:43:15.200
Another thing that changed in Flask 1.0 is the testing got a little easier.

00:43:15.200 --> 00:43:16.080
Testing.

00:43:16.080 --> 00:43:22.560
A test client having a JSON request and then also get JSON for response, right?

00:43:22.560 --> 00:43:27.020
This was kind of like another one of those like, hey, there's an inconsistency here.

00:43:27.020 --> 00:43:28.420
You could test JSON before.

00:43:28.420 --> 00:43:30.120
I mean, there's a lot of people did.

00:43:30.120 --> 00:43:36.080
But the request object that Flask gives you, like when requests come into your views, has this

00:43:36.080 --> 00:43:36.900
JSON property.

00:43:37.980 --> 00:43:42.640
And it basically automatically parses JSON from the request.

00:43:42.640 --> 00:43:43.020
Right.

00:43:43.020 --> 00:43:46.020
A dictionary pops out if it has JSON text inside.

00:43:46.020 --> 00:43:49.000
And so people kept expecting that to work when they were testing.

00:43:49.000 --> 00:43:52.880
So they would make a request with the test client, get a response object back.

00:43:52.880 --> 00:43:57.040
And unlike for the request object, the response object didn't have that.

00:43:57.040 --> 00:43:57.900
And so they'd call JSON.

00:43:57.900 --> 00:43:58.620
It wouldn't work.

00:43:59.100 --> 00:44:03.880
And then they would have to like go get the raw bytes and pass it to JSON.loads.

00:44:03.880 --> 00:44:06.900
And some people would use Flask JSON implementation.

00:44:06.900 --> 00:44:08.960
Some people would use Pythons.

00:44:08.960 --> 00:44:10.860
So we just made it consistent.

00:44:10.860 --> 00:44:16.560
So you can now get JSON from the response just like you can get it from the request body.

00:44:17.320 --> 00:44:19.860
And similarly, a lot of people expected.

00:44:19.860 --> 00:44:23.080
So we have this test client where you can just make a request.

00:44:23.080 --> 00:44:25.820
Like you can make a fake request without running the server.

00:44:25.820 --> 00:44:28.920
And it'll generate like the correct environment behind the scenes.

00:44:28.920 --> 00:44:32.260
And so you just say like I'm going to request, you know, slash users.

00:44:32.260 --> 00:44:37.060
And I'm going to pass, you know, name equals David to the form.

00:44:37.360 --> 00:44:38.780
But there was no clear way to.

00:44:38.780 --> 00:44:42.240
So it looked kind of like Python requests, the library, right?

00:44:42.240 --> 00:44:47.940
Like so you would make it like requests.get, you know, data equals name equals David, right?

00:44:47.940 --> 00:44:53.720
But so people were expecting it to kind of work like requests, be able to pass JSON equals, which you couldn't do.

00:44:53.720 --> 00:44:55.340
So you had to encode the JSON yourself.

00:44:55.340 --> 00:45:03.180
And so now you can just, if you want to test your JSON API, you can use the test client and just do JSON equals this data structure.

00:45:03.180 --> 00:45:04.300
Yeah, that's cool.

00:45:04.820 --> 00:45:08.000
Another thing around that is the test CLI runner.

00:45:08.000 --> 00:45:08.900
Oh, right.

00:45:08.900 --> 00:45:09.160
Yeah.

00:45:09.160 --> 00:45:11.700
So, so there's another testing thing.

00:45:11.700 --> 00:45:18.280
So we have this test client, which makes requests, but we didn't really ever document how to test CLI commands.

00:45:18.280 --> 00:45:24.420
And I mean, one of the, one of the selling points of the Flask CLI is that you can add your own commands.

00:45:24.420 --> 00:45:33.160
So if you want to like add a user management command, like, hey, have a create user command that I can run on the background to like add the admin user when I'm deploying.

00:45:33.660 --> 00:45:35.200
There was no way to really test that.

00:45:35.200 --> 00:45:37.280
Like it was documented in clicks documentation.

00:45:37.280 --> 00:45:45.680
But even with that, it wasn't really clear how to get Flask, Flask's like CLI object working in a test framework.

00:45:45.680 --> 00:45:50.320
So we have, you know, have this test CLI runner that kind of mirrors the test client.

00:45:50.320 --> 00:45:52.260
So you can test the CLI code.

00:45:52.260 --> 00:45:53.220
Yeah, that's great.

00:45:54.000 --> 00:45:58.680
So I feel like that's the main items that I saw that are pretty interesting.

00:45:58.680 --> 00:46:01.400
Anything else that you want to tell people about 1.0?

00:46:01.400 --> 00:46:02.840
I think that was the big stuff.

00:46:02.840 --> 00:46:04.120
Yeah, I think so as well.

00:46:04.120 --> 00:46:06.080
I mean, you can go look at the full changelog.

00:46:06.080 --> 00:46:07.120
It's pretty impressive.

00:46:07.120 --> 00:46:10.860
I think it's like two pages long on my screen vertically.

00:46:10.860 --> 00:46:12.900
That's awesome.

00:46:12.900 --> 00:46:15.180
But yeah, these seem like a lot of great changes.

00:46:15.180 --> 00:46:19.820
And what do you say for people who are thinking about upgrading, like maybe they've got Flask

00:46:19.820 --> 00:46:21.820
equal equal, you know, 0.11.

00:46:21.820 --> 00:46:23.380
They're afraid of change.

00:46:23.380 --> 00:46:24.960
And they don't want to change it.

00:46:24.960 --> 00:46:26.020
Should they change?

00:46:26.020 --> 00:46:27.780
And what would they get from doing so?

00:46:27.780 --> 00:46:33.100
They should absolutely upgrade, especially if they're on 0.11, because that's a couple of

00:46:33.100 --> 00:46:33.220
years.

00:46:33.220 --> 00:46:35.200
I was thinking of a pretty out of date version.

00:46:35.200 --> 00:46:35.380
Yeah.

00:46:35.380 --> 00:46:35.840
When I said that.

00:46:35.920 --> 00:46:39.820
Yeah, one of the reasons to upgrade if nothing else is just to continue to get support.

00:46:39.820 --> 00:46:45.440
Just kind of due to the size of our organization, we don't really offer support on old versions.

00:46:45.440 --> 00:46:50.880
Like I will do security fixes for 0.12 until 1.1 comes out.

00:46:50.880 --> 00:46:53.480
But nothing besides that.

00:46:53.480 --> 00:46:54.260
Right.

00:46:54.260 --> 00:46:59.900
So if there's a problem and somebody has a 0.11, the official answer is you want to fix

00:46:59.900 --> 00:47:01.940
that, make that problem go away, you install one, right?

00:47:01.940 --> 00:47:03.220
Yes, install one.

00:47:03.300 --> 00:47:06.940
And even if you're on 0.12, there's no real reason to stay on it at this point.

00:47:06.940 --> 00:47:12.220
Luckily, what I've heard from various users, like when I was at PyCon, Flask 1.0 had just

00:47:12.220 --> 00:47:15.640
been released and people were already telling me, yeah, I upgraded.

00:47:15.640 --> 00:47:17.840
And it was literally just changing the version number.

00:47:17.840 --> 00:47:18.600
Everything worked.

00:47:18.600 --> 00:47:19.500
Right.

00:47:19.500 --> 00:47:26.160
There are some things that changed a little bit, but they're rarer cases and it's documented

00:47:26.160 --> 00:47:30.100
on the change log and it's pretty obvious when it fails, like, oh, this thing got renamed.

00:47:30.100 --> 00:47:31.000
Right.

00:47:31.000 --> 00:47:32.860
So there's not a whole lot of work to upgrading.

00:47:33.380 --> 00:47:33.640
No.

00:47:33.640 --> 00:47:34.460
All right.

00:47:34.460 --> 00:47:34.760
Excellent.

00:47:34.760 --> 00:47:35.620
That's good to hear.

00:47:35.620 --> 00:47:42.540
So one of the things that I thought was interesting is you talked about on the Pallet's organization

00:47:42.540 --> 00:47:47.420
website about being part of the PSF's fiscal sponsorship program.

00:47:47.420 --> 00:47:50.820
If people want to support Flask, maybe you want to tell them about that program and how

00:47:50.820 --> 00:47:51.220
they can help.

00:47:51.220 --> 00:47:51.860
Sure.

00:47:51.860 --> 00:47:53.140
It's really cool.

00:47:53.140 --> 00:47:54.420
It's also really new.

00:47:54.420 --> 00:47:57.200
So I might not be the best spokesperson for it yet.

00:47:57.200 --> 00:47:58.560
I hadn't heard of it before.

00:47:58.560 --> 00:48:00.820
I'm like, oh, we should talk about this just so people know it's out there.

00:48:00.820 --> 00:48:01.300
Yeah.

00:48:01.300 --> 00:48:06.300
So, I mean, this is a little bit of advertising for the PSF also, but they have this program

00:48:06.300 --> 00:48:07.880
called the fiscal sponsorship program.

00:48:08.200 --> 00:48:12.880
They were mostly using it for meetups at the time that I tried to get in.

00:48:12.880 --> 00:48:18.160
And basically what it is, is you submit your organization and they accept you.

00:48:18.160 --> 00:48:21.820
Or if they accept you, you become part of the PSF essentially.

00:48:21.980 --> 00:48:25.440
So you gain their, their nonprofit status.

00:48:25.440 --> 00:48:31.680
They will help you out with certain logistics and they will also set up a donation page for

00:48:31.680 --> 00:48:36.060
you and a bank account for you that they'll manage, which was great for me because it's

00:48:36.060 --> 00:48:38.500
not something that I have any experience with.

00:48:38.500 --> 00:48:42.400
And, but I did want to be able to start taking donations for Flask.

00:48:42.400 --> 00:48:47.080
So yeah, I've reached out to them because I saw that somebody pointed out this program.

00:48:47.080 --> 00:48:51.760
And when I reached out to them almost a year and a half ago now, I think they only, they

00:48:51.760 --> 00:48:56.020
didn't have this set up for developer organizations like pallets yet.

00:48:56.020 --> 00:49:02.020
So we were kind of their test project and we got into this program right as a, right before

00:49:02.020 --> 00:49:02.400
PyCon.

00:49:02.400 --> 00:49:07.980
And then I think they've accepted a couple more projects since then or kind of like in parallel

00:49:07.980 --> 00:49:08.520
with us.

00:49:08.520 --> 00:49:11.360
So we now have a donations page.

00:49:11.360 --> 00:49:16.420
You can go to palletsprojects.com slash donate, and that'll redirect you to the right place.

00:49:16.420 --> 00:49:20.360
Let's see, take PayPal or checks to one time or recurring payments.

00:49:20.360 --> 00:49:24.760
And we're basically just trying to raise money to support the community.

00:49:24.760 --> 00:49:27.860
And I'm not a hundred percent sure what that means yet.

00:49:27.860 --> 00:49:29.240
I have some vague plans.

00:49:29.240 --> 00:49:34.280
We want to be able to support maybe if you want to have a meetup that sprints on Flask,

00:49:34.280 --> 00:49:35.880
for example, we can sponsor that.

00:49:35.880 --> 00:49:38.520
You know, maybe we sponsored pizza or something, right?

00:49:38.520 --> 00:49:45.060
Or recognizing people, you know, outstanding contributors in the community, sort of like Google

00:49:45.060 --> 00:49:45.580
does, right?

00:49:45.580 --> 00:49:46.640
So Google has that.

00:49:46.640 --> 00:49:49.800
I don't know the name of the program, but they recognize developers every year.

00:49:49.800 --> 00:49:51.520
And so we were thinking that would be a cool way to do it.

00:49:51.520 --> 00:49:56.180
And maybe, you know, further down the line, being able to have a Flask conference.

00:49:56.180 --> 00:49:57.940
And besides...

00:49:57.940 --> 00:49:58.400
Really good.

00:49:58.400 --> 00:49:58.980
Yeah.

00:49:58.980 --> 00:49:59.240
Yeah.

00:49:59.240 --> 00:50:01.880
So those are kind of like outward facing.

00:50:01.880 --> 00:50:07.900
And then the other thing donations would support be getting the current maintainers to more conferences

00:50:07.900 --> 00:50:12.940
so we can run sprints in person and supporting our infrastructure and all that sort of thing.

00:50:12.940 --> 00:50:13.260
Yeah.

00:50:13.260 --> 00:50:13.560
I know.

00:50:13.560 --> 00:50:19.540
I'm pretty sure it was NumPy that had this, like one of the scientific groups basically...

00:50:19.540 --> 00:50:21.020
Oh no, I think it was PyPy.

00:50:21.020 --> 00:50:25.700
Anyway, one of these groups, basically a lot of contributors had never met and they had taken

00:50:25.700 --> 00:50:29.420
their donations and they use it to get the contributors physically together.

00:50:29.580 --> 00:50:33.940
Maybe like you said, at like another conference, like PyCon US or EuroPython or something.

00:50:33.940 --> 00:50:35.780
And it seemed like it made a really big difference.

00:50:35.780 --> 00:50:37.860
That's absolutely something I want to do eventually.

00:50:37.860 --> 00:50:44.000
Like I've never met Armin or Adrian or Marcus in person who are the other core contributors,

00:50:44.000 --> 00:50:48.020
mostly because they're in Europe and I'm over in California.

00:50:48.020 --> 00:50:51.620
So it's a little difficult to find the time and money to do that.

00:50:51.620 --> 00:50:55.300
And being able to get us all in the same room, I think would be very productive.

00:50:55.760 --> 00:50:56.920
Yeah, I think so as well.

00:50:56.920 --> 00:51:02.180
And let me just put a plea out there or a comment out there for folks who work for companies

00:51:02.180 --> 00:51:10.040
that are large, successful companies that depend on their technology and that technology

00:51:10.040 --> 00:51:11.960
significantly involves Flask.

00:51:11.960 --> 00:51:19.580
I think there's so many large, multi-billion dollar companies that are built on Python and

00:51:19.580 --> 00:51:22.920
some of its libraries and they don't necessarily contribute anything back.

00:51:23.060 --> 00:51:27.880
If those companies could all just contribute, it's a very, very small amount of what they

00:51:27.880 --> 00:51:31.400
pay their developers to keep the projects they depend upon healthy.

00:51:31.400 --> 00:51:33.460
That would go a huge, huge way.

00:51:33.460 --> 00:51:35.240
So people are out there in that situation.

00:51:35.240 --> 00:51:38.920
I'm not, but if they can make that happen, that'd be awesome.

00:51:38.920 --> 00:51:39.760
Absolutely.

00:51:39.760 --> 00:51:41.120
I was reaching out.

00:51:41.120 --> 00:51:45.420
That was basically my entire PyCon when I wasn't in open spaces or sprints was being on

00:51:45.420 --> 00:51:50.940
the floor going to, I actually printed out business cards, not for myself, but for pallets

00:51:50.940 --> 00:51:53.980
with the donate, the donate link on it.

00:51:53.980 --> 00:51:57.500
And I was handing them out to every single company and like saying like, Hey, do you use

00:51:57.500 --> 00:51:57.880
Flask?

00:51:57.880 --> 00:52:03.740
Turns out like 80% of the companies at PyCon use Flask or Jinja or Click.

00:52:03.740 --> 00:52:04.420
Yeah.

00:52:04.420 --> 00:52:08.380
And if they all just recurrently added a hundred or a thousand dollars, right?

00:52:08.380 --> 00:52:10.680
Like that would just change, change things dramatically.

00:52:10.680 --> 00:52:11.100
I'm sure.

00:52:11.100 --> 00:52:11.940
Oh, sure.

00:52:11.940 --> 00:52:14.980
If everybody added a hundred thousand dollars, that'd be great.

00:52:14.980 --> 00:52:16.700
A hundred or a thousand.

00:52:16.700 --> 00:52:18.180
Obviously.

00:52:18.180 --> 00:52:20.360
I don't know what we would do with that much.

00:52:20.360 --> 00:52:20.680
Gosh.

00:52:20.680 --> 00:52:21.960
Don't do that all at once.

00:52:21.960 --> 00:52:23.460
Let me, give me a year to ramp up.

00:52:23.460 --> 00:52:24.220
Yeah, exactly.

00:52:24.220 --> 00:52:27.860
It's you'll find David on an eye, his own personal Island.

00:52:27.860 --> 00:52:29.500
He's no longer working on Flask.

00:52:29.500 --> 00:52:30.100
No, just kidding.

00:52:30.100 --> 00:52:31.340
Now that'd be awesome.

00:52:31.340 --> 00:52:35.920
If we got more support for Flask and other projects that are in the same, same boat,

00:52:35.920 --> 00:52:36.240
basically.

00:52:36.300 --> 00:52:36.700
Absolutely.

00:52:36.700 --> 00:52:41.300
I think it's really important just to recognize the tools you're using and, you know, support

00:52:41.300 --> 00:52:44.540
those, support the maintainers that are already working really hard on them.

00:52:44.540 --> 00:52:48.180
And so, yeah, we're, we're starting that we've gotten, I didn't really advertise it that much

00:52:48.180 --> 00:52:52.660
after PyCon, but we've gotten a significant number of donations already just from personal

00:52:52.660 --> 00:52:53.140
donations.

00:52:53.140 --> 00:52:55.540
And it's really cool to see those notifications come in.

00:52:55.540 --> 00:53:00.120
You know, I see a little notification, like $5 was donated every time it happens.

00:53:00.120 --> 00:53:02.720
And it's, it's really nice to see that.

00:53:02.720 --> 00:53:06.200
Cause a lot of the times my experience with maintaining is, oh,

00:53:06.220 --> 00:53:07.920
there's a new bug, go fix it and stuff.

00:53:07.920 --> 00:53:09.780
You know, it's never anything like really positive.

00:53:09.780 --> 00:53:13.680
Somebody being impatient and frustrated and then they've gotten to you finally.

00:53:13.680 --> 00:53:15.760
And now you're frustration.

00:53:15.760 --> 00:53:16.140
Right.

00:53:16.140 --> 00:53:16.420
Yeah.

00:53:16.420 --> 00:53:17.000
Yeah.

00:53:17.000 --> 00:53:18.200
I hear you.

00:53:18.200 --> 00:53:22.420
So let me ask, I guess sort of a few closing thoughts here.

00:53:22.420 --> 00:53:23.400
Like what's next?

00:53:23.400 --> 00:53:26.100
Like you've got one out now, now where are you headed?

00:53:26.100 --> 00:53:31.760
I think I said this earlier, but Flask one, Oh, all the features that I want at least

00:53:31.760 --> 00:53:32.360
are in there.

00:53:32.460 --> 00:53:38.020
And I think most of the features that people ask for are easy to do with extensions at this

00:53:38.020 --> 00:53:38.260
point.

00:53:38.260 --> 00:53:42.160
That's not to say we're not going to like add anything to Flask or, but you know, it's

00:53:42.160 --> 00:53:46.460
mostly like, like I said, how can we improve people's experience with Flask?

00:53:46.460 --> 00:53:50.320
How can we make it easier for them to learn and work with it on a day-to-day basis?

00:53:50.320 --> 00:53:56.360
So improving documentation, identifying better error messages, writing more tutorials, writing

00:53:56.360 --> 00:53:57.220
better tests.

00:53:57.220 --> 00:53:59.400
That's what a lot of the focus on Flask is.

00:53:59.400 --> 00:54:06.100
There's still a lot of focus on Verixdweig and Click and Jinja for actual bugs and features

00:54:06.100 --> 00:54:06.720
to get in.

00:54:06.720 --> 00:54:11.360
Verixdweig is just never ending because there's always more HTTP RFCs coming out, you know,

00:54:11.360 --> 00:54:12.820
changes in subtle ways.

00:54:14.260 --> 00:54:15.060
It's my favorite.

00:54:15.060 --> 00:54:19.280
I've gotten so good at reading RFCs now and I'm still, I still don't like it, but.

00:54:19.280 --> 00:54:20.020
I'm sure.

00:54:20.020 --> 00:54:20.660
I'm sure.

00:54:20.660 --> 00:54:21.500
It's pretty dry stuff.

00:54:21.500 --> 00:54:28.400
So I guess the final question around this is when will I be able, if, will I ever be able

00:54:28.400 --> 00:54:29.340
to write, let me rephrase it that way.

00:54:29.340 --> 00:54:33.480
Will I ever be able to write async def index?

00:54:34.320 --> 00:54:38.440
You know, app route, async def index.

00:54:38.440 --> 00:54:39.440
Yes.

00:54:39.440 --> 00:54:45.600
I've committed to this kind of publicly, but in other places, but yes, we do want to have

00:54:45.600 --> 00:54:47.980
async support in Flask and Verixdweig.

00:54:47.980 --> 00:54:48.440
That's awesome.

00:54:48.440 --> 00:54:53.920
Getting there is going to be really difficult because we also want to maintain compatibility

00:54:53.920 --> 00:54:57.460
with Python 2.7 for at least another year and a half.

00:54:57.460 --> 00:55:00.240
We want to maintain compatibility with Python 3.4.

00:55:00.700 --> 00:55:05.620
And I think if what you told people was you have to wait until we drop support for 2.7

00:55:05.620 --> 00:55:09.580
and 3.4, that just knowing that it is coming actually would probably.

00:55:09.580 --> 00:55:14.780
I mean, honestly, even if we don't say that it's probably going to take that long to get

00:55:14.780 --> 00:55:15.020
there.

00:55:15.020 --> 00:55:16.560
There's a lot of work to do.

00:55:16.560 --> 00:55:22.220
Verixdweig is very, it makes a lot of assumptions behind the scenes about the WSGI environment.

00:55:22.220 --> 00:55:25.180
I have gotten some contributors who are interested in working on that.

00:55:25.180 --> 00:55:31.000
So there's an effort in Verixdweig to make it sans IO, which means separating the IO from

00:55:31.000 --> 00:55:34.020
the parsing so that we can kind of plug in different.

00:55:34.020 --> 00:55:34.320
Right.

00:55:34.320 --> 00:55:37.600
Then you can plug in an async layer maybe right there without really changing much.

00:55:37.600 --> 00:55:38.120
Right.

00:55:38.120 --> 00:55:43.120
And then on the Flask side of things, we're looking at ways to kind of look kind of like

00:55:43.120 --> 00:55:45.200
the two to three migration tool.

00:55:45.440 --> 00:55:49.520
We're trying to look at some sort of async to sync migration tool where we can write async

00:55:49.520 --> 00:55:53.400
code and get a version that can also work with sync code.

00:55:53.400 --> 00:55:54.280
Yeah.

00:55:54.280 --> 00:55:56.200
I think there's been some work on that in your all lib3.

00:55:56.200 --> 00:55:57.140
Nice.

00:55:57.140 --> 00:55:59.460
Have you seen the work they're doing with Quart?

00:55:59.460 --> 00:56:00.640
Yeah.

00:56:00.640 --> 00:56:07.140
So I actually reached out to Philip, who's the author of that, a couple weeks ago and said

00:56:07.140 --> 00:56:10.120
like, hey, you know, Quart can still be its own thing.

00:56:10.120 --> 00:56:12.960
But I know you were trying to be Flask compatible.

00:56:12.960 --> 00:56:15.680
Would you be interested in just making Flask async?

00:56:15.680 --> 00:56:17.860
And he was on board with that.

00:56:17.860 --> 00:56:19.780
I've met with him a couple of times.

00:56:19.780 --> 00:56:25.320
He's still working on Quart, obviously, but he's going to at least be there giving input

00:56:25.320 --> 00:56:28.600
about how we can get Flask to be in that same place.

00:56:28.600 --> 00:56:32.340
So yeah, it's definitely a cool project and excited to work on it.

00:56:32.340 --> 00:56:32.840
Yeah.

00:56:32.840 --> 00:56:35.360
If that sounds interesting, people don't know anything about it.

00:56:35.360 --> 00:56:39.980
I interviewed Philip Jones about Quart on episode 147 a little while ago.

00:56:39.980 --> 00:56:40.960
So check it out.

00:56:40.960 --> 00:56:41.320
Okay.

00:56:41.320 --> 00:56:41.860
Yeah.

00:56:42.460 --> 00:56:42.860
Yeah.

00:56:42.860 --> 00:56:45.800
I've played with it a little bit and it's pretty solid.

00:56:45.800 --> 00:56:50.520
It seems like if you could take kind of what he's doing and where you're going and blend it.

00:56:50.520 --> 00:56:51.040
Yeah.

00:56:51.040 --> 00:56:56.880
The nice thing he has going for him is he can just say, I only want to support Python 3.6

00:56:56.880 --> 00:56:57.400
and above.

00:56:57.400 --> 00:56:57.740
Yep.

00:56:57.740 --> 00:56:58.100
Yep.

00:56:58.100 --> 00:57:00.240
And I don't want to support sync at all.

00:57:00.240 --> 00:57:05.980
Or like I'll support sync in, you know, some worker threat executors, but I'm all async.

00:57:06.760 --> 00:57:11.480
And that's just not like we have to be a lot more deliberate about how we handle backwards

00:57:11.480 --> 00:57:12.940
compatibility in Flask.

00:57:12.940 --> 00:57:14.020
We will get there.

00:57:14.020 --> 00:57:19.980
Well, I'm really encouraged to hear that you're on that path, even if that path is a long journey.

00:57:20.640 --> 00:57:20.780
Yeah.

00:57:20.780 --> 00:57:26.500
And so that's definitely if some people are interested in contributing or using async code and want it in Flask,

00:57:26.500 --> 00:57:29.280
like that's definitely a place where I could use more contributors also.

00:57:29.280 --> 00:57:29.760
So.

00:57:29.760 --> 00:57:30.540
Okay.

00:57:30.540 --> 00:57:31.620
Check it out.

00:57:31.620 --> 00:57:32.640
Awesome.

00:57:32.640 --> 00:57:33.440
All right.

00:57:33.440 --> 00:57:38.820
Well, I think that's probably, we're going to leave it for Flask, but it's been great to get caught up with what you're up to.

00:57:38.820 --> 00:57:39.440
Yeah.

00:57:39.440 --> 00:57:40.380
Thanks for having me.

00:57:40.380 --> 00:57:41.180
You bet.

00:57:41.180 --> 00:57:43.820
You're not out of here without answering the two final questions though.

00:57:43.820 --> 00:57:47.900
First of all, if you're going to write some, some Flask code, what editor do you use?

00:57:47.900 --> 00:57:48.680
PyTerm.

00:57:48.680 --> 00:57:49.440
PyTerm.

00:57:49.440 --> 00:57:49.840
Professional.

00:57:49.840 --> 00:57:51.460
I love it.

00:57:51.460 --> 00:57:52.140
I'm right there with you.

00:57:52.140 --> 00:57:52.660
All right.

00:57:52.660 --> 00:57:54.160
And then notable PyPI package.

00:57:54.160 --> 00:57:55.620
We talked about six already.

00:57:55.620 --> 00:57:57.560
Flask, Werkzeug, and so on.

00:57:57.560 --> 00:57:59.580
Other ones that maybe people don't know about it.

00:57:59.580 --> 00:58:02.040
You're like, oh, you should totally check out this.

00:58:02.400 --> 00:58:04.400
So yeah, I gave this one a little bit of thought.

00:58:04.400 --> 00:58:09.340
I don't actually have the opportunity to use a lot of PyPI packages, but the ones that have

00:58:09.340 --> 00:58:14.780
been kind of in my awareness lately are one called Authlib.

00:58:14.780 --> 00:58:15.820
Okay.

00:58:15.820 --> 00:58:16.180
Okay.

00:58:16.180 --> 00:58:17.920
A-U-T-H-Lib.

00:58:17.920 --> 00:58:18.600
Yeah.

00:58:18.600 --> 00:58:18.880
Yeah.

00:58:18.880 --> 00:58:27.920
And that's like a new, very thorough implementation of OAuth and OpenID and OAuth2 client and server

00:58:27.920 --> 00:58:35.220
for Flask and Django and has all sorts of integrations with different existing OAuth implementations

00:58:35.220 --> 00:58:36.420
on different social sites.

00:58:36.420 --> 00:58:37.860
And so-

00:58:37.860 --> 00:58:38.080
Oh yeah.

00:58:38.080 --> 00:58:38.900
That looks cool.

00:58:38.900 --> 00:58:40.340
It's pretty cool.

00:58:40.340 --> 00:58:44.440
If you go look at the documentation, it's pretty incredible how thorough it is in terms

00:58:44.440 --> 00:58:48.080
of what standards it's supporting and all that.

00:58:48.080 --> 00:58:53.020
And the other one I'm looking at is Flask Talisman, which is basically-

00:58:53.020 --> 00:58:53.080
I don't know that one.

00:58:53.080 --> 00:58:53.580
What's that about?

00:58:53.580 --> 00:58:55.020
This one's really important.

00:58:55.020 --> 00:58:57.640
I think a lot of people don't really think about what it solves.

00:58:57.640 --> 00:59:04.080
And what it does is there's all these different headers that you can send in your responses to

00:59:04.080 --> 00:59:06.980
browsers that will tell the browser how to be secure.

00:59:07.360 --> 00:59:11.820
What stuff it's allowed to do and what stuff it should block from happening.

00:59:11.820 --> 00:59:14.280
And there's a lot of them out there.

00:59:14.280 --> 00:59:18.700
There's like maybe not 20, but close to 20 different headers and different configurations

00:59:18.700 --> 00:59:19.020
of them.

00:59:19.020 --> 00:59:23.680
Flask Talisman will set all this up for you for the most part and tell you like, it'll give

00:59:23.680 --> 00:59:24.840
you the secure defaults.

00:59:24.840 --> 00:59:29.600
And all you do basically is just wrap your application in the Talisman extension and it's done.

00:59:29.600 --> 00:59:32.260
Your application is just more secure.

00:59:32.260 --> 00:59:33.660
And I really like that.

00:59:33.660 --> 00:59:35.660
I'm just plugging it into all my applications now.

00:59:36.140 --> 00:59:36.580
Oh, that's cool.

00:59:36.580 --> 00:59:39.180
It looks like it comes from Google as well, which is pretty nice.

00:59:39.180 --> 00:59:42.020
Those are two really great recommendations there.

00:59:42.020 --> 00:59:44.240
And I'm definitely going to play a little more with AuthLab.

00:59:44.240 --> 00:59:46.760
I got to get some single sign on stuff going on.

00:59:46.760 --> 00:59:47.800
So that'll be great.

00:59:47.800 --> 00:59:48.700
Final call to action.

00:59:48.700 --> 00:59:51.080
People now know there's a Flask 1.0.

00:59:51.080 --> 00:59:52.020
What should they do?

00:59:52.020 --> 00:59:53.360
There's Flask 1.0.

00:59:53.360 --> 00:59:54.040
Go upgrade.

00:59:54.040 --> 00:59:58.360
Watch us on GitHub and start contributing to issues.

00:59:58.360 --> 00:59:59.380
Donate.

00:59:59.380 --> 01:00:04.680
Go to palletsprojects.com slash donate and help the maintainers all meet up maybe.

01:00:05.620 --> 01:00:06.260
That's awesome.

01:00:06.260 --> 01:00:06.620
All right.

01:00:06.620 --> 01:00:09.080
David, thanks for sharing all of what you've been up to.

01:00:09.080 --> 01:00:09.960
It's really great work.

01:00:09.960 --> 01:00:13.740
And I'm super excited to see Flask moving forward like it is.

01:00:13.740 --> 01:00:14.220
Yeah.

01:00:14.220 --> 01:00:15.200
Thanks for having me on, Michael.

01:00:15.200 --> 01:00:15.900
You bet.

01:00:15.900 --> 01:00:16.340
Talk to you later.

01:00:18.340 --> 01:00:21.040
This has been another episode of Talk Python To Me.

01:00:21.040 --> 01:00:27.540
Our guest on this episode has been David Lord, and it's been brought to you by Linode and 10x Agent on Demand.

01:00:27.540 --> 01:00:31.440
Linode is bulletproof hosting for whatever you're building with Python.

01:00:31.440 --> 01:00:35.760
Get four months free at talkpython.fm/Linode.

01:00:35.760 --> 01:00:37.540
That's L-I-N-O-D-E.

01:00:38.300 --> 01:00:45.000
When you've got a job offer in hand or are expecting one soon, contact 10x Agent on Demand, and they'll help you get the salary you deserve.

01:00:45.000 --> 01:00:49.060
Just visit talkpython.fm/10x and mention Python.

01:00:49.060 --> 01:00:51.020
Want to level up your Python?

01:00:51.440 --> 01:00:58.060
If you're just getting started, try my Python jumpstart by building 10 apps or our brand new 100 days of code in Python.

01:00:58.060 --> 01:01:01.860
And if you're interested in more than one course, be sure to check out the Everything Bundle.

01:01:01.860 --> 01:01:04.120
It's like a subscription that never expires.

01:01:04.120 --> 01:01:06.300
Be sure to subscribe to the show.

01:01:06.300 --> 01:01:08.500
Open your favorite podcatcher and search for Python.

01:01:08.500 --> 01:01:09.740
We should be right at the top.

01:01:09.740 --> 01:01:19.040
You can also find the iTunes feed at /itunes, Google Play feed at /play, and direct RSS feed at /rss on talkpython.fm.

01:01:19.040 --> 01:01:20.940
This is your host, Michael Kennedy.

01:01:21.180 --> 01:01:22.300
Thanks so much for listening.

01:01:22.300 --> 01:01:23.360
I really appreciate it.

01:01:23.360 --> 01:01:25.300
Now, get out there and write some Python code.