- Podcasts
- Python Bytes
- #405 Oh Really?
About this episodeTopics covered in this episode: Briefer: Dashboards and notebooks in a single place Introduction to programming with Python setup-uv HTML…
- Briefer: Dashboards and notebooks in a single place
- Introduction to programming with Python
- setup-uv
- HTML for people
- Extras
- Joke
Transcript
From the publisherThis transcript comes from the podcast’s own feed, shown as the publisher wrote it.
#405 Oh Really?
There's a contact form on our website, pythonbytes.fm. If you'd like to watch live, you can join us on YouTube and go to pythonbytes.fm/live. Be part of the audience or watch old episodes. It's a lot of fun. We love getting questions in the chat. And also, finally, if you'd like to get all the links, just listen and enjoy the show while you're listening.
And then read the links later. You don't have to write anything down. Just join. Go to pythonbytes.fm and get on our mailing list. Go to Friends of the Show or just say sign up for Newsletter. And we'll send you a weekly email with all the links and all the topics from the show. So, to get started, Michael, that was a long intro.
Okay. Right? For those of you who don't, notebooks are a way to sort of explore data, mix in explanation graphics along with code and analysis. And by far, Jupyter Notebooks are the most popular way to do notebook-type programming, but not the only way. Right? We've talked previously about Shiny for Python, which is a really cool option.
But today, I want to tell you about Briefer. And my theory is the name comes from the thing that delivers a briefing because it's about not just exploratory data notebooks, but it seems to be even a little more focused on delivering a dashboard experience that non-developers, or at least not the person creating the thing, comes to look at.
And yeah, that pretty much sums it up. So, I believe this used to be a commercial product. Still is a commercial product, don't get me wrong. It used to be exclusively a commercial project because they have a big banner at the top. Briefer is now open source. Go stars on GitHub. And let's see how many people have.
3.3 thousand. That's a respectable amount of traffic, right? That's pretty good. But if you go to their webpage at briefer.cloud, you can see a little bit more of like, what the heck is this thing about? Okay. So, multiplayer, as in multiple people can work on it. And I think one of the things that's unique about this compared to, say, a Jupyter notebook.
So, for example, suppose I want to talk to a Postgres database or something like that as part of my data that I need to pull back. Well, you've got to connect to Postgres in your notebook. And you've got to put your password and your connection string in your notebook. That's not, that's really ideal.
You might be able to pull in, I'm sure there's a way to pull in environment variables or something like that. But it's not super easy, right? So, one of the deals I think here is you connect a database and then you write Python and SQL to query the database and transform it into the right shape and filter it and so on.
And then you use this tool to create visualizations and dashboards and reports, data apps and so on out of it. So, it's like you configure the system to know about your data connection. And then just any notebook can talk to the database, something along those lines. Obviously, that's not a totally universal use case, but that's the idea, okay?
And it also came out of Y Combinator. Like I said, I think it was primarily just commercial at first and then expanded. So, yeah, it says connect your data source, run some queries, run Python code using your query results as data frames and then share your results. So, they've got some cool examples in here.
This is pretty cool. Pretty neat, right? I like it. Yeah, I mean, then you publish it to the web. So, the thing to know is if you look at pricing, there's two options. Paid and not paid, right? So, open source, self-hosted, free, install it from GitHub, off to the races. Then there's Community, which has a free one, a pro and enterprise.
This is not any sort of ad or anything, right? But I do think the fact that it's open source and it has these cool features, sort of executable Python is pretty neat. There's some more cool Python stuff about it here. I can't remember where I was reading it. Oh, yeah. You can also put like little sliders and date pickers and stuff that will, as people interact with them, right?
So, yeah. Anyway, that's what I got. People can check it out. And if you're over here, of course, there is a dockercompose.yml. So, if you're going to self-host it, you can just docker compose it to life. Nice. Well, I know that school started last month for most people. It's been going on for a while, but it's still kind of near the beginning.
And I was thinking about students and thinking there's a lot of people learning some new web stuff. And so, I picked a couple topics around learning new things. And we're going to start with Python. So, I got this from, I forgot his name already, Jose Blanca. And I think he's the dude that wrote it.
That, yeah, it's an introduction to programming with Python, but it's all web-based. I kind of, and it's kind of nice, all web-based. And it's just a free kind of a basic intro. And I think it'll be more than enough for a lot of people to get started on there, like they're taking some programming course or need to know a little Python for a course or something or a new project.
So, why, there's a few things that I like about it. One of them is it's not a complete overview. It does not try, it says, it doesn't try to cover all every detail of Python language, just what a beginner might need to start the journey. And I know there's a lot of great training tutorials, especially over maybe at Talk Python training to get started.
Yeah, that comes from the Shiny folks as well. Some people who make Shiny for Python that I mentioned before. Well, it's based on that with a Quarto Live extension that allows Python to run in the browser using Pyodide. And at the bottom, we can see a GitHub link. So, this whole thing is open source.
That's the kind of thing that is intriguing to me. The whole project's open source. So, if you wanted to have an internal training for your company or for your own individual teachers, wanted to customize this for your own class, you could fork this and do your own thing. Which is, I kind of love that.
And I was curious about what it's running. So, I went over and I looked at the Hello World. So, we go to Hello World. There's a... It's the first time you get to actually play with the code. And there's these, like... Because it's Pyodide, there's the... You're reading about Python and then there's these little code run blocks.
And you can just run stuff. But... And then you can start over and do it again. But you can also just blop some new stuff in there. So, I just blopped import sys, print sys version to see what Python version it was running. And it's running 3.12.1. I was... I guess I would have been surprised if it was already running 3.13.
I forget what I was reading. Never mind. It just... Python's used everywhere. We love Python. And if you're... If some of the courses are out of reach for you, or if you'd like to have something to... On the go, this might be something to look for. Or especially... The real thing I was thinking is people, like teachers, trying to customize their own introduction or different things that they're trying to teach using Pyodide.
I was thinking, seeing if I could do some of this stuff for testing concepts. That'd be kind of fun. Yeah. I'll tell you, I know some folks that do research and work with teachers, like middle school teacher type folks. And they were choosing some kind of programming language to work with with their students.
Right? Yeah. With something like this. It's a really good option. Yeah, exactly. Or a lot of other new platforms. And these... So we'll see more of this stuff coming along, I think. So it's good. We absolutely will. Very cool. Let me tell you real quick about Scout APM. They're big supporters of Python Bytes.
So we appreciate that very much. So if you are tired of spending hours trying to find the root cause of issues impacting your performance, then you owe it to yourself to check out Scout APM. They're a leading Python application performance monitoring tool, APM, that helps you identify and solve performance abnormalities faster and easier.
Seriously, you can do it in less than four minutes. So that's awesome. And the best part is the pricing is straightforward. You only pay for the data that you use with no hidden overage fees or per seat pricing. And I just learned this, Brian. They also have they provide the pro version for free to all open source projects.
So if you're an open source maintainer and you want to have Scout APM for that project, just shoot them a message or something on their pricing page about that. So you can start your free trial and get instant insights today. Visit pythonbytes.fm/scout. The link is in your podcast player show notes as well.
And please use that link. Don't just search for them because otherwise they don't think you came from us. And then they'd stop supporting the show. So please use our link pythonbytes.fm/scout. Check them out. It really supports the show. So remember I talked about trying to be more efficient on PyPI.org and not just especially under Docker and containers, not just blasting it every time like, hey, my requirements are my PyProject.tomla or whatever results in 200 dependencies downloaded.
And let's start fresh every time I do a build to run a PR test or something along those lines. And I wrote that article on my website that talked about several different things. How do you install Python using UV? How do you make, how can you set up caching both for pip and for uv to make that better?
And we both said, well, GitHub is probably the most, probably the worst of all of these things. And I think you even mentioned that. Wouldn't it be awesome if GitHub would actually just realize, oh, you're getting something from PyPI out of CI. Let's just give you the one we got like the other half a million times today.
Or whatever, right? Yeah. So all of those statements remain true and valid. And I definitely encourage people to check that out because I feel like we could just do a lot better and not just destroy PyPI in terms of traffic and financial bandwidth. But what I wanted to bring up was someone in the audience.
I think it was Henry Schreiner, but I'm not 100% sure, pointed out that there's this thing called setup-uv. I'd never heard of it. Mostly I don't do much with CI, GitHub CI, that kind of things. Personally, it just, I don't know, it just doesn't fit into my life. It's not a requirement I got to do a lot.
So I just don't play with GitHub Actions that much. But this is a GitHub Action. If you go to the repo I'm linking to, it says, use this GitHub Action with your project. Click here. But the idea is it will set up a GitHub Action workflow for both installing a specific version of uv, managing the uv version, and managing the caching of all the things it downloads.
Isn't that cool? Oh, that's very cool. Yeah, exactly. So it says it will install a version of uv and add it to your path. Thank you. That's handy. Cache the installed version of uv to speed up consecutive runs on self-hosted runners. That's kind of nice. It'll potentially, optionally persist the uv cache in the GitHub Actions cache.
That's what I'm talking about, where you can get it to say the second time your CI runs, if it's still the same requirements. Both, this is good on PyPI. I mean, gentle and kind to PyPI. But it also means that it's faster. If there's some kind of source distribution that has to do an install or something like that, some of these dependencies are slow to install if they got to compile.
Like a 0.3, whatever latest. You can have checksums. And you can even set up caching with your GitHub Actions. So that's about all I know about this. But I know people who do a lot with GitHub Actions, they'll probably be able to take this and run with it. And I'm with Rhett. Rhett Turnbull says, I haven't tried uv yet primarily because I didn't want to mess with uploading GitHub Actions.
This will be very handy. I have been using uv, but I haven't added it to any of my GitHub Action other projects. So, yeah, I'm definitely going to check this out. Awesome. Hey, Rhett. I'm glad to hear you like it. Okay. The last topic I've got is I was thinking, again, on the people kind of starting things new, maybe possibly students, is learning some HTML.
And especially, I was, this is nice. I wanted to highlight HTML4people.com. And it's nice. Just sort of an online book. And I just noticed that the phone on the, there's a great image on the front. The phone on the desk is at, the time is 404. Nice. I think that's funny. Although they should have made it 2 o'clock for 200 okay.
I mean, you want to start out on a positive note. Yeah. But that's really clever. I like it. But it's just a really well-written website. And it's really clean looking. But I was looking through the introduction and really kind of reminded me how I learned HTML. So I learned HTML way like back in the old days, in the 90s.
There's even some bonus chapters on it had some simple CSS that it was including, but basically customizing the CSS that was included in the course. And then also covering some CSS basics. Because that isn't new since when I was back in the 90s writing HTML. No CSS there. But now it's essential that you learn at least a little bit of CSS along with your HTML.
And maybe you're not going to write a pure HTML website. But especially with things like static generators or templates, there's a lot of HTML we still write, even if you're not writing raw HTML web pages. So going through a tutorial that just talks about the basics of HTML, I think it's a great way to get started.
Yeah. Cool. CC by NCSA 4.0. I'll have to look at that one. I don't exactly know what all that is. Yeah. Yeah. Anyway. Right. I love it. That's a good one. Extras? Extras, extras. I don't have any extras. Do you have any extras? Just a couple of real quick things. So, last time, I think it was last time, recently we spoke about something we must replace.
MicroWizGoo is something else. And I just wrote down some thoughts and some links and some alternatives on my blog about that. So, people can check that out if they're interested. That's a brilliant idea. Some of the stuff that we talk about on this episode, or this podcast, we could write blog posts about some of them.
Okay. Well, I know you got something else, but I wanted to say, you could be a good friend to all of the rest of your friends if you share this podcast with them. Yes, absolutely. Absolutely. All right. So, people can check that out if they want to follow up on that. Also, I want to give a shout out to Carlton Gibson.
He's one of the co-hosts for Django Chat, but that's not why I'm shouting him out. I am because he created an extension for Django. Django, you knew a unique user email. So, by default, the Django user model, I believe, requires you to have a username in addition to your email. And it's the username that's unique, not the email that's unique, which is kind of weird.
Anyway, Carlton fixed it. So, there, I fixed it. And it created this login by email with your default user model for Django by making auth.user.email, the database deal unique with a key constraint. So, anyway, not a whole lot to add to that, but, you know, it's got steps on how to install it as a Django app and make it go.
But I think this kind of feels like it should have been there all the time. So, well done. Seems required. Certainly. Certainly does. You know what else is required? What? A joke. Yes. Let's do it. Now, this one is kind of a choose your own joke. I didn't pick ahead, but what I found is a source of many jokes that I can foresee coming at some point here, Brian.
So, maybe they'll just go away on their own. It's a sleeping cat that says ignore deprecation warnings. Nice. What do you think? That one's pretty good, right? I like it. Yeah. Plus, I like cats. I do. Cats are nice. I'll see if I can find. What about this one? This one says, is that a camel, I think?
Does it run? Just leave it alone. Writing code that nobody else can read. The definitive guide. Oh, really? Oh, funny. And the definitive pearl book had a camel on the front. Right. Let's see. I'll find. I'll find. Oh, how about the big regex by trial and error? I click this button doesn't give me the full view.
