Hello and welcome to Python Bytes, where we deliver news and headlines directly to your earbuds.
This is episode 229, recorded April 14th, 2021. And I am Brian Okken.
I'm Michael Kennedy.
Hi, I'm Gwen Faraday.
Hey, Gwen. Great to have you here. Thanks for coming.
Yeah, thanks for having me.
We invite you because you're doing really cool stuff with Python and you're doing some neat
things on YouTube and some, are you doing live streaming as well or just videos?
Maybe just tell people real quick about yourself before we get into our topics.
Yeah, sure. So I'm, I work as a senior software developer at a consulting company.
We do almost entirely Django projects there. And I've really loved getting to use Django for the
past couple of years. On the side, I also teach at a coding school where we do full stack JavaScript,
but most of our backend and computer science curriculum is actually Python. And then we also
use Django for the final portion of the curriculum as well as the final project. And then on the side,
as Michael mentioned, I really like to make videos and content and things like that. So I've done a
mixture of JavaScript and Python content under the name Faraday Academy. And I also have Twitch live
streams. So most recently for Python, I've been kind of diving into FastAPI live and trying to learn
async Python since I haven't really done much with async Python in the Django world.
Nice.
Yeah. Super fun. FastAPI is a great technology to work with. So you sound like you're busy,
but in a good way.
But I love programming. So it's like my passion. It's not burdensome, I guess.
Yeah, it doesn't count as work. That's great. Brian, you want to kick us off?
Yeah. The first story I want to cover is about coverage. Couldn't help the bad pun. So Ned
Batchelder put a post out just the other day. There's a beta out for coverage. It's a 5.6 beta one.
It's kind of a big revamp. Well, I don't know how much code he changed, but he says it's a big deal.
So the thing that's exciting about this is it's supposed to exclude third-party packages. This is
actually amazing because in the workflow, one of the problems I've had before is I'm just like,
I've just got some, just starting out with a project, say, and I got some code in a directory.
I've got my virtual environment there also, same directory, throw some test code in there.
And I want to tell, you got to have to tell coverage. If you don't give it any flags,
it just measures everything. But now it doesn't. Now, if you say like coverage run pytest or coverage
run your, like whatever your module is, because there's, you can run coverage without tests too.
It's a thing. It just, it just grabs everything and reports everything. And that's hardly ever what
you want. So the change in 5.6 beta one is to, to, to knock out the third-party packages and,
and not collect those. And I tried it out on a couple of projects. I want to try it out on more,
but like, for instance, if you do it on your current direct, even if you say, give it just your current
directory, it's going to include all your virtual environment there if it's there also. And you know what that,
so this is a really cool thing. and he's, he's also, it's beta because he'd like to hear
from people to find out if there's problems. So go out and test it out. I haven't tried it on,
um, pytest plugins yet. That's what I'd like to do next, but this is cool.
Yeah, that's really nice because obviously you want to have code coverage of your code,
but you absolutely have no interest in testing other people's projects, right? There, there are packages
that you're using and whatnot. So yeah, that's perfect. Do you have to do anything to make this turn on?
Uh, well, yes, you have to right now, because it's in beta, you have to initially,
you have to install coverage equals equals we've got, we've got it in our show notes, but coverage
equals equals 5.6 B one. It's also in the, the blog post that we linked to, but, and it works
with, so I tried it also with the pytest dash cov plugin. And if you install pytest cov and then install
this other version of coverage, they'll work together and you can use them together too.
So yeah, very nice. Gwen, what's the coverage story for you all? You do, unit testing,
code coverage analysis, things like that.
So as far as for Python and Django projects, we do some testing, I would say not enough testing. So just like most companies I've worked at, we always have the discussion. We should do more testing. And sometimes we do more testing and sometimes we don't. So, our development team has been talking about it. So actually this package, code or coverage.py I've never used before, but I was reading about it in the show notes and looking it up before this episode. So I was like, Oh, yeah.
That's a really nice tool. I think I'm going to use it, but mostly we do unit testing.
Yeah.
Um, like really complicated areas that we think might break or might have edge cases or something like that.
That's actually a great use for coverage because you can, like, if you specify the sort, like which source to cover, you can zoom in and say, I just have this little directory or this, these few modules of code. You can say, just cover those. And, and you can check the coverage on that.
Yeah.
That's interesting. So you could generate reports on different areas, even.
Yeah.
Nice.
Yeah. Like I only care about this part. So just tell me about this part. Yeah, that's perfect.
Yeah.
All right. Well, this next one that I want to cover has to do with platform as a service. So we often hear about Azure, AWS and, and the Python world. Heroku is very popular, but you know, these platform as a service places, you, where you get push your code and then it makes servers go.
Servers go and new versions get deployed and who knows how that happens. It's all well and good if you want to run in the public cloud, but what if you want to run just on your own servers? So Ian Maurer sent over this thing called Piku. So Piku is the tiniest pass platform as a service you've ever seen. It allows you to do a get push deployment to your own servers. Isn't that cool?
Yeah.
Yeah. Yeah. So the idea is you basically set this up on your server and then you connect it basically directly through GitHub. And then whenever you do a get push that automatically kicks off a new server creation.
I think it probably is running on Docker or something like that, but not a hundred percent sure. I haven't dug into the internal tout runs, but so here you can even see on, on the right of the homepage, which is an animated GIF. You can go and check that out.
But you just need to sort of see what it does. It says, as soon as you do a get push, it'll come along and says, you're remote creating as opposed to just, you know, writing objects, you know, push done. It like continues on. It says remote creating app, deploying app, your branches up to date.
Now your app is created creating virtual environment. And you can basically tell it what your requirements files is, what the execute file, just like Heroku, you give it a, like a proc file or something. It's called something like that, where it just basically says, when you run this project, what command do you give it?
And then it just runs. And that's, that's pretty cool. So it's really meant to be especially useful for low end devices. So I think this originates actually from working on Raspberry Pi. So like get push deploy to Raspberry Pi, which is a Raspberry Pi clusters, which is awesome.
So that one of its, you know, some of its core ideas are it's supposed to run on low end devices. It's supposed to be accessible for hobbyists and, you know, lower school, like K through 12 school grade students.
The whole platform as a service is about a thousand lines of code of Python, I think, and quite functional. It adheres to the 12 factor app of like separation of concerns and separation of configuration and login and so on.
Yeah. It's, it's pretty neat, pretty simple to use. And then you just install the client and then you just do your, your get pushes with this thing.
So if you've got a bunch of Raspberry Pis or other devices you want to use as a platform as a service, here's a pretty interesting option.
If you just have also plain Linux x86 machines and you want to make them be, you know, something like Heroku.
You know, I went through a lot of work over at TalkByThon training so we can get push to a production branch and that automatically kicks off this whole workflow that, you know, not just updates the requirements and installs the new ones and restarts it, but a little bit more than that.
It was a lot of work. This thing sounds really handy if you've got a pretty straightforward case, but you kind of want that same workflow.
Do you know, does it just work with GitHub or can I use it with other things too?
I think it just works with Git. I don't think it has anything to do with GitHub itself.
Oh, okay.
Yeah.
That's great.
Yeah. Yeah. It's pretty cool. So if you go and you watch, if you watch the GIF, the animated GIF and you click on it, it becomes like a little movie type thing.
You can see they start from an empty directory with the code that they create or the code is already there, but it's not in source control.
Then they get in it, the local repository, then they add a remote, which is not GitHub. And then as soon as they push to it, it kicks off the creation and running of this thing.
I think we're going to use this because just for like internal servers. So I've got internal projects that we can't host them on Heroku or something like that. That just ain't going to work.
Yeah.
But we could, you know, update the website and stuff and push to Git and have it pull it into the server automatically.
Yeah. There's all these little internal web apps that people run at companies that wouldn't make sense necessarily to run on a public cloud because maybe they need to talk to local infrastructure.
And you guys even have hardware devices where you're working that you actually talk to.
So yeah, here's a way to get a better deployment story without making it your next project to keep maintaining.
Nice.
Yeah. I was, I was looking at this and I have a somewhat clunky setup for personal projects where I have different Docker containers and watching and the Watchmen Docker container running on my servers.
So I was looking at this, I was like, that's so easy. Why don't I just use this?
Exactly. Yeah. I don't know how flexible it is and how much of a general solution it is. Cause like I said, I already have a solution that is like this, but I'm super glad to be able to just get, you know, get push to a certain branch.
And that means in 30 seconds, it'll be deployed in a consistent, reliable way that I don't have to think about. It's, it just makes it so easy to go, Oh, this, this part of the code is ready for production.
Get push. And as opposed to all the steps that a lot of people go through manually to do various things. So yeah, cool. Definitely neat. All right.
Gwen, you got the next one, something kind of in the news these days.
Yes.
So this kind of fit in with, you know, everything that's going on Reddit and the news and everything. So blockchains, I think most of you have heard of blockchains and Bitcoin and Ethereum.
And there are ways to basically build applications for the blockchain using Python. So for example, web3.py is a popular library where you can interact with the Ethereum blockchain via a Python API.
So it's basically a wrapper that it gives you. And there's also a similar language to Python that was built for the Ethereum blockchain.
It's called Viper. So it's kind of a Python, get it? Python and Viper, they're both snakes.
But it's basically a Pythonic language. So you can actually write these smart contracts or applications for the blockchain in that language or in Solidity or, you know, some other language.
Yeah.
And you can deploy your applications to the blockchain and then you can interact with them or interact with any general blockchain information using Python with web3.py.
So it's a really robust library and solution. And especially with, you know, NFTs or non-fungible tokens and things like that being so big right now, you know, using web3.py,
you can also interact with those types of contracts that you deploy to the blockchain and build applications for people as well and for users.
Oh, this is really cool. You know, I haven't done nothing with the blockchain and nothing with cryptocurrency.
So Ethereum, is this more, this is more a blockchain thing, not a cryptocurrency thing? What's the distinction there or is it not?
So cryptocurrencies, basically, they're built on the blockchain, right? Or some other type of post-blockchain technology, which evolved from blockchain.
So you can use this to interact with cryptocurrencies.
So you can use this to interact with these. But you can also build really any type of application on the blockchain and use web3.py to interact with it.
Whether it's a voting application or some kind of exchange or whatever you want to do on the blockchain.
You will have the API interface with web3.py.
I just bring up non-fungible tokens because of all the artwork and, you know, all the hype around, what was it, Dogecoin.
Yeah.
And all of that stuff.
So you could have taken a screenshot of Brian and we can make it a non-fungible token and sell him.
What do you think we could get from Brian?
We could take multiple screenshots and just, you know, sell like hundreds of them.
Yes, exactly.
Yeah, I think the non-fungible token stuff is, it's really interesting.
It's really far out there.
But the blockchain seems to be the most concrete, practical, you know, you could build stuff.
Like you mentioned voting and other stuff, I could certainly see if the world could ever get it together.
Some kind of voting, online voting system based on the blockchain.
Yeah.
And some places, some organizations, and also I believe some countries and localities are already using the blockchain for things like that.
Nice.
I think it's even being talked about in our own government.
They have some committees that are talking about using blockchain in different ways, of course, with securities and how it's going to affect securities, but also with other possible future use cases, like things like voting.
Awesome.
Yeah, I'm going to have a woman from the FEC, Federal Election Commission, on Hawk Python to talk about using Python for the FEC.
And I feel like we definitely got to talk about blockchain.
That's interesting.
Yeah, that'll be fun.
Man, you get some cool hosts or guests on your show.
That's great.
Thanks.
Yeah, so I'm really excited with where blockchain is going, you know, being used in supply chain, in refugee camps, in pretty much every major bank now.
Every country is looking into blockchain.
So I think it's a really good thing to get on board with.
And Python is a really easy entry way to prototype anything in Python.
So you'll see a lot of people want to find out about blockchain, like their own test blockchain in Python to understand it.
But there are also libraries where you can interact with real blockchains like Hyperledger SDKs in Python.
So you can use different kinds of popular blockchains or the most popular blockchain now, which is Ethereum.
So you can interact with that via Web3.py.
Yeah.
Okay, cool.
If people want to check it out, this is a great recommendation.
Quick question from or comment from the live show.
Tune Army Captain says, at what point does this become about monetizing?
Orcruxes.
Orcruxes, yes.
Orcruxes.
Brian, help me out here.
I think so.
Yeah.
Today.
It's gotten there today.
Absolutely.
All right.
Well, very cool, very cool recommendation.
What's the next one that you got here, Brian?
I checked this out.
I'm super excited about this.
This is a great idea.
Yeah.
So this was a recommendation from Johannes Lippmann.
He mentioned in episode 227, we talked about Snyk.
Snyk?
S-N-Y-K.
Snyk.
Snyk Package Advisor, I think it was.
Yeah.
It tells you how, it gives you a health recommendation or health score on any package,
Python package.
Well, this is a similar, well, it's not really similar.
It's, I guess, in the same category.
So dead dependency.
So D-E-A-D-Pendency.
So this is a tool that's got, there's a paid version, but it's free for open source projects.
And it's a GitHub thing or GitHub application that you plug in.
Yeah, GitHub app.
Yeah.
And what it does is it looks at your dependencies.
And so if you, and it looks at the, it looks at a lot of stuff and it looks at, so let's,
I'm just going to bring up an example.
Somebody who wants to add some functionality to your service and they, or your project, they
change it to, and it adds a dependency.
One of the things you'll see in the pull request, if you use, if you use this is a dead dependency.
We'll go out and look to see how healthy that dependency is.
So you've got a new one in there.
And, and it's got a whole bunch of configurable options that I really think are pretty cool.
It checks for things like how recent was, wanted to make sure that there's recent, recent releases, recent commits.
And they're pretty broad.
The defaults are like, has there been a commit in the last 12 months?
Yeah.
Can you scroll down just like one page to the jQuery example?
Yeah.
Okay.
Yeah.
That's a great example right there.
Yeah.
So the, one of the, their example is you've got a jQuery UI that's added.
And what it does is it doesn't just check for one thing.
It looks for all of your dependencies and it shows that, you know, a couple like jQuery UI
hasn't been released for over 12 months.
And then a package called nom nom that's no commits for the last nine months.
And it's been deprecated in the package registry.
So it checks for deprecations and, and, and also things like, yeah, if it's been deprecated
or if there's just, it's gone down to a single author, maybe that might be at risk for some
projects.
So, but all of it's configurable.
So this is pretty neat.
Yeah.
I love the idea.
And it works not just for Python or as JavaScript as you mentioned, but also Rust, Ruby, C#,
Kotlin, a bunch of stuff.
Yep.
There are some, I tried it out and I couldn't get it to work, but I know why I couldn't get
it to work.
I'm using Flit now.
So I'm using pyproject.toml for my dependencies and stuff in my projects.
And this doesn't support it yet.
It supports requirements.txt and pip file.
And last night I was playing with it and I sent him an email and said, it'd be really great
if it would support setup.py and pyproject.toml.
And gosh, within an hour, I got a response back and said, yeah, you're right.
We should do pyproject.toml.
It's a simple format and we'll try to support it.
But setup.py, a little more difficult because as we know, setup.py has no real restrictions
on its formatting.
So there's a lot of crazy stuff out there for that.
Yeah, for sure.
Quinn, what do you think?
Yeah, I was just going to say I was going to try this out on a project, but I also use
poetry.
So I use pyproject.toml for the dependencies.
But like you said, it's an easy format.
So maybe if they support it soon, I'll try this out.
It seems like a really good idea.
Yeah, it's fairly new too.
It looks really slick.
Their website's all nice and great.
And I'm like, oh, they must have been up for a while.
As far as I can tell, it looks like at least their defect tracker, they've got a GitHub defect
tracker that's only been alive since last September.
And they already support a whole bunch of stuff.
So hopefully we'll get some new features here soon.
Yeah, fantastic.
And I just came up with a new idea for a GitHub bot.
So you have a GitHub bot that if you put a pyproject.toml or a pip file, it'll automatically
create the others and keep them in sync.
So if you check in your pyproject.toml, it'll automatically generate a requirements.txt that's
in sync.
And if you make changes, it'll update it.
And so you can work with whatever tools you want.
That's my new idea.
Isn't everything switching over to pyproject.toml now, though?
Well, for packages, it's not everything is.
A setup is going to be supported for a long time.
But you can use setup tools with pyproject.toml.
So there is a lot of people converting.
But that's for packages and stuff and libraries.
A lot of applications don't use anything like that.
They just use a requirements file.
Yeah, I used to use a requirements file.
And then I switched to using poetry like a year ago.
And I was like, what have I been doing all this time?
So much nicer.
Yeah, poetry is nice.
Very cool.
Yeah.
Speaking of switching to new things, I wanted to talk about all the important changes and
features in Python 3.10.
So excited.
So exciting.
Yeah.
So this is a blog post by Martin Hines.
Apparently, blog post number 47.
Look at the URL here, which is interesting.
And basically what it does, it just walks you through all the stuff coming in Python 3.10.
So Python 3.10 has been in alpha for a little while.
That means features changing.
But now it's about to go beta.
So it's about to stabilize.
And it's time to start thinking about what features are coming because they're most likely
going to be fixed as they are.
First thing it talks about is how to go through installing the alpha or the beta, whatever the
latest version is.
It's pretty simple.
So you just do the, you know, download and install from source, except for it has this
comment to say make install.
You're welcome to run make install, but that will make your Python 3 and your system be
the alpha Python 3.10, which you might not want to do.
I mean, you may, but you might not.
If you say make alt, A-L-T install, alt install is one word, then it'll just install it.
So you can refer to it as Python 3.10, but it won't replace your system Python, which I
would recommend.
So there's some interesting improvements for type checking.
One of the things that's really nice about Python is you have this optional type hint type
checking, type hint type annotation stuff, but it can get kind of crazy with the generics.
Like if I have a generator that returns a list of integer, I mean, it's just like the way
you express that and kind of almost like generic syntax, like generic from C++ style, it gets
a little wild.
So one of the improvements is around union because you can say, well, this thing will either take
an int or a float and I can just deal with it as basically a number.
So you used to have to say from typing import union, and then you would say union bracket
int comma float bracket.
And that was the thing.
So now you can just use the pipe or the or the bitwise or operator.
So int or vertical pipe float.
And that tells you it's a int or a float.
What do you think of this?
You'll like it?
I think it's nice.
That seems cleaner to me.
Yeah.
Wonky.
Yeah.
I didn't like the union before.
I mean, I was glad it was there because we needed it, but the or makes it nice and clean.
Yeah.
I almost never used the union because it was just, it was just messy.
Anyway, this is pretty nice.
There's also some stuff about is instance and is instance.
So you can, you know, that exists already, but you can pass this int or string, you know,
int pipe string in, and it'll tell you if it's either an int or a string as an instance,
which is kind of a cool thing as well.
Oh, wow.
Yeah.
You can also create type aliases and you could do that previously.
So if I have a thing, I want to call a file name and right now it's a string, but maybe
it becomes a class later because we're going to upgrade it.
And I just want to refer to it as this right now as a file name, right?
So you used to say file name equals str, S-T-R.
And there's no real way to understand that.
I'm just, I'm trying to create a type definition, but in fact, it just tells me, well, there's
this other name for the string class, right?
And that worked, but there was no way for the tools to know what your intention was.
So now there's going to be a file name colon type alias equals string.
And that will tell you file name is an actual alias for the class string, not just it happens
to be a thing that looks a whole lot like it.
So that's kind of cool.
There's some stuff about knowing on integers to figure out how many bits are involved.
That's not super applicable or usable.
Disky tools, speaking, I mean, you may want to know, but it's like not, I doubt it's a big
question.
People want to know often.
Disk details are being deprecated and they've pretty much been deprecated for a while and
you should be using setup tools and packaging.
But, you know, they were officially deprecated in 3.10 and will be gone in 3.12, just so you
all know.
This next one I'm excited about quite a bit.
It's super common to want to have more than one thing that is tied to a context block, like
a with statement.
So if I'm going to open two files and I want to make sure I close them both, even if there's
an error, it would make a lot of sense to say with file one, with file two.
And so what were your options?
You could have one with block and then indent another one just to have the second file, which
is weird.
You could create the files separately, the file object separately and say with file one, comma
file two, and then use them.
That actually worked.
But what if file two crashed when you tried to create it, then file one would leak?
And there's just like all these weird situations.
So now with blocks support multiple lines with parentheses.
So I can say with parentheses thing one that has to be managed in the context thing two that
has to be managed in the context and so on, and then work with them.
And they're treated as a block, which I think is sweet.
That's going to be very useful because I've had times where we've had two or three levels
all the time.
So yeah.
Yeah.
So you're usually juggling some edge case that might not quite work, but usually works.
And this is just make it part of the language, make sure it always works.
I love it.
Also a performance.
So it brings some performance improvements for constructors like strings, bytes, byte arrays,
and so on.
And then also working with functions that have type annotations, I think are something
like two times faster.
They are now the type annotations are evaluated at compilation time.
They are evaluated at runtime, which would slow them down.
So that's nice.
And then the big one is the switch statement, which we're not calling switch statement.
It's pattern matching.
And we actually talked a lot with Brett Cannon about that.
And I think people appreciated that episode where we got to dig into that, right?
Yeah.
Yeah, that was fun.
So there's some nice examples of what you can do, like basically how it works, you know,
match on day, case Monday, case Friday, case Saturday or Sunday, and so on.
And then some more interesting ones about matching objects like classes where you're looking at
multiple fields.
So you can match on age and you could match on gender.
This is like a person example, name, age, gender, and you could match on different things.
And depending on how it matches, you kind of fall into these case statements.
So we've gone over that a lot.
I don't want to dive into it too much, but pretty neat to see these examples here.
So that's, I would say that's the big change that's coming.
Don't know what you two think.
Do the case statements fall through like JavaScript?
There is a fall through.
It's not in these examples, but there is a fall through mechanism.
Okay.
But not by default.
Well, it's not called default, but I think there is, I can't remember the syntax.
Oh, I mean like, so from the first case.
Oh, right.
Yeah.
You don't have to say break.
I don't think it falls through.
Yeah.
It doesn't fall through.
Yeah.
Because in C++, if you don't say break, you're going to print all, it's going to run every
case top to bottom, right?
Well, depending where it matches, from where it matches onward, basically.
Yeah.
No, I don't think it falls through in that sense.
But there's a default.
But the fall through mechanism in C++ and C and Java, other type language, C-like languages,
it's caused me more problems than it ever solved.
I mean, I've actually wanted it to fall through.
I'd rather have a fall through keyword than have it have to put a break everywhere.
Yeah.
I agree.
Yeah.
I just use my go-to statements and we're good.
So, it's still fine.
Dean out there in the live stream says, can't wait for 310 now with a double context or multi-line
context.
I agree.
Those are quite awesome.
I think that's a really good feature.
And it's super simple.
So, I like that a lot.
I wanted to add a couple things.
I just found out today that one of the things that's going in 310 is some better error messages
if you use an attribute error, if you try to access from name tuple import something else.
And you get something wrong.
It tries to give you a suggestion for what the right thing is.
And that'll be really cool, especially for working on the REPL and stuff.
And I also wanted to point out that I don't think I would build Python.
I would just download it.
If you Google Python 310 download, you can get it just from Python.org.
You can download it there.
Without compiling it?
Yeah.
It's just the installer.
I'll put a link in the show notes.
Yeah.
Or use PyEv.
Yeah, PyEv.
Right.
Yeah.
You can use PyEv.
Yeah.
Sure.
Cool.
All right.
Well, that brings us to the next item, but I don't have the link to it.
That's yours, Glenn.
So you want to tell us about it?
I think I can just Google it.
I'm not going to Google it.
I'm going to DuckDuckGo, but carry on.
Good.
I use DuckDuckGo too.
Nice.
So yeah, I wanted to give a shout out to FreeCodeCamp's Python curriculum.
So last year, they launched a Python curriculum with, I think it's almost a thousand hours of
curriculum material between challenges, lessons, and of course, projects and certifications as
well on topics from Python basics to data science, machine learning, algorithms, all sorts of things.
And that's in addition to the thousands of hours they already had learning JavaScript and basic
programming skills and algorithms and other types of things.
So that Python curriculum was in the works for a few years.
I've been a top contributor with FreeCodeCamp for a couple of years.
So I got to go to their summit before the whole COVID thing hit.
And I remember everyone getting together, kind of talking excitedly several years ago about Python
coming out.
So it was definitely in the works for a long time.
And a lot of people put a lot of effort into it.
So I think it's a really good curriculum.
And FreeCodeCamp has also done a really good job of putting out a lot of supplementary material
in Python and data science.
So you can see on their YouTube channel, I believe they have over 100 hours of Python content,
including this one 12-hour Python data science crash course on their YouTube channel.
And they also have one of the most popular developer blogs on the internet.
I'm also a writer for them.
So recently I wrote one Django article and I have a whole bunch more Django articles that I'm
planning to write when I get around to it.
So as far as Python education, I think this is a really good option that's free, accessible
to anybody, even on mobile devices.
And one that stayed true to its mission.
It didn't just build to kind of sell out to another company.
But since I believe the end of 2014, when it's launched, it's kept this mission of making coding
education accessible to everyone.
So I think they've done a really good comprehensive job of now adding Python onto that.
Oh, and they're also adding on...
Right now they're working on an even bigger expanded curriculum for that data science and machine
learning that they have right now in Python.
It's going to include all the different math and a lot more elements of machine learning than
it currently covers.
So yeah, I'm excited for that.
They were raising money for it this year and they've been working on it since last year.
So I'm hoping we'll see at least the initial stages of that soon.
Yeah, very cool.
I put my...
I worked with them to put my free MongoDB course up there, which is a Python course.
Oh, awesome.
A little bit up there, yeah.
What were you using with MongoDB?
It was just some...
It wasn't even a real web framework.
It was something that kind of was just a simple CLI app that talked to it to keep it not complex.
Oh, okay.
Yeah.
Very cool.
I've been using Django for Django and MongoDB.
Okay, that's cool.
It actually works pretty well, except the migrations are a little bit funky.
Okay.
So it's not easy to roll back the migrations like it is if you use Postgres.
But overall, it works really well and you can use the same ORM in Django.
Oh, that's fantastic.
I use MongoEngine for my main stuff, which is very much modeled on Django, but it's not Django itself.
Yeah.
Nice.
Let's see.
Really quick, a couple of fallbacks.
Robert Robertson says they should create an error message package that breaks down your error into plain English.
That's a good idea.
Cool.
Yeah, that's a great idea.
And then Dean says there are third-party packages that do it nicely.
Brian, do you remember if we've covered any?
I don't.
I mean, Dean, if you've got some ideas, throw them out there.
I think we do, but I think we did cover them, but I don't remember them.
I know we've covered stuff that do things like pretty print the message or highlight certain parts so it's clearer.
Yeah.
But I feel like it would be cool if it would just print the first stack overflow response, accepted response underneath the crash.
That would be fantastic.
Well, and we talked about possibly just formatting your error message nicely so that you could Google it or duck-duck-go it of like how to search for this on the internet.
So, like escaping quotes and things like that.
Exactly.
That'd be cool.
Somebody else, let's see, PyLine mentioned, and I think this is right, that the fall-through on the pattern matching is the underscore.
I think that's correct.
Is that the default?
I think that's the default case, not the fall-through.
Is that right?
Right.
Not the fall-through, the default case.
Yeah.
Okay.
Thanks.
So, I don't think there is a way to, I don't know.
There might be a way to fall-through.
There's like always, yeah, I don't know.
I haven't played with it yet.
Yeah.
Dean points out that we covered the one that has, you can ask why.
Remember, you'd ask like why, what?
There's a bunch of Ws, and we're kind of coming up with the name of like a name for the better name or for another what we can ask, like WTF or something like that.
I don't remember what that's called, though, sadly.
That was a fun one.
Oh, that'd be a great package name, Python WTF.
All right, Brian, is that it for our main topics?
Yeah.
All right.
You got any extras you want to cover?
Yeah.
I do, as always, but yeah, how about you?
Well, I don't know when it'll get released, but I just recorded it.
But a few episodes ago, we talked about Python Adventure, so an adventure game, a text-based adventure in Python.
Yeah, there's Python.
Yeah, I got to talk to the creator on the testing code, so there'll be an upcoming testing code.
I'll go in-depth into that, so that'll be good.
Yeah, yeah, very fun.
How about you?
Let's see.
I got a couple things.
Let's see this one.
We talked about the Supreme Court ruling on Java, the Google versus Oracle.
Maybe for the Oracle versus Google is maybe how it should be said.
But I think it's just, in passing, interesting that Microsoft has now unveiled its own Java distribution,
the Microsoft version of OpenJDK, to compete with Oracle in the Java distribution space.
I know that we're not really a Java podcast, for sure, and I don't do any Java, but I think it's an interesting open source follow-on to covering that last time.
What do you think?
I think this is going to be big.
A lot of people already have Microsoft distributions all over their workplace.
Yeah.
Gwen?
Yes.
Any comments?
Any thoughts?
Oh, comments on Java?
Yeah, yeah, yeah.
This ain't no.
Okay.
I got a couple more, and then I know you have some things to throw out there as well.
It's a very colorful splash screen, which is always fun.
But its main thing is it has much better support for a Windows subsystem for Linux.
It has better indexing, so much faster indexing.
It does cool things like if you need to type, let's say you have requests installed, but you haven't imported it into the file.
If you type RG, it very likely may propose to you request.get as an autocomplete option.
If you choose it, it'll write import request and then autocomplete request.get all in one tab completion.
So they've done some really cool stuff with the autocomplete to kind of ramp that up.
And there's a few other things as well.
But yeah.
Anyway, if people are into that, check that out.
We covered Beanie a couple times.
We covered Beanie the first time introducing it, which is an ODM for MongoDB based on Pydantic, which is super cool, by Roman Wright.
And then I said, I reached out to him and said, oh, that's great, but you should have a way to add indexes.
So he did, which was really cool.
And Gwen just mentioned migrations.
So he just added migrations for Beanie as well.
And there's some really interesting ways to write your migrations and convert from one schema to another.
So basically you say, here's the old model.
Here's the new model.
Fix it.
It's more or less the way that you say that.
So yeah, that's pretty cool.
We already covered it, but definitely just a neat thing to see that he's adding it.
So congrats on seeing that thing grow.
Gwen, I know you got a couple of things you want to talk about.
Mem.dev.
That's a really cool thing.
I didn't know about this before, but I checked it out when you put it in the show notes.
Yeah, it's basically a spaced repetition learning system, but built specifically for developers.
So a lot of people use Anki, which is its own algorithm.
I also use Anki synced across my desktop and mobile phone and everything.
To learn different concepts, mostly programming, computer science, all of that stuff.
But one thing I like about also using Mem.dev is that there's a browser plugin and I can
directly copy snippets from places like Stack Overflow.
In all those coding boxes, it will have like a Mem.dev icon in the corner of any coding box.
And I can just copy the snippet to make into a card later on Mem.dev.
Another really cool feature is it lets you practice keyboard shortcuts now.
So to get faster and better as a developer, it's really good to practice different kinds of keyboard shortcuts.
Also, I find it helpful because things like Django have a massive API.
And as a consultant, I feel like I'm being pulled in so many directions.
It's really hard for me to keep up with everything I'm doing and still feel like I'm really good at the technologies I'm using.
So that's why I'm using supplementary resources like these space repetition learning systems.
So I don't forget different parts of the API, even if I haven't used it in a couple months,
because I'll have to recall that for a future project or something like that.
Yeah.
So I looked at this and you can go to places and sort of save these web snippets
and then turn them into stuff you want to remember and practice, almost like flashcards.
So one example is if I'm on Stack Overflow and I see some code, I can go to that code thing and say,
make this a snippet.
And then I could even upgrade that to this like repetition practice.
Yeah, that's pretty neat.
Yeah.
Cool.
And then what about Graphene Django?
Yeah.
So this probably isn't a secret to anybody.
So it's basically the kind of the standard package to be able to use GraphQL with Django.
But as I've been using it more and more, because I use mostly Django REST framework,
but now that I'm using Graphene Django, it's like, oh, this is so nice.
You know, I don't have to update and manage all of these different endpoints.
I just have one endpoint.
And then I'm managing, you know, how my data gets sent back from my different schemas and stuff.
I feel like as your application grows, it's much more easy to manage and maintain with GraphQL than with a standard REST interface.
So that's something that I've been playing around with a lot.
I want to, before I use it in a professional project, I want to kind of get better with using authentication with it.
So there is kind of a standard library for Graphene Django.
I think it's called Graphene Django Auth and it uses JWT tokens.
So I'm going to play around with that a little bit soon.
Yeah.
Very cool.
Yeah.
So it's Django enhancement built upon Graphene itself.
Yes.
Very cool.
And Brian, out in the live stream, who was it that it told us?
It was Dean.
Dean told us that we did in fact cover Friendly, the Friendly library, which allows you to ask, you know, it gives you, when it crashes, you get like, what is it?
Like a little REPL type thing that you can go ask questions about.
Yeah.
That's the one where you're going to ask who, what, why, where.
Yeah, exactly.
Yeah.
I guess maybe not who.
Yeah.
Perfect.
That's interesting.
That's it for this one.
Well, thanks a lot for joining us, Gwen.
Yeah, thank you.
Yeah, Gwen, it was great to have you here.
Thanks so much for being here and keep up the good work on YouTube and everywhere else.
Yeah.
Thanks, Michael.
Thanks, Brian.
Yeah, you bet.
Bye, Brian.
Bye, everyone.