Talk Python to me. Episode number three. With guest, Chris McDonough. Recorded Monday, April 6th, 2015.
Hello and welcome to Talk Python to me, a weekly podcast.
On Python, the language, the libraries, the ecosystem, and the personalities.
This is your host, Michael Kennedy. Follow me on Twitter where I'm @mkennedy, and keep up with the show and listen to past episodes at talkpythontome.com.
This episode, we'll be talking to Chris McDonough about the Pyramid Web Framework.
Before we get to Chris, I have a few things to share with you.
First, thanks again to Python Gear for sponsoring the last episode.
They gave away a t-shirt to one lucky friend of the show.
I randomly chose a listener from the group, and Alejandro Villamarin from Spain was our lucky winner.
So congrats to Alejandro.
We now have a Facebook page, so be sure to like us on Facebook if that's your thing.
We're at facebook.com slash talkpython.
And we are also on SoundCloud.
You can listen to us on SoundCloud at soundcloud.com slash talkpython.
Listener Nathan Chowning, who's at nbchowning on Twitter, pointed out a cool Kickstarter called Python 101 by Mike Driscoll to turn his book, Python 101, into a video series.
It's already over $2,000 pledged towards his $5,000 goal, so check that out if you're interested in supporting Mike.
You can find the link in the show notes on talkpythontome.com.
Finally, I've started a Patreon campaign for this show.
Patreon allows listeners to directly support us with very small contributions, for example, a dollar for a show.
More details on this later, but you can find the campaign at patreon.com slash mkennedy.
Patreon is actually doing some very cool work with Python, and since I started the campaign, they reached out to me, and we had a small discussion about what they're doing with Python.
I decided it would make an excellent show, so we're going to talk to Patreon about how they're moving from PHP to Python 3, and that's how that's making all of their developers happy.
So look for that in an upcoming episode.
Now, let's get on to the interview with Chris.
Let me introduce Chris.
Chris McDonough is the primary author of the Pyramid Web Framework and the supervisor, Process Manager.
He has been a member of the Python community since 1999, and he is a principal of Agenda-less Consulting.
Chris, welcome to the show.
Thanks, Michael.
How are you today?
I'm doing great.
Thanks so much for being on my podcast.
Yes, thank you for doing it.
It's great to have another podcast, Python podcast.
Excellent.
And, you know, the reason I reached out to you is I'm a huge fan of the Pyramid Web Framework.
Oh, go on.
No, I am.
I mean, our website is even written in Pyramid.
I do love it.
So I wanted to talk to you and just sort of learn more about the history and what people are doing with it.
Great.
Yeah, I'd be happy to answer.
Cool.
So what is Pyramid?
Well, Pyramid is a Python Web Framework.
And that term means many things to many different people.
But it is a sort of web framework that's kind of light, I guess you would call it.
I hesitate to call it a micro framework, although it kind of sort of fits in the same little box.
That's one of the things that drew me to Pyramid was I think Django may be the most popular one out there just from taking the pulse of talking to people.
But I feel like Django is like you build with these great big giant blocks, whereas with web frameworks like Pyramid, I'm building more with like little Lego pieces and not huge shipping containers.
So I really like the granularity and the control I have when I'm working with Pyramid.
Yeah, I do too.
And, you know, I actually came into Python through Zope, you know, in like 1998 or 99, something like that.
Zope is the, you know, kind of the antithesis of Pyramid, although they, you know, I stole lots of ideas from Zope.
But Zope and Django and, you know, there's another framework called Web2Py are kind of, I guess what you'd call full stack web frameworks.
You know, they actually have built into them, you know, database bindings and ways to administer the site.
And, you know, they have UI to them and all kinds of stuff.
Pyramid is a little bit more like something like Sinatra or Flask or other micro frameworks are escaping me, but, you know, something that's a little bit smaller.
Maybe Bottle.
Bottle, yeah, exactly.
Yeah, Bottle is an example.
And when I think of Pyramid, I think of sort of its peer or rival, frenemy maybe, I don't know, is Flask, right?
These are kind of the lighter weight versions.
You came from this background of these sort of bigger, larger, what you call full stack frameworks where it's like they predefine.
Here is your data access layer.
Here is your template layer.
Here is how you wire this all together.
What inspired you to go in the opposite direction?
Well, like I said, you know, I came to Python through Zope.
And Zope, even the word Zope, you know, can mean different things to different people.
But, you know, when I came to it in 99, it meant the thing that's currently now referred to as the Zope2 web framework.
And it was actually really great at the time.
I used it to build, you know, I didn't, I ended up working for the people who made Zope for a number of years.
But I did not work there then.
I used it to build a site for an electrical, an electric company in Philadelphia that was something that we would now call today a content management system.
But I don't think that term existed then.
Well, the web world is a very, very different place than it was in 1998.
I mean.
Oh, yes.
So what people expect out of web frameworks may have changed as well.
Yeah, exactly.
And, yeah, so that sort of skips over to the heart of it, which is that these days it's becoming much more interesting to write your UI in JavaScript.
In HTML, instead of, you know, server-side templates and sort of, you know, web 1.0, reload the page things, you have these frameworks.
Sure, AngularJS or Ember or any of these things, right?
Yeah.
And those things really don't need, you know, there's not much retail UI.
And when I say retail UI, I mean, you know, the UI that your customers see when you make an application or something that these days is, you know, more pleasant to write, you know, on a totally server-side application than it could be in just JavaScript.
So the frameworks have become smaller as a result, and a lot of the stuff that the old frameworks did have moved into these JavaScript libraries.
Yeah, that makes a lot of sense.
And I think the lighter-weight web frameworks pair well with, hey, I mostly need you to deliver HTML and CSS and JavaScript and then provide a cool sort of service layer back end to keep the JavaScript active.
Yeah, I totally agree.
I mean, that's the way people are thinking about how that works.
That said, you know, it's often pretty convenient to write just flat-out, you know, templated web pages that, you know, have links that go to other templated web pages.
And I don't think that'll ever die.
It's not.
It's definitely not going to die, and not in the near-term anyway.
And I think if for no other reason than purely for SEO purposes, right?
So if I've got a cool AngularJS page and it's got all my handlebar stuff in there, it's more or less empty of content.
And if Google or Bing come along and try to index it, it's just going to say, hey, angle bracket, angle bracket content, as opposed to the real content of the page.
And so as long as you're writing public-facing sites, you want to show up in search engines, you know, unless the search engines start executing the AngularJS bits, which they may well be trying, but I don't know that they do today.
You know, there's still going to be some place for these sort of back-end, server-oriented, templated pages, at least the public-facing ones.
Maybe your admins area becomes an AngularJS sort of spa type of application, but the front-end for your public-facing stuff probably will be HTML for a while to come.
Yeah, I think that's right.
And I'm sure Google's going to have to write a crawler that executes JavaScript pretty soon, you know?
I mean…
Yeah, it's going to be unavoidable.
Yeah.
Michael here.
Thank you so much for listening to and spreading the word about Talk Python TV.
The response to the podcast continues to be wonderful and humbling.
I have a quick comment about supporting and sponsoring the show.
I'm still looking to line up stable corporate sponsorships, but I wanted to tell you about a community-based campaign I'm launching to allow listeners to directly support the show.
We are running a Patreon campaign.
You might not have heard about Patreon, but it's kind of like Kickstarter for things like podcasts, which release frequent small deliverables rather than one-off large engineering projects.
Visit patreon.com slash mkennedy.
That's p-a-t-r-e-o-n dot com slash mkennedy and watch the video to see how you can donate as little as $1 per episode to support Talk Python to me.
This is your chance to ensure that the Python community continues to have a strong public voice.
Consider supporting us today at patreon.com slash mkennedy.
And thanks for listening.
And really, you know, one of the things, one of my minor, you know, kind of pet peeves are just like, the Pyramid Docs have this in there.
And, you know, I wrote something about it.
There's a page in the Pyramid Docs called Design Defense.
And one of the design defenses is that I don't call it an MVC framework because, to me, you know, MVC means a UI that has events that, you know, like it's a small talk thing.
That's where that's from, that term.
And the web is nothing like that, you know.
Until we get these JavaScript frameworks, which actually do work like that, and those can be called MVC, you know.
But I think Rails came along in, you know, 2005 or 2007 or whenever it was.
Yeah, that sounds about right.
And I think it introduced the idea that, okay, your views are your templates and your controllers are, you know, our Ruby code.
Your model is your database.
And I don't think that was ever true.
You know, it sort of just got jammed on there.
But now it actually is true, you know, with these JavaScript frameworks.
Like you were saying, you know, you have these really thin applications that just serve out XML or they serve out JSON, you know, whatever.
And your JavaScript stitches it all together and builds your UI.
And the JavaScript is, you know, it's Turing complete.
So, you know, you can do whatever you want.
You can, you know, the UI can change as a result of a server through WebSockets or SSC or, you know, whatever.
And it's really interesting.
And that's another reason I think people are interested in it.
Yeah, that's really, really cool.
I think JavaScript is definitely eating a large portion of the world.
So there's plenty of interesting stuff that's happening there.
Well, we're all JavaScript programmers.
That's right.
We don't want to be.
So, first of all, let's maybe, maybe you could walk the listeners through what the process of setting up all through the PyPI down to a running web page.
Walk us through what are the steps to getting started with PyPyramid.
Sure.
So for better or worse, you know, we started out in Pyramid and we embraced Python packaging, including something that was, had been around for a long time when we embraced it.
But people tend to bounce off of it, set up tools.
And so Pyramid itself is a distribution in PyPI terms, which means, you know, a file that can be downloaded.
This is a targz file that gets installed when you run either easy install or pip.
And it has a bunch of dependencies mentioned in it that also come down as a result of you downloading it.
And then those have dependencies, et cetera.
And I think at this point, at our sort of beefiest, we had maybe 13, you know, 13 distributions that came down when you installed Pyramid.
I think it's down to seven or something now.
The reason we had so many was because we used to ship both two templating languages with the framework.
And we stopped that because, you know, there was no purpose in it.
We could do the same thing just by letting people choose.
Sure.
So you used to do Chameleon and Mako.
Is that correct, by default?
That's right.
And now you're just down to Chameleon?
Now we don't have any.
Now no templating languages gets installed with the – no templating bindings get installed and no templating package gets installed when you install Pyramid.
Right.
So you have to make the choice and install it yourself.
Right.
So when I create a site, maybe through one of the scaffolding things, in there it would have Chameleon as a dependency.
But the core, if I say pip install Pyramid, I don't get a templating framework necessarily.
That's right.
And you brought up a good word, which is the scaffolding.
So that's a term that I stole from Pylons, and maybe Pylons was another web framework.
Oh, by the way, I should mention it confuses people that this web framework is called Pyramid.
It is part of a project, of a larger project called the Pylons Project.
The Pylons Project has in it the Pyramid web framework, the sort of legacy old Pylons web framework, and then a bunch of other – a mess of other software that has sort of the same authors, me included.
The way that people should probably think about that is there's the Apache Software Foundation, and they have God knows how many pieces of software at this point.
But there's also the Apache Web – or sorry, Web Server.
And so they – so anyway, I wanted to explain that.
Yeah, that confused me when I first got started looking at Pyramid.
I'm like, okay, there's Pylons, which kind of seemed like to be this older framework, and then there's Pyramid, and they were kind of merged, but they're somewhat distinct.
And so, yeah, thanks for the clarification there.
Yeah, I think it confuses everybody, and really it was just kind of a negotiated thing because, you know, we started out and we just kind of mashed – we thought we were going to mash three things together at first.
We thought we were going to mash Pylons and the framework that Pyramid was renamed from, which had the awesome name of Repose.BFG.
It was a terrible name.
And we also thought we were going to get TurboGears, you know, in our thing.
We actually met in, like, me, Ben Bangert, who's the guy who rode Pylons, and Mark Graham, who at the time was the guy who was maintaining TurboGears, or one of the guys who maintained TurboGears.
And we, you know, came up with that name and said, okay, good enough.
You know, we'll run with that.
And as it turned out, the TurboGears guys, you know, I think Mark got another job, and he wasn't quite as involved with TurboGears.
And they, you know, maintained their own projects, and they didn't come along.
But anyway.
But there's a little shared heritage there indeed.
Yeah, yeah, yeah.
Okay, cool.
So I've pip installed Pyramid.
Right.
And now what's my next step?
Well, so you mentioned a word.
That's what I was going to say.
You mentioned a word called scaffolding.
We have these commands that once you install Pyramid, they are in Python, well, in setup tools terms, called console scripts.
And all that means is they end up in the bin directory, you know, B-I-N, bin directory of your Python installation when you install Pyramid.
Right.
So it almost adds, like, new commands.
After I pip install Pyramid, I can, like, pcreate and pserve and things like that, right?
Exactly, yeah.
And those commands used to actually all be subcommands.
You know, you know, over the course of the pyramid compatible with Python 3.
And we were using a piece of software that Ian Bickman had originally written called Paste, and PasteScript and PasteDeploy and a number of other things.
We still use one of those packages because it's a lot of things like that.
We still use one of those packages because it's Python 3.
And we still use one of those packages because it's Python 3.
The one that we do use is called PasteDeploy, and somebody else maintains that right now.
But Paste and PasteScript were just – they just had too much stuff in them that we didn't use to port them over.
So, you know, what I wound up doing was I copied all the code, basically, you know, and just kind of copied the stuff we needed into Pyramid and made these commands, these console scripts called, you know, the one that we were just talking about that creates projects from scaffolds, which are just kind of like templates of projects.
It's called pcreate.
And what you used to do when you installed Pyramid was you used to type something like paste or create, you know, project name, whatever.
And then when you wanted to go to a project, you would type paste or serve and then the name of a .ini file, and it would serve up the application.
All we did was we sort of pulled those things out.
Now you type pcreate.
That makes project from a scaffold.
And you type pserve to serve the project.
And it's all still Ian's code.
It's just only what we needed.
Right.
Excellent.
And so if I type pcreate, I have to give it a scaffold name or type.
These are like pre-built little websites that I can start from.
And there's three, right?
Yeah.
There's an Alchemy one.
There's a ZDB one.
And there is a starter one.
And the starter one is the very simplest thing.
It is not bound to any particular database at all.
And it's just, you know, basically one view.
And inside of a, you know, a views.py file, for better or worse, and an init.py file.
And basically when you go there, it just shows you a hello world page.
And that's the very simplest thing.
The other ones have, you know, they're still very simple.
And they're just toys.
You know, they're not full applications or anything.
They don't really do anything.
But they set up bindings to a database, more or less.
The Alchemy one, which uses SQLAlchemy.
And the ZDB one, I'm probably the only one who's ever used that one.
But I'm a big fan of ZDB, so I put it in there.
Yeah, that's excellent.
We're going to actually have Mike Bayer, who did SQLAlchemy on in one of the next shows.
So that'll be great.
That's great.
Yeah, yeah.
That piece of software is really, really good.
And Mike spends so much time trying to make it better and answer everybody's questions and everything.
And he should be applauded.
Yeah, absolutely.
I think it's a thing of beauty.
That said, I usually start from the starter one if I'm working with Pyramid because I do a lot with them.
Do you find that the scaffold is useful?
I mean…
I absolutely find it useful.
I mean there's all these little pieces you've got to wire together.
It creates your little static section.
You know, it kind of gives you the right structure and just a little bit of guidance.
You know, it sets up your setup.py and your under-under init and all that kind of stuff for you.
So, yeah, I do find it useful.
That's good.
I think there's another thing I should probably either mention or defend or apologize for, whatever I have to do for it, which is that, you know, like for better or worse, I said, you know, we embrace setup tools to install Pyramid and its dependencies way early on.
We also embrace setup tools to set up projects.
So, when you create, when you use that pcreate command, you say pcreate starter, you know, and then you give it a name.
And what it does is it creates a directory in the current working directory and that becomes your project.
And literally, in terms of setup tools, it is called a project.
You know, it's a directory on disk that has a setup.py in it, which is a setup tools thing, disk utils thing.
Yeah, it's basically a package, right?
That's right.
There is, well, it's a little tricky because, you know, there's PyPI, P-Y-P-I, you know, the index server for packages.
And, you know, it's called the Python package index.
But the things that it serves are actually technically not packages.
That's a word reserved for, you know, directories on disk that have an initpy in them, you know, Python.
Python.
What P-Y-P-I should be called is P-Y-D-I, Python Distribution Index.
But no one, you know, that ship is long-sailed.
We're way past that, aren't we?
Right.
So, yes, in common parlance, you know, it is a package, which means it has a, you know, it can be turned.
Technically, it's a project until you run the setuppy sdist or however you package it up to put it somewhere so that it's installable through easy install or pip.
Right.
Okay.
But inside of that thing, so it makes a directory.
Inside of that directory is a setup.py that has a bunch of setup tool stuff in it.
And for better or worse, I think that's the thing that people tend to trip over the most or that's, you know, and it's, you know, we try to make it as sort of, you know, we try to explain it as best we can in the docs and put comments in the code and, you know, the thing that gets run by the scaffolding.
So that people understand what's going on.
But, you know, the state of Python packaging is still just kind of funky.
And I think it'll be kind of funky forever, you know.
And I think the, you know, one thing that, you know, this is something you asked earlier about something that's different between, you know, something like Flask and Pyramid.
Flask doesn't do any of this.
You know, Flask says, hey, you know, open a file, start typing.
You know what I mean?
Right.
Or, you know, I'm sure there's some example projects you can get and stuff.
But, you know, and people, that is much easier.
It is much easier to get started with.
And you can actually do that with Pyramid as well.
You can open a file, start typing.
You don't need any of this package nonsense and everything.
But the thing is that what I've found is that, you know, applications that grow beyond, you know, a few views and whatever tend to need some structure, you know.
And I'm not sure that there's any purpose in not putting it inside of a, you know, a project folder with a set of tools.
Right.
It lets you do cool stuff like say, hey, this website depends on these other packages.
That's right.
And it just automatically sort of pulls everything it needs in to run.
So it's not, you know, tricky and hidden deep down in some import statement.
Yeah, and you can, you know, you can run the tests through the set of PyPy file if you have tests.
And you can create a, you know, a package, you know, and upload it to PyPy.
And it's just like any other package.
You can be your own package author and put stuff up on PyPy.
Yeah, excellent.
Okay, so I've gone to done pip install pyramid.
And then maybe I've done pcreate, what is it, dash s, like start.
That's right.
And that'll generate it.
And it's almost ready to run.
But then I need to kind of somehow get that package, like registered.
That's right.
Yeah.
So this is, you know, the thing that you create by running the pcreate command, like I said, as a project.
And the way that you install the project is by typing Python setuppy either.
My recommendation is typing Python setuppy develop, which.
Yeah, that's the one I've been using as well, because it leaves the files there on the disk.
The ones that you're working on are the ones that it runs from, as opposed to install, which copies it to what is that your site packages folder or something like that.
That's right.
Yeah, that's right.
And when you type Python setuppy install, it actually, you know, you can you can then, you know, if you're curious, you can change directories to your Python site packages folder, which is, you know, somewhere under your Python's lib directory.
And after you type Python setuppy install, you will see either a tarball or directory that represents your project.
And alongside of all the other software you might have installed from third parties, it's just like any other any other thing.
But when you type Python setuppy develop, it doesn't put anything in your site packages.
And and sort of if it needs to need any dependencies for better or worse, it puts them in the in the same directory as setuppy.
I never quite understood that, but it does that.
And it also puts into your easy install dot there's a there's a there's a there's a file in your I guess I guess it's also in site packages.
Yeah, I think it's like a sort of link back says, hey, look over for this dot eggs folder here rather than like in the site packages.
It's not a sub folder, but it's like external or something.
It's called like easy install dot PTH.
And, you know, all this all this stuff is just like, you know, ancient, you know, rhyme of the ancient mariner stuff from from setup tools.
You know, it's just been passed down through the ages, you know.
And, you know, the reason these things exist, these PTH files is because they are consulted at an appropriate time when Python starts.
And they are meant to Python.
Python will look for them inside of site packages or inside of, you know, the I think Python calls them the dist folders or whatever.
But usually it's just called site packages.
And it will read these files.
And these files are meant to have just just like directory names in them more or less to say, OK, this is the when when Python starts,
I'm going to add these to the sys path of this of this Python interpreter.
And but it turned out that somebody made a mistake and you could actually put Python code in there.
Oh, boy.
So so if you if you look inside of easy install dot PTH thing, Philip Eby took serious advantage of that, you know, when he wrote setup tools.
And it's got it's got some some some Python, inscrutable Python in there that does some fun stuff.
I think it sets up package resources on there.
Go ahead.
Sorry.
Yeah, no, that's interesting.
That's pretty interesting.
So I've I've got it.
I think we're basically there.
Right.
You've you've said set up that PY --develop.
And that'll sort of register my site with the Python implementation that I'm using.
So Python two or Python three.
And then I just want to run it.
So that's P serve.
And then you guys have any files, one for at least in the scaffolds, one for deployment or one for dev and one for production.
Right.
That's right.
And the scaffold, the difference between the two.
The main difference between the two is that when you run the development one, it will install this piece of software called the well, it will include this piece of software called the pyramid debug toolbar, which is pretty handy to use.
That pyramid debug toolbar is super cool.
I mean, you think of a debug toolbar, maybe it gives you a little log or something.
But after I looked in there, I'm like, wow, this really reaches down into a lot of areas.
Performance, SQLAlchemy queries, logging errors, request time and performance.
What what view template was selected?
There's a lot of stuff in there.
There is.
And I mean, I think I would like to take credit for most of that.
But the the original version of that was a blatant ripoff of something that was in Flask, actually.
And in turn, that thing that was in Flask was a blatant ripoff of something that was in Django.
They actually even had the same UI like they were the same thing, you know.
Yeah.
For a while.
That's cool.
Wow.
Yeah, I kind of thought they had some Django heritage in there somewhere.
Yeah, yeah.
And and, you know, so those guys, you know, the original author of the Django thing.
God, I don't remember who it was, but I remember the guy, the guy who did it for Flask.
His name his name is Matt Mantellogen, I think.
I'm sorry, Matt, if I'm brutalizing your name.
It was it was nicely done, you know, and I understood it and, you know, just basically just stole it in a couple of days and had it going.
Since then, though, since, you know, that that sort of iteration of that project, I no longer sort of did much on it and other people picked it up.
And since then, it's gotten I think it's gotten way better and it's and it's sort of outgrown.
It's it's derivative nature.
It's you know, it's it's different than the other ones.
Now, it actually keeps track of past requests and you can go back and look at, you know, headers of some number of requests and it uses SSE to it's it's it's it's really neat.
It's really I was really blown away to see how much was behind that little toolbar.
That's cool.
So one of the things sorry, one of the things that drew me to Pyramid was it's sort of full support for Python 3, whereas, you know, at the time when I was getting started at these, I looked at Flask and it was kind of like, well, it may run on Pyramid 3.
It's not really supported and some of the other web frameworks.
And so I think your support for Python 3 is really a nice sort of contribution towards trying to move everything forward.
Well, actually, the credit for that probably belongs mostly to the PSF, Python, Python Software Foundation, because, you know, we pyramid itself, you know, pyramid itself is pretty small.
I mean, it's it's not very big.
You know, it's it's it's at this point, maybe, I don't know, 15,000, 20,000 lines.
I'm probably going to look at it and I'll make a liar of myself.
But it's it's not that big anyway.
But it has dependencies, you know, it has it has a dependency on a package on a package called WebOB, which was also written by the super productive Ian Bicking, who is we've lost to JavaScript at this point.
But WebOB is this is this implementation of sort of HTTP request response library.
And it just it was kind of sitting unmaintained because, you know, Ian went to work for Mozilla and, you know, he was doing JavaScript stuff and just not it wasn't in his, you know, interest anymore to keep it up.
So we sort of ended up just well, that's not that's not true.
Another I shouldn't have shouldn't have said that.
Another guy, Sergei, took it over for a while and he did a did a great job sort of, you know, shepherding it along.
And then he he moved on.
You know, maybe he got another job where it wasn't so important anymore or whatever.
And so it kind of wound up in the pylons project.
So now now we're the owners of WebOB.
And that was, you know, that was Python to only library, you know, in 2010, I guess, 2011.
And so that was that was the first thing that we had to port in order to start to port pyramid.
Right. Because if you're going to port it, you got to start at the bottom and everything it builds on also has to move on over.
Right. So that's a little project.
It's not just your 20,000 lines of code.
It's 20,000 lines plus foundation.
Yes. Yeah.
And so that so I I was whining heavily about that because, you know, I mean, it's, you know, I think.
You know, for better or worse, you know, you want you want to sort of move along with the with the with language, you know, where you want to be where the language is going to be.
But, you know, economically, it's really difficult to think about doing that.
You know, I mean, you have you have you have to spend, you know, sometimes weeks, you know, to to to especially especially especially if the thing doesn't have good test coverage, because, you know, when you go to port something to Python 3, it's not really porting it to Python 3.
It's it's it's actually making it run on both Python 2 and Python 3.
So you're kind of straddling.
Right. That's an even more interesting problem because, you know.
Yeah.
And sort of polyfill all that stuff back in.
Yeah. Yeah. That's that's a great word. Yeah.
I mean, it's almost exactly the same the same thing.
So I was whining about having to do that, you know, and I was going to do it anyway.
But I think either Alex Keener or Nick Coghlan called call me out on it and said, look, you know, the PSF has grants for this stuff.
This kind of stuff was like, really?
Like and I think, you know, I I asked them, I applied for a grant and they gave it to me.
And I was, you know, it was it really, really wouldn't matter how much it was.
You know what I mean?
It was just something, you know, just some some amount of money I could say went towards that.
And I could I could be paid.
I think I think they gave us like three thousand dollars or something.
That's cool.
What the PSF is doing lately is really cool.
They seem to be doing a lot to support the community.
and kind of guide it and sort of with these little little gentle pushes.
Yeah.
And I, you know, I really appreciated it.
And I I still from time to time whine about that stuff because still there, you know,
I'm dragging along 10 years of Python history.
You know what I mean?
I mean, at this point, I've just had to sort of like drop some like drop some friends, you know.
Sorry, I can't talk to you anymore.
You know, I can't think about this.
I can't I can't think about porting this to Python 3.
So I'm, you know, whatever.
But but I think it's getting a lot better.
And I think, you know, with these frameworks, you know, the the web stuff, at least at least
the web portion of the world, I think, is pretty much OK on Python 3.
You know, if you're going to start a new project, I don't think you're going to have a lot, you
know, too many problems starting on Python 3.
Yeah.
A lot a lot of the cloud providers are starting to support it.
Last year, I believe Azure had no option for Python 3, but now they do.
Python Anywhere has some fantastic support and it's starting to get easier.
And then, you know, with the advent of Docker, you have a lot more control over your actual runtime.
You can kind of drop Python 3 in there and you don't have to ask permission.
That's your little container.
Do what you want, you know?
Yeah.
And so I think just from from both the standpoint of deployment, like you just said, and the
standpoint of development where you need some library, you know, some some library at this
point, you you're going to you're going to run it.
You're probably going to run into one thing that's that only runs on Python 2 and and you're
going to gnash your teeth and and whatever.
But maybe not, you know, maybe not if you're if it's really vanilla.
You know, you don't need some some Excel import libraries.
I mean, but people need that stuff.
You know, people it's it's a it's a long tail of of stuff that people often need when they
build stuff and they often run into problems.
So and all that stuff hasn't quite caught up yet, but it's it's getting better.
So I don't think there's any reason at this point in the web world anyway to think about
starting a new project with Python 2.
So speaking of sort of Python 3 and looking towards the future and things moving ahead, you
know, what's your sort of view of the future of web frameworks in Python?
I think they're going to probably become a lot less interesting.
You know, I think of the of the frameworks that have it probably, you know, most right at
this point.
It's it's probably, you know, bottle flask pyramid sort of frameworks that are that are pretty
small and don't do a lot and and are just just, you know, places to hang code that gets
called and returns from JSON more or less.
I think that's probably going to be the major way we build applications and all the all the
gnarly stuff will probably be on the on the client end.
Of course, there's always going to be, you know, there's always going to be server side
code that's running.
But I think we'll see a lot less of templating templating languages in particular, more JSON,
less HTML and lighter weight, smaller building blocks, something like that.
The applications, the applications that people want to build are really for phones.
You know, people want to build applications that run on many platforms.
I mean, they still have to run on a desktop and everything.
But if you'll notice, you know, some very, very big sites now are are very clearly sort
of, you know, optimized, not optimized, but, you know, they they they are.
What's the word response?
They have responsive design for for both phones, tablets and the desktop.
You know, like if you go to orbits, for example, orbits dot com.
It looks terrible on a desktop.
It's awful, you know, but it looks good on a phone.
Yeah, it used to be it used to be much easier to use, you know, but really what people want
is just a way to maintain this stuff so that they don't have to write, you know, the desktop
app and the desktop web application and the phone web application and everything.
And there are so many more phones these days than there are computers that that, you know,
they already know how to do UI.
You know, they have a they have a UI layer built into them and they they don't need
HTML.
It's nice to be able to use it if you if you have a web view on the phone or whatever.
So I think I think anyway, I'll be cut that short, but I think that's the way it's going
to go.
OK, yeah, that's very interesting.
And there's you know, you see the sort of hosting services popping up to be just the back
end for phones.
And that could be from a Cordova HTML based phone app or it could be like a Swift iOS app.
Yeah, that's I'm thinking of like Azure Mobile Services or Parse.
Parse, which was acquired by Facebook.
And some of these guys are really doing interesting stuff.
Can you speak about any like well-known deployments other than, of course, talk python to me dot com,
which I'm ranking up there.
But I've seen that on Alexa.
I think that's like number three.
It's probably three or two.
I haven't checked today.
I can actually.
I didn't know.
It was really funny.
I was reading Reddit and I saw an article about Yelp infrastructure.
And I was like, oh, I'll go check that out.
Sounds interesting.
It was they were talking about how they had deployed a service oriented architecture infrastructure.
And so I read through it and halfway through it, I'm like, they said, our, you know, server, you know, Python backend server stuff is built on pyramid.
I was like, well, I had no idea.
That's pretty fantastic.
Yeah, that was that was great.
So when you go to Yelp, I think if that article is true, I haven't I haven't spoken to anybody.
I have no idea how accurate it is.
But I think all that stuff runs a pyramid.
There are a number of other sort of, you know, well, far lesser known sites that I've developed.
If you go to environmental health sciences dot org, that's a that's a pyramid site.
If you go to Carl project dot org, that's a pyramid site.
We've we've worked on these projects.
And I think some other folks have, you know, a little bit.
Oh, survey survey monkey.
Oh, yeah.
Survey monkey.
That's cool.
Survey monkey is a local company for me here in Portland.
So I know those guys.
Oh, that's right.
Yeah.
They have they have an office.
Is I don't know if their headquarters is.
I'm not sure where their headquarters is.
I just know is walking around town like, oh, wait, they're they're here.
They're for them.
That's interesting.
Yeah, I think I I've been to their San Francisco office, which is beautiful.
Sorry, Palo Alto office, which is beautiful.
And I know a lot of those guys there.
Some of cars dot com is pyramid.
I know a guy there who's a fantastic supporter of pyramid.
Hello, Michael.
Michael Ryabushkin, also known as Goodwill.
He hangs out on IRC a lot and he he organizes a lot of stuff for us.
And just most recently he is he got cars dot com to sponsor a the graphics and display
artwork and stuff for a booth at PyCon for us.
And he did.
He's done it for like three years in a row.
Oh, that's fantastic.
And and he is a he is a great supporter of pyramid.
He does a great job.
The other, you know, over Christmas time, he sent me a monitor in the mail just showed
up.
Wow.
That's really generous.
Yeah.
So so, you know, I'm I'm really I'm really lucky that that people like him around and other
people have done the same.
I've had people send me send me several hundred dollars, you know, just out of the blue.
Just wow.
That's great.
It's like thanks for thanks for building this great framework.
Yeah, that's right.
Our company runs on it.
So, you know, cheers.
Yeah, it's really humbling.
You know, I was I was saying about cars dot com.
I think some of that runs on it and I'm sure there's other people.
I'm sure I'm forgetting somebody.
Yeah, I'm sure there's there's there's a whole bunch of sites that don't talk about what the
infrastructure is that are probably.
Yeah.
I think I think for sure there are still more Django sites, you know, high profile Django
sites, I think.
Yeah, I'm sure there are.
So, you know, people who are out there listening, if you've got like a cool, well-known site, maybe
you should email Chris and just say, hey, Chris, you know, such and such runs on
pyramid as well.
And I will forget about that like I forgot about all the other ones as well.
No problem.
I can forget for you all day long.
Perfect.
All right.
Well, I think that that's a lot of interesting stuff about pyramid.
Is there anything else you'd like to kind of add?
Yes, I would.
Actually, I am the originator of, you know, I started the first file in the project and all
that stuff.
But over the last year or so, I have had to go and work.
You know, I've had work to do and I took some time off.
And I've I've I sort of didn't do as much on on pyramid or any of any of the other pylons
projects projects.
There are a group of guys.
Michael miracle is he's on.
I should say this.
There is a there is a pyramid IRC channel that if you're interested in pyramid on on free
know that you should probably get into.
He's I'm I'm M.C.D.O.N.C.
And they're McDunk.
And the guy, Michael miracle, who is also a core maintainer.
His name is radio.
R.A.Y.D.E.O.
And there's a guy who now is kind of I think we tricked him into maintaining Webob.
His name is Berger's year.
I'm sure I'm murdering his name.
But he's he's he's he's Norwegian.
So I'm allowed to do that.
God, I hope he's Norwegian now.
He's Scandinavian in some sense.
I don't know.
That's great.
So some people are coming along to pick up the the effort.
Yeah.
And and and really, I am I am I have contributed far less than those people have.
And there's other guys, you know, John Anderson.
There's a bunch of guys in there that really picked up the slack when I when I sort of, you
know, wandered, did a bit of a walkabout.
I'm getting back into it now.
But there's those guys are really the guys who've been carrying them, carrying the water
for for at least a year now.
OK, do you guys do you have any future releases coming up that you guys have like a roadmap for
you can talk about or is that still?
Yeah, no, I think I think I'm hoping, you know, as we record this, it is it is April 6th
and and PyCon starts on April 9th, maybe even earlier than I think about it.
Yeah, maybe April.
I think it's Wednesday, actually, possibly.
OK, maybe people arrive on Wednesday.
I'm not sure.
But it's definitely coming in fast.
Yeah.
And I'm sort of closing last issues now that I hope will let us have a release by PyCon of
Pyramid 1.6, which has a bunch of new shiny features in it and and and stuff.
So that should that should be good.
That's great.
Well, by the time this comes out, people will it maybe will be already out.
So that'd be great.
Yeah.
So go go go go check out look for Pyramid 1.6.
Yes.
Yes, definitely.
All right.
Is there any final person or thing you want to give a shout out to somewhere you want to draw the listeners attention to?
Well, if you're if you're if you're interested, you should go to pylons project dot org.
That is the main site for all this stuff.
And you'll see pyramid and you'll see Web of and a bunch of other things listed on there and documentation.
And that's the that's the place to go and and visit the RC channel, the pound pyramid channel in free node RC.
And those are the places you can come and talk to us and make us laugh.
And and also I wanted to give you a shout out because I think I think you're I'm really happy that there's a new Python podcast.
I I will listen to all the other episodes.
I will not listen to this one because I'm terrified of hearing myself.
Well, thank you so much.
I really appreciate your kind words and the community support has been really amazing.
Like the amount of messages I got on Twitter saying thanks for creating a new Python podcast have been really overwhelming.
So, you know, that that's great.
And I really appreciate it.
Chris, thank you for being on the show.
This is this is really interesting.
I'm a big fan of pyramid and use it for a couple of projects.
And I definitely definitely recommend people check it out on your docs.
I thought you have some really nice sort of tutorial walkthroughs that were quite easy to get started with.
So well done on the docs as well.
And thanks for being on the show.
Thank you.
I appreciate it.
Thanks very much for having me.
Yeah.
Talk to you later.
Bye bye.
This has been another episode of Talk Python to Me.
Today's guest was Chris McDonough.
Thanks for being on the show, Chris.
Remember, you can find the links from the show at talkpythontome.com slash episodes slash show slash three.
And if you're feeling generous, please check out our Patreon campaign at patreon.com slash mkennedy or work with your company to encourage them to sponsor an episode.
This has been your host, Michael Kennedy.
Thanks for listening.
Smix.
Take us out of here.
Staying with my voice.
There's no norm that I can feel within.
Haven't been sleeping.
I've been using lots of rest.
I'll pass the mic back to who rocked it best.
you
Thank you.