#115: Python for Humans projects Transcript
00:00 When you think of popular Python packages, what comes to mind?
00:03 There's a good chance that this week's guest, Kenneth Wright, wrote the package you just thought of.
00:09 He's the author of some of Python's most popular libraries, including Requests, Records, Maya, and Pipenv.
00:16 I got a chance to catch up with Kenneth at PyCon 2017 this year. Here's the story.
00:20 This is Talk Python to Me, episode 115, recorded live at PyCon on May 20, 2017.
00:27 Welcome to Talk Python to Me, a weekly podcast on Python, the language, the libraries,
00:57 the ecosystem, and the personalities.
00:59 This is your host, Michael Kennedy. Follow me on Twitter where I'm @mkennedy.
01:03 Keep up with the show and listen to past episodes at talkpython.fm, and follow the show on Twitter
01:08 via at Talk Python.
01:09 This episode is brought to you by Codeship and Hired.
01:13 Be sure to check out what they're offering during their segments. It really helps support the show.
01:18 Kenneth, welcome back to Talk Python.
01:21 Hi, Michael. Thanks for having me.
01:22 It's really nice to have you back. You always seem to have so many amazing projects.
01:26 Oh, thank you very much.
01:28 And your pulse on what's going on in the community. And we happen to be like right in the center of it.
01:33 Yes, we're here at PyCon. This is my favorite week of the year by far. It's the highlight of my life.
01:38 It's definitely a highlight for me as well. And it's the fact that I can drive to it and not fly to it.
01:42 Oh, where do you live?
01:43 I live 15 minutes from here by car.
01:45 Oh, I'm very jealous.
01:46 So that makes it quite easy.
01:48 It won't be that way next year.
01:49 No, next year is going to be a four-hour flight with no... If I'm lucky, right?
01:53 Yeah.
01:54 Yeah.
01:54 It's all good, though. I'm definitely making it there.
01:56 We'll have the Rock and Roll Hall of Fame. It'll be worth it.
01:58 It'll totally be worth it.
01:59 And, you know, there's a bunch of people that wanted to go to this one, and it's sold out, right?
02:05 Yeah, it sells out every year.
02:06 So if you guys are listening and you're like, this sounds so fun, I want to come, but it's sold out, get your tickets early.
02:11 Yep, always get your tickets early.
02:12 PyCon sells out every year.
02:13 Every year. Okay. You don't need too much of an introduction, but you've done a ton of amazing projects that we're going to talk about.
02:19 But tell people, what do you do day to day? Like, who are you?
02:22 My name is Kenneth Reitz. I'm most well known for being the creator of the Request Library, and I work for Heroku.
02:30 I'm the Python overlord at Heroku, so I'm the language owner of Heroku.
02:34 It's not the language owner of Heroku. The language owner of Python at Heroku,
02:38 meaning that everything that's related to Python, basically, that is about the Heroku product is something that I am in charge of.
02:47 I see. So if I want to deploy my Pyramid or Flask web app...
02:51 Yes. It's my job to ensure that you can.
02:53 Or decide if that's appropriate.
02:56 Yeah, exactly.
02:57 Okay. Yeah, that sounds like a pretty fun job. I've never really had a position that was at an overlord title.
03:03 Oh, I gave it to myself.
03:04 Yeah. Well, look, that's all right.
03:06 They asked me what they wanted on my business cards when I started, and I said Python overlord, so it stuck.
03:11 With the fact that they let you do it, that's awesome. That's really cool.
03:13 My official title is Senior Member of Technical Staff.
03:16 I see. That's way less fun than overlord.
03:17 I know, I know.
03:18 But no, it sounds like a pretty fun project. You like working at Heroku?
03:21 I do. I've been there for five and a half years, and I'm not planning on leaving anytime soon. It's a great company.
03:26 Yeah. You don't think this cloud computer thing, it's a fad?
03:28 No, I'd say I think we're good.
03:30 I think it's going to be around for a while, right?
03:31 Yeah, definitely. Platforms as a service is something that I think only more and more people are going to be using.
03:37 And infrastructure as a service, I think, is probably going to change a lot over the next several years, because things like Docker are coming out and becoming more ubiquitous, and there's a lot of technologies and innovation happening in that space.
03:50 And I think that platforms as a service are going to provide a stable platform for people to kind of keep their heads on straight in that world.
04:01 Yeah, that sounds really interesting. I like Docker, but I feel like we're kind of, like, Docker is an intermediate evolutionary step of something else.
04:10 Yeah, I know exactly what you mean.
04:12 Yeah?
04:12 I haven't used Docker too much. I've only done, like, little toy experiments with it or building example repos.
04:18 To me, it feels like a response to a need that exists, but it's, like, not the answer. It's just, like, the first answer.
04:27 Right, like, we have these VMs. They take too long to set up.
04:31 Too long to start.
04:33 The cache is ridiculous on your machine.
04:35 If you use Docker in any capacity, you should check your disk cache for Docker.
04:39 There's a command to do it, and it'll be, like, 30 gigs.
04:42 You know, there's a lot of room for improvement, but I have to give them a lot of credit.
04:47 The Docker format client is stellar.
04:50 It's a very nice client, and they did a lot of work to build it the right way.
04:55 Nice.
04:55 So do you guys have Docker support at Heroku?
04:58 It's not in GA yet, meaning it's not in general availability, but we do have it in beta.
05:02 Okay.
05:03 Yeah, and it's available.
05:04 You can use it in production if you'd like, and I recommend people doing that, especially if you're using scientific applications.
05:10 It works very well for that on Heroku.
05:12 So you can app get install anything you want.
05:14 You use Conda, for example.
05:15 Right, so you can have a lot of the machine learning stuff that's got lots of weird compilation all set up right on your Docker image, right?
05:22 Yeah, exactly.
05:22 Okay.
05:23 Yeah, very cool.
05:24 So maybe tell us, what's it like to deploy a Python web app to Heroku?
05:27 Git push Heroku master.
05:29 Sounds all right.
05:30 Now, so you have a requirements.txt file that you use to specify your pip requirements, and that's how we know that it's a Python app.
05:39 Okay.
05:39 And we install those requirements, and that's effectively it.
05:42 Then you have a proc file, which is standard on Heroku, which you use to say what your entry points are for your application.
05:48 So you do, like, web colon space command to start your application.
05:52 Gotcha.
05:53 Okay. Yeah, sounds very cool.
05:54 And that's all you need.
05:55 Yeah, so that's maybe a good segue over to the projects that you're working on.
05:58 Like, you've been doing some stuff trying to make virtual environments or environments in general better, right?
06:02 Yes, yes.
06:03 I'm working on a project right now called pip Env.
06:05 It's had, like, 40 releases in the last three months.
06:07 It's been quite a bit of work behind it.
06:10 It's relatively stable.
06:11 All right, so what problem is it trying to solve?
06:13 It's trying to solve, try to be as succinct as possible.
06:16 It's trying to combine the workflows of pip and virtual M together, as well as make it as easy as possible to enable deterministic builds and solve the UX problem of requirements.txt.
06:31 Because requirements.txt can be used deterministically, where you just specify all your requirements and all your pin versions.
06:37 Yeah.
06:38 And it can also be used in a more human-friendly format, where you just put the things that you want, and you may or may not put version numbers in there.
06:45 Right.
06:45 And sometimes it's fine, and sometimes it's not.
06:47 So there's a new project from the PyPA, the Python Package Authority, called pip File.
06:52 And it's a new standard that will replace requirements.txt.
06:56 And it's kind of like a YAML file, is that right?
06:57 It's a TOML file.
06:59 TOML file.
06:59 Yes.
06:59 YAML was discussed, but TOML is what we ended up settling on.
07:03 There are two components to it.
07:04 There's a pip file, which is the human part that you put in the things that you want, like Flask.
07:10 And then there's a lock file, which is JSON.
07:12 And it is generated by a machine and can be parsed by machines.
07:16 And it has the deterministic list of all of your packages that you want to have installed, including all the versions.
07:22 So if you had Flask in your first file, the second file would have Flask, WorkZug, isDangerous, Click, etc.
07:30 I see. That's cool.
07:31 So does it capture the version?
07:33 Yes, absolutely.
07:33 So it captures the version and the transitive closure of your dependencies.
07:38 So you say the top-level dependencies, and it gets the lock JSON as all the dependencies.
07:42 Correct.
07:42 And you have two groups.
07:43 You have default and develop.
07:45 So you can say that there are things that you just want for development and things that you just want for production.
07:51 Right, like pytest.
07:52 Exactly.
07:53 Probably not a good reason to deploy that.
07:54 In production.
07:55 Yeah, but there's no reason.
07:56 It's not harmful.
07:57 So if you're doing something like Selenium or Django toolbar or something like that.
08:03 You need the debugger toolbars that give you extra access.
08:06 Yeah, exactly.
08:07 Maybe don't put that in the plain one, right?
08:10 Exactly, exactly.
08:11 So that's the new work that PyPA is doing.
08:14 So yeah, that's what pipfile is.
08:16 And so what pipenv does is it allows you to use...
08:19 So pipfile is going to be put into pip in the future.
08:23 Do you have any idea of the timing?
08:24 There's a man named Donald Stuffed who is solely responsible for almost all things Python packaging.
08:29 He is Mr. Pip.
08:30 And so he is the gil that is responsible for the contention lock on that project.
08:36 He's doing good work there.
08:37 I've contributed to helping it come along, but he wants to rewrite it and make it more functional and less object-oriented.
08:42 And then eventually we are going to land it in pip proper, so pip will support it.
08:46 In the meantime, you can use it in pipenv.
08:49 So you can use this great new functionality today.
08:52 And what pipenv does is it takes away the brutal frustration of having to create and manage virtual environments.
08:59 In addition, it also allows you to use the pipfile and the pipfile.lock, and it gives you a lot of other niceties.
09:05 For example, I was inspired by using Composer for a few moments when I was helping someone with some PHP stuff,
09:12 which is not something I do, but it was something I was helping a new developer friend of mine walk through a tutorial.
09:19 And we did Composer install something, and it said adding that package to Composer.json.
09:25 And that was when the light bulb struck.
09:27 I thought that was a great idea.
09:28 Yeah.
09:29 So when you do pipemp install requests, it will automatically add requests to your pipfile for you.
09:35 So you don't have to go and manually curate this file.
09:37 It'll add and remove packages from it for you.
09:39 So the file exists basically as you pip install things.
09:42 Pipemp install things.
09:44 Inf install things.
09:44 It will find that file and update it automatically.
09:47 Precisely.
09:48 All right.
09:48 And you can lock it, and then you can also specify if you want a Python 2 or Python 3 virtualenv.
09:53 And it's really nice.
09:55 It put a lot of work into the UI, and it has some nice colors and Braille spinners, and it's a very polished product.
10:01 Really awesome.
10:02 And so that's out now, right?
10:04 People can find it.
10:04 Yes.
10:05 What's the path?
10:06 How do they go get it?
10:06 Well, you can pip install pipemp.
10:08 It's very meta.
10:09 And also, it's available at pipemp.org, and there's a nice little animated GIF that'll, or
10:14 GIF, I'm not sure what the official terminology there is.
10:16 You're going to start a GIF GIF fight.
10:17 I don't remember.
10:18 I'm too tired.
10:19 It's PyCon.
10:20 Yeah.
10:20 I actually don't know which one's proper.
10:22 Anyway, there's an animated image file that allows you to see it in action.
10:28 So yeah, pipemp.org.
10:30 You can check it out.
10:31 Nice.
10:31 And are you looking for people to contribute to it, or is it kind of doing its own thing,
10:35 or what's the status?
10:35 It's relatively stable.
10:36 What I'm looking for right now is as much feedback as possible, so I can know how to
10:39 iterate next.
10:40 Awesome.
10:40 So people should just try it out.
10:42 I want everyone to start using it, because I think it's in a great place where it could
10:47 become the next virtual M wrapper, effectively, the thing that everyone uses to manage virtual
10:52 M's and be their go-to tool.
10:54 And I think it's actually ready for that.
10:56 So I just kind of want to market it and get people to know it.
11:00 And then once it gets enough, the snowball starts rolling, then people use packaging tools
11:05 because they're told to by other people.
11:07 So it needs to be...
11:08 The tutorial says type this.
11:10 Exactly.
11:11 Exactly.
11:11 Exactly.
11:11 So that's...
11:12 It'll be a snowball effect, and it'll...
11:15 That's the goal for the project, is to become the next de facto standard, and to have all
11:19 the best practices baked into it so that you don't have to worry about them.
11:22 Yeah.
11:22 It sounds really nice.
11:23 It also sounds beginner-friendly.
11:25 Yeah.
11:25 It's very beginner-friendly.
11:26 It's also very advanced user-friendly, too, because it just does all the stuff you would
11:30 do by hand for you.
11:31 Yeah.
11:31 Yeah.
11:32 It's just the beginners don't know what the magic is, and the people who have been doing
11:36 it for a while are like, oh, it's doing these three things, or whatever, right?
11:38 Yeah, precisely.
11:38 Precisely.
11:39 But if you're a beginner, or you haven't used Virtual Lab and stuff like that, it just works,
11:43 and it tells you what to type next.
11:44 You just type pivm shell, and it gives you a shell that has your new Python interpreter
11:49 in it.
11:49 And it's much more approachable, and it works on Windows, and it's just a lot of
11:54 UX polish into the whole process.
11:56 Yeah.
11:56 It's good that it works on Windows.
11:57 That means it's really easy to recommend for your tutorial and your whatever project you're
12:02 trying to get set up.
12:03 Okay.
12:04 So that's your new virtual environment dependency project.
12:09 What else are you up to since we talked to you about two years ago?
12:12 I've written a couple of libraries that have been interesting.
12:15 The one that I want to talk about the most is called Maya, which I think is very interesting.
12:19 How do you spell it?
12:20 M-A-Y-A.
12:22 Maya.
12:22 Yeah, yeah.
12:23 Like the Hindu philosophy of the illusion, because time zones are an illusion.
12:27 So it is a daytime library that kind of turns time zones on their head, because when you're
12:33 dealing with time zones, you have to deal with localization if you're doing any time zone
12:36 algebra normally.
12:37 So that's if you want to do any math to calculate this time zone versus that time zone, which is
12:42 something that you have to do a lot if you're dealing with timestamps.
12:45 Effectively, you're already you're parsing a website.
12:47 Yeah, for example.
12:48 What are we going to say?
12:49 I was going to say, like, if you're already dealing with time zones, you're like, you're
12:52 a little one step down that path as well of like, well, yeah, you can always hack it to
12:56 work.
12:57 But if you're trying to do things the right way, I actually cannot figure out how to do
13:01 it the right way without using it without building this library.
13:04 So the problem for me was writing a little thing with like an RSS feed and it scraped the
13:10 time from a website and I told it what time zone it was in and like it would report
13:14 back that the RSS feed was being published at like two in the morning and it was like that
13:18 was not the right time.
13:19 I wanted to be at midnight.
13:20 So I wanted to fix it the right way at the standard library and I and I worked on it for
13:24 like four hours on like three, like four lines of code.
13:28 And, you know, and I'm like someone who knows Python pretty well, you know, is it's like
13:32 not, it shouldn't be this difficult.
13:34 You should be able to compare two times.
13:35 Come on.
13:35 And I spent all that time and then I finally got it to work and then I deployed it and then
13:39 it didn't work into production because the server had a different locale than my local machine
13:44 because the time zone algebra is different when you have different locales.
13:47 And that was what the straw that broke the camel's back.
13:50 So I see.
13:51 It's one thing to have just time zones.
13:52 It's another to have German time zones versus U.S. time zones or something like that, right?
13:57 Precisely.
13:57 Precisely.
13:58 Yeah.
13:58 When I'm doing math on time zones, I don't care what the machine, where my machine is located.
14:04 It's the same everywhere.
14:05 It doesn't matter.
14:06 That should not be taken into account when I'm doing time zone algebra.
14:09 So Maya exists to be, have the philosophy that your data should always be in UTC all the
14:16 time.
14:16 You can import it from another time zone.
14:19 You can export it to another time zone.
14:20 You can do that very easily.
14:22 You can generate date times with it, either naive or non-naive.
14:26 What's a naive date time?
14:27 A naive date time is a date time object that does not contain a time zone object.
14:32 Yeah, sure.
14:33 So in Python, you can't be kind of like...
14:35 Which is surprisingly difficult to do.
14:37 That's not like a one-liner.
14:38 That's like an eight-liner in Python.
14:40 Which is crazy.
14:41 If you've got one date time that has a time zone.
14:44 But with Maya, it is a one-liner.
14:45 Yes, of course.
14:45 Yes.
14:46 And you've got a date time with time zone and one that doesn't.
14:49 You can't even subtract them, right?
14:51 They can't be...
14:52 I'm not sure what would happen.
14:53 I think it would say it's incompatible.
14:54 Yeah, I think they're kind of incompatible with each other.
14:56 Yeah.
14:57 So the way that you should approach this, if you're ever building an application, is that
15:03 all of your data should always be UTC all the time.
15:05 And you should know that.
15:06 So it should be time zone aware.
15:08 You should say it's always UTC.
15:09 You should never store it as anything else other than UTC.
15:12 And UTC has its problems because UTC is off by a second now and then.
15:18 But that's okay.
15:19 We're building...
15:19 This is for humans here.
15:20 This is a date time for humans.
15:22 Right.
15:23 So the idea is...
15:24 We're not working on particle colliders.
15:26 Yeah.
15:26 This is for parsing websites and dealing with dates on websites and things like that.
15:30 This is not for scientific uses and stuff like that.
15:33 So it's all based on epoch time.
15:35 And it does the math that way, based on a number of seconds since, I don't know, January 1st,
15:40 1970 or something like that.
15:42 Yeah.
15:42 And it doesn't use any localization for any of its time zone algebra.
15:45 And it works very well.
15:46 And it allows you to just pass in...
15:48 It has two methods for importing stuff.
15:50 It has dot when.
15:52 And you can pass in there any English, any human form of a date.
15:59 Okay.
15:59 And it'll give you back the Maya date time object.
16:01 That's awesome.
16:02 Like, give us some examples.
16:03 Like, a week ago, for example.
16:05 Because that's something that you see on a website.
16:07 Yeah.
16:07 Or you could just, like, the way any human would ever write a date in any way.
16:12 It'll...
16:13 Two hours from now.
16:14 Yeah.
16:14 Two hours from now works.
16:15 You could do, like, 2, 4, 3, you know, or 2, 4, 14, something like that.
16:19 That works January 15th, 2015, stuff like that.
16:23 And you can parse all these?
16:24 And then there's dot parse.
16:25 And dot parse gives you...
16:27 It will read all known standards for machine parsable dates.
16:33 And it'll give it to you in the Maya date time object, which is in UTC.
16:37 And then you can export it from there to a date time object.
16:41 And then it has methods to import and export from all the major RFCs for all the date time objects.
16:47 So I'm very proud of this library.
16:48 I think it's great.
16:49 And I think everyone should use it.
16:50 It's awesome.
16:51 Yeah, yeah.
16:51 I've definitely checked it out and done some stuff with it.
16:54 You're right.
16:55 Those are just surprisingly hard problems.
16:57 And I don't know why.
16:58 It took me, like, a surprisingly lot of thought and work to build this library.
17:04 And it shouldn't have.
17:06 Like, it took me a good three days of solid work to build the prototype of it.
17:11 And it...
17:12 So just...
17:13 I had the API in my head of what I wanted.
17:15 And then, like, to actually get it working properly...
17:17 All variations.
17:18 ...by using the proper APIs and stuff, I had to look up so many Stack Overflow questions and stuff.
17:23 And that's the pain I'm trying to help people avoid is to ever have to ever do any of that work.
17:28 You're like, okay, we should solve this once and for all and forever?
17:30 Precisely.
17:31 Precisely.
17:31 Awesome.
17:32 All right.
17:32 Well, thanks for that.
17:33 Absolutely.
17:33 So I want people to give that a try, Maya.
17:35 If you ever have to deal with date times, especially if you're parsing websites or dealing with data from another source that has a date time, you should check out Maya.
17:42 Cool.
17:43 Yeah, so that sounds really cool.
17:45 There's two other projects that I know of that kind of in this area, I know they're not necessarily solving the same problem.
17:49 One is called Arrow.
17:50 Yes.
17:51 Are you familiar with Arrow?
17:51 And then the other is Python DateUtil.
17:53 Like, can you just maybe say...
17:54 So Python DateUtil is a dependency of Maya.
17:58 Maya also uses something called Pendulum, which is similar to Arrow.
18:02 All right.
18:02 So it's kind of like this competition in this space, but we're all friends and we're building each other up.
18:08 So I'm using Pendulum to do some of the...
18:11 I was doing my own date parsing with another humanize or something.
18:15 I have like five or six dependencies that do a lot of this stuff.
18:19 And I just wanted an API that like put all the tools together and works great.
18:24 So Arrow, I'm not overly familiar.
18:26 I had to look at the readme to know which one's which off the top of my head.
18:28 Yeah, I always confuse them myself.
18:30 They all weren't what I wanted because I really want this UTC is king slash queen like mentality in my head of that.
18:40 Like it's always your data should always be UTC and that you can import and export to other things.
18:47 And a couple of them did have that, but it just wasn't as solidified as I wanted it to be.
18:52 So, okay.
18:53 So, yeah.
18:53 Yeah, that's a really cool project.
18:55 I've already played with it.
18:57 And I was talking to someone here, David Golden, and he's talking about adding a relatively complicated class to add times ranges.
19:07 So we may get the ability to do some relatively complicated time range algebra.
19:13 Right.
19:13 For calendars, like are there conflicts?
19:16 Exactly.
19:16 That's where it's coming from.
19:17 Yeah.
19:17 Time conflicts for calendars for like 25 people and stuff like that.
19:22 That's what he wants to solve.
19:23 So we'll see if we get there on Monday.
19:25 That'd be an awesome add-on.
19:26 So you're going to do that for the sprint?
19:27 You're going to work on that?
19:28 Potentially.
19:28 Yeah.
19:28 If it's a good fit.
19:30 Okay.
19:30 Yeah.
19:30 Yeah.
19:30 Yeah.
19:31 Very nice.
19:31 This portion of Talk Python to Me is brought to you by CodeChip.
19:36 Try CodeChip Basic, a free, simple, out-of-the-box, continuous integration service in the cloud.
19:42 Thousands of customers use CodeChip Basic every day.
19:45 Its pre-installed CI dependencies make testing your software and deploying it work out-of-the-box.
19:50 The average setup time for CodeChip Basic is less than three minutes.
19:55 CodeChip Basic comes with a free plan that grants 100 builds per month, unlimited projects, and
20:01 unlimited users.
20:02 Do you run an open source project?
20:04 Those are always free on CodeChip.
20:06 And they just improved their Python support.
20:08 So give CodeChip a try and visit talkpython.fm/CodeChip to learn more and sign up for
20:15 free.
20:15 That's talkpython.fm/CodeChip.
20:19 So another project that you're working on that I think is really nice and has a very,
20:24 take something kind of overly complicated and make it simple is Records.
20:27 Yes.
20:28 I don't think we talked about Records before, did we?
20:30 I don't remember.
20:30 I don't believe so.
20:30 I think I wrote it after we talked last.
20:32 Yeah.
20:33 So yeah.
20:33 Why don't you tell everyone about Records?
20:34 Actually, someone came into the booth, my booth, and said, hey, tell me about Records.
20:38 You know, I heard you talking about it.
20:39 It's really cool.
20:40 Show me a demo of Records.
20:41 Oh, cool.
20:41 Isn't that cool?
20:42 Cool.
20:42 Yeah, those guys are fun.
20:43 That's awesome.
20:43 So yeah.
20:44 Tell everyone else about Records.
20:45 So Records is, so SQLAlchemy is an incredible library for dealing with SQL.
20:51 And it is really interesting when you work for an organization like I do, the way that we
20:56 deal with data is that we use tools like Heroku Data Clips.
21:02 And we use a tool called Looker, which allows you to get access in our data warehouse and
21:07 do some very advanced queries and get SQL out of it.
21:10 And I want to be able to take raw SQL that is written, that is trusted by a source like,
21:18 for example, Looker, which is generated by our business team, BizOps team, and put it
21:25 into my code.
21:26 And you can do that with PsychoPG, too, very easily.
21:29 You can just like, say, execute this SQL.
21:32 But SQLAlchemy gives you a lot of other benefits, like connection pooling.
21:37 And it has nice connection drivers.
21:41 You can figure out what kind of database engine to use on its own, right?
21:46 Precisely.
21:47 SQLAlchemy, MySQL, it just figures it out.
21:50 Yeah, and it has a very nice way of, and I also wanted to get back dictionaries of data.
21:56 So each row is a dictionary.
21:57 It's also a tuple as well as a dictionary.
22:00 It acts as both at the same time.
22:01 Yes.
22:02 Like a named tuple, right?
22:04 It's a named tuple that is also a dictionary.
22:06 It's kind of both.
22:07 It's a very cool little thing.
22:09 Yeah.
22:09 And so I guess for people, if they haven't used it, it's a little bit like just the dbapi,
22:13 too.
22:14 One line of it.
22:15 Right?
22:16 You just like...
22:16 Well, the idea is if you want to use SQLAlchemy and you want to just do raw SQL, you
22:21 have to Google a lot of stuff.
22:23 And it's like a good...
22:24 If you want to do it properly, it's like a good 25, 30, 40 lines of code.
22:29 Kind of got to break out of the object ORM side of things.
22:31 Yeah.
22:32 And then there's some niceties that you want to build into it.
22:34 And then it ends up being 100, 200 lines of code, 300 lines of code.
22:37 So I built a library for that.
22:39 And in addition to that, I also built exporting.
22:42 So I have another library that's very old called Tablib.
22:45 Okay.
22:45 And it gives you tabular data sets that you can export as Excel or as CSV or as a bunch
22:54 of formats, JSON, YAML.
22:55 So this supports that as well.
22:57 So you can take your raw SQL.
22:59 You can get Excel out of it.
23:00 You can get TSV.
23:02 You can get CSV.
23:03 You can get HTML tables.
23:05 Yeah.
23:06 Very, very cool.
23:07 So it's just basically for taking a report from SQL and sticking it into your code base.
23:12 And either using it to power your application or to generate a report.
23:15 And there's a command line tool that comes with it too.
23:17 So it's very little useful, small little thing.
23:20 Right.
23:20 It's a fun little toy.
23:21 But it's very, very powerful.
23:23 It's cool.
23:23 It seems to me like if you just want to connect, ask the database a quick question, like this
23:28 is a really nice way to do it.
23:29 Exactly.
23:30 Exactly.
23:30 Yeah.
23:31 And you don't want to use SQLAlchemy directly if you're doing that.
23:34 Because again, you have to look it up and it's not very intuitive.
23:38 And if you want to parameterize your queries, it's not standard.
23:42 It took me a while to figure out how to parameterize queries in a standardized way that works across
23:47 all query languages.
23:48 So I had to figure out a lot of stuff to get it to work is what I'm trying to say.
23:53 So I solved all those problems with records.
23:55 Nobody wants to be little Bobby Tables.
23:57 Yes, exactly.
23:59 Exactly.
23:59 By the time you put all the correct pieces together, it's a lot of work.
24:02 Yeah.
24:02 So exactly.
24:03 So it's easy if you're going to use PsychoPG2 or something like that to, they have good parameterization
24:08 in PsychoPG2.
24:09 I shouldn't say that.
24:10 Yeah.
24:10 If you're going to use something like SQLAlchemy or anything like that, if you're going
24:13 to be using raw SQL, it's really easy to not parameterize properly.
24:17 One little plus with the string and the variable and it seemed all so innocent.
24:21 Yeah.
24:21 So innocent.
24:21 So innocent.
24:22 What could possibly go wrong?
24:23 I just merged that one pull request that I got from that stranger and then suddenly all
24:27 my bank accounts were empty.
24:29 It didn't make any sense.
24:29 I don't know what happened.
24:30 This world's complicated.
24:31 So are there other projects you want to talk about or maybe just stuff that inspires you?
24:35 So interesting things in the Python world right now for me are API Star by Tom Christie.
24:40 Yeah.
24:41 So he's here not far from my booth and a little not too far from your booth.
24:45 And he's doing really cool stuff.
24:47 He's the Django Rush framework guy.
24:48 Yes, he is.
24:49 Yeah.
24:49 Okay.
24:49 So he built this thing that is a new API framework for Python 3 only.
24:55 And it uses type annotations in the first way that I've ever nodded my head in agreement.
24:59 Whenever I've seen type annotations, I was like, that's the stupidest thing I've ever seen
25:03 in my life.
25:03 Why don't want that in my Python?
25:04 But when I see him using them, I'm like, oh, I get it.
25:07 That makes sense.
25:08 Yeah.
25:08 So I think it's kind of a cool idea.
25:11 And I used it to throw together a little toy API the other day.
25:14 And the cool thing about it is that it's not Flask.
25:17 I love Flask.
25:18 Flask is incredible.
25:19 I'm a contributor and maintainer of Flask.
25:22 Flask is one of my favorite things in the world.
25:24 But it's just nice to change things up.
25:26 Yeah.
25:27 And the really cool thing about it is that it automatically generates documentation for
25:30 you.
25:30 And it's interactive documentation.
25:32 Awesome.
25:33 So.
25:33 And it uses the type annotations to do that, among many other crazy uses of type annotations,
25:38 right?
25:38 Yeah.
25:38 It's a really cool project.
25:39 And it's really early on, but it's getting a lot of hype.
25:41 So he's going to put in all this work.
25:43 And I think it's going to soar.
25:45 It might be like the next Flask for API design, maybe.
25:48 Yeah.
25:49 Yeah.
25:49 It's looking really, really promising.
25:50 It might be companies hiring API star developers one day.
25:53 Yeah.
25:53 You know?
25:53 Yeah.
25:54 I can see that.
25:55 It's nice to be there at the beginning, you know?
25:57 So I encourage everyone to check it out.
25:59 Yeah.
25:59 It is really cool.
26:00 I was impressed with it as well.
26:01 I'm going to have him on the show in a few weeks.
26:03 Yeah.
26:03 It's also one of those things when I'm using it, it's so different than what I'm used to
26:06 that I found it a little cumbersome.
26:07 Yeah.
26:08 So I'm not actually sure.
26:09 I'm not endorsing it necessarily.
26:10 I'm just saying that it's really interesting to me because it's something so different.
26:15 Here's something new and fresh.
26:16 Yes.
26:16 I need that.
26:17 I think I really get bored with using the same libraries all the time because they're so good,
26:23 the ones that we have.
26:24 And it's nice to get a new tool in my box that's like, oh, I could use this for something.
26:29 Yeah.
26:30 For sure.
26:30 And that's a rare thing for me.
26:31 Yeah.
26:32 It's really great.
26:33 And also, I mean, he's already been maintaining Django REST framework.
26:36 Yeah.
26:36 So he knows a lot about APIs and it's all about self-described APIs too.
26:41 So he supports VDN and HAL and all, or is it HAL?
26:45 I don't know.
26:45 He supports all the self-described API stuff.
26:48 So it's all hypermedia friendly and it's very proper REST framework stuff.
26:54 There's a project.
26:56 Well, I guess he's going to talk about it, right?
26:58 Yeah, I guess so.
26:58 You go give us the preview.
26:59 Okay.
27:00 There's a client that comes with it too.
27:02 And it's called core API.
27:03 And it's the kind of a compliment to it where any API you write with this, you can consume
27:08 with this thing called core API.
27:10 And there's a command line client for it, as well as a JavaScript client for it, as well
27:14 as a Python client for it.
27:15 And you automatically get, because they're self-described APIs that describe themselves, you get a fully,
27:22 like, you don't have to write a client for your API.
27:24 It's just already done.
27:26 Oh, wow.
27:26 And in the docs that he generates, show you how to do it in all three of those languages
27:30 built in.
27:31 It's like a really solid piece of work.
27:33 I'm very impressed.
27:34 That is super cool.
27:36 Yeah, the thing that I thought was interesting was, here's a guy who's very committed to
27:40 Django REST framework, creating a new framework.
27:42 And that caught my attention.
27:43 Like, wait, weren't you doing that?
27:45 You know what I mean?
27:46 Yeah, yeah, yeah.
27:46 And it's like, well, he can't start from scratch with Django REST framework.
27:51 It's built on a long heritage of a way of doing things.
27:54 And this is like, what if we could start again, Python 3 only right now from scratch?
27:58 And what if we take Django out of the equation?
28:00 And that's really important, because Django is not necessarily the best thing to be building
28:04 APIs on, necessarily.
28:06 It's not necessary.
28:07 Right.
28:08 It's got a lot of stuff to support rich web apps.
28:10 And you can use Django as a library.
28:12 So you can import Django into an API Star app if you really want.
28:15 And then you can just start using your models in it.
28:18 I mean, there's nothing stopping you.
28:19 Yeah, yeah.
28:20 How interesting.
28:20 All right.
28:21 What other projects?
28:22 Projects that I love.
28:24 Yeah.
28:24 I'm really in love with DocOpt.
28:25 I've always loved that.
28:26 Yeah.
28:27 DocOpt and Click.
28:28 There are two command line libraries.
28:30 I was playing with Click the other day.
28:31 Click and DocOpt are kind of like matter, antimatter.
28:35 Yeah, they're very opposites of each other.
28:37 Exactly.
28:38 Yeah.
28:38 Tell us about them.
28:39 It's amazing.
28:40 It's the opposite of aug parse.
28:42 It uses aug parse.
28:43 It turns out when you type any command in Linux and you do --help and it prints out
28:50 like the thing with the brackets and all this stuff with the commands.
28:53 Sometimes it's super complicated with lots of symbols separating things.
28:57 Yeah.
28:57 There's all these angular brackets and stuff.
29:00 And you're just kind of like, okay, I can infer what that means.
29:03 That's an ANSI standard, it turns out.
29:05 And so you just write that help string in DocOpt in Python as a string.
29:11 And then you say, parse my arguments.
29:13 And it just magically knows exactly what to do.
29:17 So you don't have to write any parsing code.
29:18 And it's just amazing.
29:20 So it's good for small things.
29:22 Like if you're writing a command line thing that doesn't have any like sub commands, maybe
29:26 like one or two sub commands, it's okay.
29:28 If it can fit into a single help printout screen, then DocOpt is great.
29:33 It's an option, yeah.
29:34 Click is fantastic and a very engineered piece of project from Armin Roeneker, the guy from
29:40 Flask and a good friend of mine.
29:42 And he, again, is very engineered.
29:45 It's like everything from Armin is in a good way, in a good way.
29:51 You can dive deep into it.
29:53 And it is, if you're going to build something that has a lot of structure and something that
29:59 has a lot of sub commands and something that has...
30:02 Something like Git, maybe?
30:03 Yeah, or PipM.
30:04 PipM uses Click, for example.
30:06 Because it has, you know, I have like five or six sub commands and they all have different
30:11 arguments and different defaults.
30:12 And DocOpt wouldn't be a good fit for that.
30:14 But Records uses DocOpt, you know, different tools for different tools.
30:19 Yeah.
30:19 Different dependencies for different dependencies.
30:22 Yes, precisely.
30:23 Precisely.
30:24 Awesome.
30:24 Other projects you've been loving lately?
30:26 This is the things that come to mind off the top of my head.
30:29 I was talking to the Beware guys that are over here.
30:31 Yeah.
30:31 I'll do, I guess, a little bit of evangelism for the project.
30:33 Cool project.
30:34 It is a cool project.
30:35 I knew about it last year, but they've come a long way.
30:38 So Beware allows you to, in pure Python with a pip installable module that is no C extensions
30:45 or C dependencies at all.
30:46 To write native Python with a very CSS inspired graphical representation of, that's how you
30:54 like manipulate the graphics is with like a CSS style Python thing.
30:58 You can render Windows forms, Coco for macOS and GTK for Linux and web, single page web apps for the web and Android apps and iOS apps, all from the same code base.
31:15 And there's no C compilation whatsoever.
31:18 And the thing that I'm excited about that I just learned about during PyCon was that they've taken that and they've made a project called Briefcase, which allows you to package up your application into an executable distributable, which is something that I used to work with quite a bit.
31:33 And there's a lot of packages out there that allow you to do that, but they're very cumbersome and they're all very different.
31:39 They sometimes work.
31:40 And they, they all, you can always get them to work.
31:45 But it's a, it's a challenge sometimes.
31:47 Yeah.
31:47 Especially if you're using something like PyQT and embedded web kits and it's, it can be very cumbersome.
31:54 So it's, I'm very impressed with the demo that I got.
31:57 So I think it's pretty cool looking.
31:58 And then I might start playing with Briefcase.
32:00 I'm really.
32:01 Because I like shipping executable distributables.
32:03 Yes, exactly.
32:04 Like that, I feel like that's one of the shortcomings we have is that we don't ship that many.
32:09 Hey, here's my app.
32:09 Double click it and look at the amazing stuff it does.
32:11 As a Python community?
32:12 Yes, yes.
32:13 I completely agree with you.
32:14 Yeah.
32:14 At the keynote here, we saw like this hockey stick growth of Python and you could see it
32:20 across other metrics and like Stack Overflow trends and other places.
32:22 And I just, I think how much steeper would that be if we had a solid desktop UI story?
32:27 Yeah.
32:28 You know, I mean, that could just like, people already love it so much.
32:30 The second you said that, I was like, I could fix that.
32:33 But I, I have a policy of, I don't want to build things.
32:35 I don't want to, that I'm not dog fooding.
32:37 Yeah.
32:38 Or I'm not sipping my own champagne.
32:39 I don't have any graphical user interfaces to build.
32:42 Yeah.
32:43 Yeah.
32:43 Yeah.
32:43 Yeah.
32:43 But I, I would love to, that'd be so much fun.
32:45 I would love to see that.
32:46 That camera.
32:47 I could write the documentation for that.
32:49 There you go.
32:49 That's what, it just, it's really a documentation problem.
32:52 Yeah.
32:52 Well, those guys have some pretty solid stuff.
32:54 You just have to say, this is the proper way.
32:55 And then people do listen to you.
32:57 It's really cool.
32:58 Do it this way.
33:01 Yeah.
33:01 Awesome.
33:02 All right.
33:03 So, other projects top of the, run through your, your high, high love list.
33:08 High love list.
33:08 Those are the ones that have come to mind.
33:10 Flask.
33:10 Always great.
33:11 I'm technically a core contributor and I'm going to, I've been running out of things to do in my free time lately.
33:17 Like I've just been really bored and I've been dying to figure out something to do in open source lately.
33:21 Cause I've been working on PipEmp and stuff and, and that I've kind of atrophied with like things to do there.
33:28 Cause it's kind of done.
33:29 And I have to wait until I make a new decision to make any progress there.
33:33 Cause it's, it's very stable.
33:35 Right.
33:35 That's why you need people to kick it around a bit.
33:37 And I need more users.
33:38 Yeah, exactly.
33:39 It has a nice user base, but I need the masses to come.
33:43 Well, you're used to a different level of user base.
33:45 Precisely.
33:47 Yeah.
33:47 I only have 10 million users.
33:49 I don't remember where I was going to go with that, but what was your question again?
33:53 What, what other projects do you love that you're like, you said you were thinking about contributing to something.
33:57 Oh yeah.
33:58 So I'm might make a point to start actually being a real maintainer of flask.
34:03 I think that would be good.
34:04 Help triage issues and stuff like that.
34:07 And I would be proud to say, I did say earlier because I'm planning on doing this, that I am a committer to flask.
34:14 So I've had the commit bit for like three years, but I've, I've only merged like three pull requests.
34:19 Sure.
34:19 Yeah.
34:19 I've never really done anything with it, but I, I would be really proud to add that to my resume that I'm like, that I helped maintain one of the most beloved pieces of software ever.
34:29 In my opinion, I love flask.
34:31 I think it's just the best.
34:32 Yeah.
34:33 I love the simplicity of flask and frameworks, right?
34:36 One of those things though, where I, as a user, I don't have any complaints.
34:41 Yeah.
34:41 So I, I don't know what to work on.
34:43 I don't want to do anything to it.
34:43 Yeah, exactly.
34:44 And I'm sure if you open the issue tracker, you'd find quite the opposite, but I have as a, I don't have any complaints, so I don't have anything I want to work on.
34:51 Yeah.
34:51 I guess.
34:52 I don't have any ideas because it's one of those things that's written by someone who's a lot smarter than I am.
34:57 Armin.
34:57 Well, I think, you know, around a lot of those things, one of the places where it could open up is the whole async await stuff, but, but that's so much the whole whiskey.
35:06 That's whiskey.
35:06 Yeah.
35:07 That's a whole other animal.
35:08 The whole stack is like not really ready for that.
35:10 Flask channels.
35:12 Yeah.
35:13 Yeah, exactly.
35:14 Like Django channels.
35:15 Yeah.
35:15 Yeah.
35:16 Yeah.
35:16 We need Daphne for, Daphne for Flask.
35:19 Right.
35:20 So maybe, I mean, maybe that's somewhere that needs some pushing.
35:22 I'm not actually familiar with all the options out there for that, but.
35:24 Yeah.
35:25 I don't know what that would look like.
35:26 That'd be interesting.
35:26 It's interesting to think about, but at the same time, it might not be a problem you have, right?
35:30 Like I find these web apps are actually quite fast already.
35:32 Yeah.
35:33 Yeah.
35:33 If you build things to be scalable, which just means they need to be predictably the
35:38 same speed.
35:39 Less stable.
35:39 And then you really don't have any problems.
35:41 And I think everything's pretty fine.
35:43 I don't think we have to really go into some bleeding, cutting edge concurrent worlds if we
35:49 don't have to.
35:50 I think it's wise for things that you're consuming, like for requests, for example,
35:53 we're planning on going to async.
35:55 You are?
35:55 Yeah.
35:56 I was about to ask you, what's the plans for requests?
35:57 So async is going to make its way in there.
35:59 So I could like await a request.get, maybe a get async?
36:02 Yeah, exactly.
36:03 There would be a new set of calls.
36:06 Like right now there's request.get, request.post.
36:09 So there would probably be a request at async.get or something like that.
36:13 And then you would await on that and it would just work.
36:17 That sounds like the business.
36:18 Yeah.
36:19 Yeah.
36:19 Are you familiar with, what is it, AIo HTTP clients?
36:22 I don't know exactly what.
36:23 I had Guido walk me through the code once and it seemed relatively straightforward.
36:27 It seemed like G event, but with explicit instead of the opposite.
36:31 Nice.
36:33 So I'm really excited to hear about this async request stuff.
36:36 Yeah.
36:37 We're working on it during the sprints.
36:39 So, well, Corey is working on it during sprints, I should say.
36:41 There's a project that we depend on called UR Lib 3.
36:44 And that is something that is being, V2 is being worked on by Corey, one of the core contributors
36:52 to requests.
36:52 Uh-huh.
36:53 And he is going to work on the preliminary async stuff.
36:59 He's going to get ready.
37:01 He's like refactoring it, rewriting it.
37:03 And it's going to be in preparation for adding async to that.
37:07 And then once we add async to that.
37:09 And then you're like, all right, we're going to do this.
37:11 And then we're going to do it.
37:11 Yeah.
37:12 And then in maybe six years, we might get to flip those APIs around.
37:16 So maybe the default in request would be asynchronous.
37:20 And then there would be async that would be separate.
37:23 Right.
37:24 But that would happen in like six years.
37:25 That really depends on how the community moves and stuff like that.
37:28 I honestly would be surprised if that's how things move.
37:32 But we'll see.
37:34 People find concurrency confusing.
37:36 They really do.
37:37 And I am hoping that I can really help bridge the gap with requests to make it be like,
37:43 this does not have to be scary.
37:44 This can be exactly what you're used to, except for magically amazing.
37:49 I'm really excited to hear that.
37:52 It is challenging.
37:53 But I was talking to somebody, listening to one of the other podcast Python Bytes that I do.
37:58 And I'd cover the AIOHCP client stuff.
38:01 And they said, I'm trying to remember the numbers.
38:04 It's like, oh, I had this project where we do a lot of scraping or API calls or something.
38:09 And it would take 16 minutes to run.
38:12 Yeah.
38:12 They flipped it to the async version.
38:14 And it ran in like 30 seconds.
38:17 And it actually crashed the machine because it was like doing too much.
38:20 They had to throttle it.
38:22 Yeah.
38:22 Yeah.
38:22 So I mean, just like.
38:23 It's because people don't understand.
38:25 I'm not saying they don't understand.
38:27 But I feel like there's a basic, simple computer science.
38:31 I'm not a computer science student by any means.
38:34 But there's like, you know, you have two things that a computer is limited by that your program is limited by.
38:38 It's IO bandwidth and CPU bandwidth.
38:40 And if you don't understand those things, it's very easy to.
38:44 If you do understand those things, you can not use these new async things.
38:50 And you can get very good performance with just using threads or just using multiprocess or in doing stuff like that.
38:58 The magic of async is that, you know, it just takes that to this logical extreme where you have these event loops that are just like.
39:08 Yeah.
39:09 And I think actually what they were going to, I think they might have run out of memory because they had too much pulled in at once.
39:13 Yeah.
39:14 Something like that.
39:15 But just the like.
39:16 It opens up a whole new can of worms of things that people don't understand.
39:19 And that's one of the things that I kind of prefer synchronous programming.
39:23 Yeah.
39:23 Myself.
39:24 Because it's something that is approachable and people understand.
39:27 And so I think I want to encourage people to understand how to better optimize synchronous code.
39:33 Yeah.
39:34 And there's some great things for that.
39:35 So there's a product like Minald's.
39:37 Have you seen that?
39:37 No, I don't think so.
39:38 It's a WSGI server that you can use with G Unicorn.
39:40 Okay.
39:41 And it uses an asynchronous event loop.
39:43 But you just turn it on.
39:45 And it just spawns every request.
39:48 Gets like a new green thread or something like that.
39:50 And your code just magically is asynchronous.
39:52 You know, and it's just like, that's how G Event works too.
39:55 But it's not using monkey patching.
39:56 Right.
39:56 And that's the level of async that I like is where it's at like the thread level.
40:04 Right.
40:04 I don't want it to be at the code level necessarily.
40:07 Unless it's something like requests doing it.
40:09 I don't personally want to be writing code that is dealing with this stuff.
40:14 I want to be consuming the code that's dealing with that stuff.
40:17 Right.
40:17 Yeah.
40:17 So I think those are solving slightly.
40:18 Like as a software engineer, I don't think people should have to touch the asyncio APIs.
40:25 I think that they should be consuming them.
40:27 Yeah.
40:28 And it's really interesting.
40:29 So I mean, on one hand, like any server environment, it's like almost by the time it gets to your code, it should already have taken care of that problem.
40:36 Precisely.
40:37 Precisely.
40:38 Yeah.
40:38 I mean, if you're on like your one.
40:39 Unless you're like working for a major company, you know, a company that has some major technical issues.
40:46 Not issues, but technical problems that they're challenges.
40:48 Yeah.
40:49 And they're like, we're going to solve this problem in this really cool way.
40:52 And then.
40:53 Your discuss, your Instagram.
40:55 Yeah.
40:55 Urban airship or something.
40:56 Exactly.
40:57 Yeah.
40:57 Precisely.
40:58 Exactly.
40:59 But most apps don't totally need it.
41:01 Yeah.
41:02 So, but that example of 16 minutes to 30 seconds really is like, wow, you could really get a lot out of that.
41:08 And to see if I could use requests to do that, that would just make me smile.
41:11 Yeah.
41:11 Well, you can do things like that today because there's a, there's a library called request futures, which is really great.
41:15 Okay.
41:16 And it uses the concurrency.futures module to allow you to spawn off either threads or sub processes or anything else.
41:26 There's also a G request, which I wrote a very long time ago, which is not very well maintained, but it allows you to use a G event with requests.
41:33 Okay.
41:34 So there are ways to do this today.
41:35 And again, you can do it at that module level.
41:37 So you just write your synchronous code and you just kind of wrap it in an asynchronous paradigm.
41:42 You know, use something like Celery and then you can, you, and then you get concurrency out the wazoo.
41:47 Awesome.
41:49 Yeah.
41:49 It's really cool.
41:49 Yeah.
41:50 This portion of Talk Python to Me is brought to you by Hired.
41:55 Hired is the platform for top Python developer jobs.
41:58 Create your profile and instantly get access to thousands of companies who will compete to work with you.
42:03 Take it from one of Hired's users who recently got a job and said, I had my first offer within four days and I ended up getting eight offers in total.
42:10 I've worked with recruiters in the past, but they were pretty hit and miss.
42:14 I tried LinkedIn, but I found Hired to be the best.
42:17 I really liked knowing the salary upfront and privacy was also a huge seller for me.
42:21 Well, that sounds pretty awesome, doesn't it?
42:23 But wait until you hear about the signing bonus.
42:25 Everyone who accepts a job from Hired gets a $300 signing bonus.
42:28 And as Talk Python listeners, it gets even sweeter.
42:31 Use the link talkpython.fm/Hired and Hired will double the signing bonus to $600.
42:37 Opportunity is knocking.
42:39 Visit talkpython.fm/Hired and answer the door.
42:43 Let's maybe talk a little bit about PyCon.
42:45 We're sitting here.
42:46 Yes.
42:46 In an extremely large room that's actually luckily quite empty right now so we can get some good audio, but it's been very busy.
42:52 It has.
42:53 It's been very exciting.
42:54 What's your takeaway for the week?
42:56 You had a good time?
42:56 I've had a fantastic time so far.
42:58 I'm sad that you're speaking about it retrospectively.
43:01 It's in the past, right?
43:02 It's halfway over, I guess, ish, right?
43:05 Yeah, more or less.
43:05 And it breaks my heart because it's my favorite time of the year and I feel like I just got here.
43:11 And I did just get here.
43:12 Yeah, it was really amazing.
43:14 Every time I come here, it's just so many great people to meet.
43:18 And this year I had a booth, so I really got to meet more people.
43:21 I didn't have to randomly run into them.
43:23 Yeah, yeah.
43:24 You have the Heroku booth that you're hanging out at.
43:26 Yeah.
43:27 And it's just...
43:28 For me, PyCon is the one time of year that I have a family at home, of course, but it's really...
43:34 The Python community is my true family and I get to really be with my family.
43:38 And I get to do that when I...
43:40 I don't really go to as many conferences as I used to go to.
43:44 But PyCon has always been the home, like, coming home conference because you get to see almost every single person.
43:50 And they're my best friends in the world, you know?
43:53 And it's utterly fantastic.
43:54 It's awesome.
43:55 Yeah, there's a couple of people that I've been working with really closely for a long time but I've never physically seen.
44:01 My biggest takeaway from PyCon so far has been these fidget spinners.
44:05 The world has become fidgety.
44:07 They're solving a fidgeting problem this year.
44:09 Yeah, I went out to the Saturday market here in Portland and I just got a higher end one.
44:13 Because there was a booth here at PyCon that was giving out fidget spinners.
44:16 Tell people what the heck is this fidgety spinner thing.
44:19 It's something you hold in the center and then you spin it.
44:22 And then, like, you can rotate it and you feel a centrifugal force and it gives you something to do with your hands.
44:27 Yeah, I guess I'll try to describe it.
44:28 Like, imagine a little weighted circular thing with a fixed ball bearing like an axle almost in the middle.
44:36 Yeah.
44:37 You spin it really smoothly.
44:38 Yeah, they're kind of designed, at least the hype on the internet is saying that they're designed for kids with ADD.
44:43 Okay.
44:44 And I have ADD.
44:45 Yeah, okay.
44:46 And I find it to be very useful.
44:47 I usually am vaping like an electronic cigarette.
44:51 Yeah.
44:51 And that gives me something to do with my hands and I find it very pleasurable on many levels.
44:54 And I find it difficult to be a PyCon because I can't, like, be vaping when I'm walking around.
45:00 We're trapped inside, more or less, yeah.
45:01 Yeah, so I have, like, a nicotine patch on and that helps.
45:03 But when, as soon as I got one of these, I, like, totally forgot about smoking because it's just giving me something else to do.
45:11 So, it's, I'm actually really loving it.
45:13 Yeah.
45:13 Yeah, fidget spinners.
45:14 And I think it's going to help me a lot because I work from home and I'm in meetings and I'm usually smoking during the meetings and it's kind of rude.
45:20 So, I'm going to start, and during my podcast, if you listen to Import This, you'll hear, like, little, this weird puff sound.
45:26 It's because I'm vaping.
45:27 So, maybe I'll start fidgeting instead.
45:30 Yeah, you'll be fidgeting.
45:31 And those things are dead silent because they're, like, smooth ball bearings, so.
45:34 Yeah, yeah.
45:34 Do you want to try it?
45:35 Yeah, let me check this out.
45:36 Yeah.
45:36 All right.
45:36 Well, this is high-end.
45:38 Yeah, that one's really cool.
45:39 Wow.
45:39 It was $25, that one was.
45:41 This one was free.
45:42 And then this one was $15 I bought from a kid.
45:46 They set up a little shop downtown and the kids were selling them.
45:50 Kids don't do ice cream stands and lemonade stands?
45:53 No, they're selling spinners.
45:54 That's awesome.
45:55 They raise money for research for their autistic brother.
45:58 Wow, that is actually super cool.
45:59 Yeah, it was a great story.
46:00 I had to buy one.
46:01 I don't need three of them, but I, you know, I can't say no to that.
46:06 Yeah, that's right.
46:07 So, did you go check out the keynotes?
46:09 No, I do the hallway track at PyCon.
46:11 Yeah.
46:11 So, I make a point to not go to almost any talks.
46:14 I went to, Corey Benfield did a talk on requests under the hood and I went to support him at
46:19 his talk.
46:19 But that's the only talk I've been to so far.
46:21 And there's a really great talk at the end of the day tomorrow on NES video games and hacking
46:27 them with Python.
46:27 Yeah, that's got a lot of...
46:28 So, I'm probably going to try to make it to that one.
46:31 Yeah, I mean, people should check out, what is it, youtube.com slash PyCon 2017.
46:36 It's already, videos are already showing up there.
46:40 Oh, really?
46:40 Yeah, yeah.
46:41 There's like, I don't know about the talks yesterday, but the tutorials are up.
46:44 Yeah, and they have, they're transcribed live.
46:47 Yeah, it's really amazing.
46:48 These guys do a great job putting that on.
46:50 I'm really impressed with the accessibility of this conference.
46:52 I've seen people here with wheelchairs, which is, I don't, I've never noticed that before.
46:56 I'm sure it's been a thing.
46:57 But they also have teleprompters, not teleprompters, but what's the opposite of a teleprompter?
47:02 Telescribe?
47:03 Yeah, like a live transcriptionist type thing, whatever.
47:06 Yeah, like you have in court.
47:07 Yes, exactly.
47:08 But for the videos during the talks and even the questions that are being asked are being transcribed.
47:14 And I very, it's just, I love this conference.
47:17 It's a great conference.
47:18 Yeah.
47:18 And I go to a lot of conferences and PyCon is by far my favorite.
47:21 That's cool.
47:21 All right.
47:22 So you've been walking around, like I have been.
47:24 I'm not been going to, I went to the Jake Vander Plaats' keynote on why Python is popular
47:29 in science and it was actually brilliant.
47:31 I talked to him about that yesterday afterwards.
47:33 It's inspiring.
47:34 Was it really?
47:35 So the short takeaway is, like he said, like, look, Python is a mosaic of people using it
47:41 for different things and they're coming in from different angles.
47:44 The way, like, an astronomer might pull up some data and, like, play and iterate with
47:49 it is very different than, like, you and I might write a web app where we're going to
47:52 very structured.
47:53 Yeah, yeah.
47:53 And it's like a static thing that we build up over an architecture.
47:56 And just, like, talking to people from different backgrounds who use the same tools in different
48:01 ways gives you a really interesting perspective on life.
48:03 Oh, it does.
48:04 It does.
48:04 Yeah.
48:04 And Python gives us this common ground to build upon.
48:07 You can meet people who work on satellites and who work on web apps and who hack and who...
48:13 Yeah.
48:13 It's amazing.
48:14 And you're all, like, family to each other because you just speak the same language.
48:18 Yeah, it's amazing.
48:19 Last night I went to dinner with some of the guys from PyCharm and a bunch of people from
48:23 the Data for Democracy group.
48:25 A bunch of data scientists that are doing, like, volunteer work for democracy and freedom
48:30 around the world.
48:30 Yeah, it's just ridiculous.
48:32 I love this place.
48:34 I truly always regret not staying longer because I'm staying for only one day at the sprints.
48:38 Yeah.
48:39 And I always wish I'd stay longer because I really wish PyCon was all year round.
48:43 I just wish this was my life because it really is like coming home.
48:46 It's really nice.
48:48 Yeah, I totally recommend the...
48:49 If anyone is listening and hasn't come to PyCon, I want you to know that my first PyCon,
48:54 I paid for myself.
48:55 I didn't have an employer paying for me to go and I wasn't making much money at the time.
49:00 It was a very large expense, but they do have financial aid available.
49:04 I probably should have applied at the time.
49:06 It was worth every penny.
49:08 It totally changed my life.
49:09 And I had been doing Python for, like, quite a while at that point.
49:12 And it was a big deal for me to go to my first PyCon and I can't recommend it more.
49:16 That's awesome.
49:17 I definitely want to second that.
49:18 And as far as tech conferences go, this is pretty affordable for the size and scale.
49:23 Like, a lot of, like, OzCon.
49:25 Oh, yeah.
49:25 I looked at that.
49:25 It's like $1,500.
49:26 Conferences are extremely expensive.
49:28 This is a very approachable and doable conference.
49:30 It's like $300 or something.
49:32 Yeah, but when you add up the hotel costs and the flights and it's, you know, if you're not making, you know, a really good developer salary, then it's, you know, it's a lot of money.
49:41 If you can't drive in from, like, some four-hour radius, then it starts to really get intense.
49:46 Yeah.
49:46 Yeah, especially the hotel costs.
49:47 But they have financial aid available, too.
49:49 So if there's any reason that finances are a reason that you can't come to PyCon, apply.
49:54 And they'll, like, give you a free ticket.
49:55 It would be cool for somebody to set up some kind of, like, web app before these events.
50:00 So people who are, like, looking to room share and, like, save money.
50:04 Yeah, yeah, yeah.
50:04 They could, like, kind of be, like, find your PyCon roommate.
50:08 Forgot about that.
50:09 Wouldn't that be fun?
50:10 That'd be a fun project to set up.
50:11 Wouldn't that be a fun project?
50:12 Well, I know in years past that was a thing.
50:14 Okay.
50:14 Because I remember the year I went myself, there was, like, a mailing list of people trying to find room shares.
50:19 I'm not sure.
50:19 It must still be a thing.
50:21 Yeah, probably.
50:22 I assume.
50:22 But maybe not.
50:24 I don't know.
50:24 It'd be cool to make something like that.
50:26 I assure you it did exist.
50:27 Yeah.
50:27 Awesome.
50:28 All right.
50:29 So, yeah, definitely if you guys are out there listening and you haven't come to PyCon, you should come.
50:33 But you should get your tickets straight away or you won't be able to come.
50:35 Yeah, it sells out.
50:36 And it's cheaper the earlier you buy them, too.
50:38 Absolutely.
50:39 Yeah.
50:39 All right.
50:40 Kenneth, thanks for being on the show, man.
50:41 Always a pleasure.
50:42 I'm a huge fan of the show.
50:43 And I want to really thank you for all the great advice you give all these developers.
50:47 And I listen to you when I'm taking baths all the time.
50:51 Oh, thank you so much.
50:52 That is awesome.
50:53 You're the only one I still listen to.
50:56 I don't listen to podcasts often enough to be caught up on them, but you're always the one I pull up to listen to.
51:01 Wow.
51:02 So, I listen to you on the way here, actually.
51:03 How cool.
51:04 Awesome.
51:04 Yeah.
51:05 So, really quick before we go, tell people about your podcast.
51:08 Oh, I have a Python podcast.
51:09 It's called Import This.
51:10 If you Google Import This, Kenneth writes, you'll find it.
51:13 It's on SoundCloud.
51:15 And I do very long interviews with Python friends of mine.
51:20 And we just catch up and talk about Python.
51:22 And actually, we talk about things that are unrelated to Python often, like their lives and stuff like that.
51:28 And I just put it.
51:28 It's very unfiltered, uncandid.
51:31 It's a raw, natural conversation.
51:33 Yeah.
51:33 There's no editing or anything like that.
51:35 I mean, it's produced, but it's not.
51:37 I just hit record, basically.
51:38 Awesome.
51:39 So, it's a great little thing.
51:40 And some people really like the longer format podcasts.
51:43 So, it's one of those.
51:44 If you need something on your commute, you should check it out.
51:46 Awesome.
51:47 And I'll definitely be sure to link to it in the show notes of people and just click on it and go there.
51:50 Yeah, it'd be awesome.
51:51 All right.
51:52 Thanks again for being on the show.
51:53 Yeah, definitely.
51:53 This has been another episode of Talk Python to Me.
51:58 Today's guest has been Kenneth Wright.
52:00 And this episode has been brought to you by CodeShip and Hired.
52:03 Do you have software?
52:05 Would you like to know if it has bugs before you deploy it?
52:09 Then jump over to talkpython.fm/code ship and set up a free CodeShip basic account,
52:14 ship tested software.
52:16 Hired wants to help you find your next big thing.
52:19 Visit talkpython.fm/hired to get five or more offers with salary and equity presented
52:25 right up front and a special listener signing bonus of $600.
52:28 Are you or your colleagues trying to learn Python?
52:31 Well, be sure to visit training.talkpython.fm.
52:34 We now have year-long course bundles and a couple of new classes released just this week.
52:40 Have a look around.
52:41 I'm sure you'll find a class you'll enjoy.
52:43 Be sure to subscribe to the show.
52:45 Open your favorite podcatcher and search for Python.
52:47 We should be right at the top.
52:49 You can also find the iTunes feed at /itunes, Google Play feed at /play, and direct
52:54 RSS feed at /rss on talkpython.fm.
52:58 Our theme music is Developers, Developers, Developers by Corey Smith, who goes by Smix.
53:03 Corey just recently started selling his tracks on iTunes, so I recommend you check it out at
53:07 talkpython.fm/music.
53:09 You can browse his tracks he has for sale on iTunes and listen to the full-length version
53:14 of the theme song.
53:16 This is your host, Michael Kennedy.
53:17 Thanks so much for listening.
53:18 I really appreciate it.
53:19 Smix, let's get out of here.
53:21 Outro Music.
53:43 *outro music* Thank you.