WEBVTT

00:00.000 --> 00:16.680
Okay, so now we're going to have lightning talks. We originally had a talk schedule for

00:16.680 --> 00:22.480
this slide, but unfortunately the speaker could not get a visa to come here. So we basically

00:22.480 --> 00:30.320
had to replace the talk and instead we're doing lightning talks, as you probably all know.

00:30.320 --> 00:36.720
Who does know where lightning talk is? Everyone knows, actually, perfect. So lightning talks

00:36.720 --> 00:41.720
are five minutes at most, and then we basically just pull the plug and then next we hear

00:41.720 --> 00:48.800
comes. So we're going to have four talks now. First one is by Mia. Second one is Denny.

00:48.800 --> 00:55.600
And then we have Voidysha, I think it's called. And then we have Tiago. And I would like

00:55.600 --> 01:02.000
to ask all the lightning talk speakers to queue up here so that the transitions are faster.

01:02.000 --> 01:09.480
Okay, so off you go. Hi, everyone. I'm Mia. This is my first for STEM and also for STEM

01:09.480 --> 01:16.680
in Belgium. So I arrived here on Thursday evening. I went for a short walk and I took this

01:16.680 --> 01:22.440
photo. As you could see, there are lots of beautiful churches here in Belgium and this photo

01:22.440 --> 01:28.040
actually reminded me of my neighborhood. This is Prague Czech Republic and we also have lots

01:28.040 --> 01:33.880
of wonderful churches around. And after the walk I went to grab a beer. Belgium is famous

01:33.880 --> 01:40.680
for craft beer. So you can see lots of breweries with really great beer around. And if

01:40.680 --> 01:45.280
beer is your thing, I'm pretty sure that you would also enjoy visiting Prague Czech Republic

01:45.280 --> 01:51.280
because we are one of the biggest producer of beer per capita in the world. We're also the

01:51.280 --> 01:56.320
biggest consumer of beer per capita in the world. I'm not sure if that's a good or bad thing

01:56.320 --> 02:02.320
but beer is your thing. I'm pretty sure that you would like it. Walking down the street, you

02:02.320 --> 02:10.160
could also notice how many pink sculptures are here. So I saw a ping boy, I saw a ping girl. And I also

02:10.160 --> 02:19.120
saw a ping dog. And in Czech Republic we have them too. So there is a sculpture of a two-man

02:19.120 --> 02:26.480
ping on the country. And the last thing we have common this year is that in Brussels there is

02:26.480 --> 02:31.920
this great conference where people from all over Europe and beyond gather to share their knowledge

02:31.920 --> 02:37.760
and spark new ideas. And it happens that in Czech Republic there is a big conference coming this

02:37.760 --> 02:44.720
year as well. Europartum 25, it is a week of all things Python. There will be two days of

02:44.720 --> 02:51.760
tutorials, three days of talks and two days of sprints, except of official events. We also have

02:52.400 --> 02:59.840
social events and we have open spaces to spark new ideas. You can expect around 1500 participants

02:59.840 --> 03:06.000
it will last for seven days and we will have over 200 speakers. And if you would like to be one

03:06.000 --> 03:11.120
of those speakers as well, it happens that we have open calls for proposals but it closes to more

03:11.120 --> 03:17.840
of so hurry up. So I'd like to invite you to give a proposal if you have anything that is

03:17.840 --> 03:24.000
worth sharing, it can be about Python, it can be about related technologies, it can be about community,

03:24.720 --> 03:32.320
anything, just send your proposal over and you will see. Except that we also have open call

03:32.320 --> 03:39.600
for reviewers. So if you would like to help shape the program, you can scan the QR code above

03:39.600 --> 03:46.880
or you can go to this URL. So you can leave your feedback on our proposals. And the last thing

03:46.880 --> 03:52.080
is we also have a short story with three questions. What would you like to see at Europartum this year?

03:52.080 --> 03:57.360
So if whether you have already been to Europartum or not, you will have a chance to

03:57.440 --> 04:05.360
influence how Europartum 25 will look this year. So that's all for me and I hope to see you all

04:05.360 --> 04:16.400
in Prague. Thank you. Excellent. So you have two minutes left. In case you want to do something else.

04:16.400 --> 04:23.040
No? Okay. Then then he is next.

04:46.880 --> 05:01.200
Okay. Let's go. Hi everyone. I will talk about Django version. So how to version control

05:01.200 --> 05:07.360
your Django models. And to make an example, I will talk about how to make pizza.

05:08.320 --> 05:18.080
And first, you need to start using the floor or a floor. And then you can add extra virgin oil.

05:19.360 --> 05:26.240
You add a little bit of tomato sauce. And then you need to pick toppings. And of course you may

05:26.960 --> 05:35.760
do mistakes. For example, adding pineapple on your pizza. And what if you want to roll back your

05:35.920 --> 05:44.400
mistakes and add proper toppings? Well, you can use Django version. And in Django version,

05:45.040 --> 05:52.320
you can use it like an extension for your Django application to provide version control for your

05:52.320 --> 06:00.080
model instances. It allows you to roll back to any point in the model instance A3 to recover the

06:00.160 --> 06:07.920
related model instances. And everything with a simple admin integration. To install it, you can

06:07.920 --> 06:14.240
install Django version, add version to your installed apps and migrate your database.

06:15.440 --> 06:23.040
Then you extend your admin from version admin and create your initial revisions.

06:24.000 --> 06:31.440
So if you go to your admin page, you can see this recovered related contacts icons,

06:31.440 --> 06:36.720
for example, in your admin page. And you can see a list of deleted records.

06:37.520 --> 06:46.720
Same in your detailed page, you can view the history of all your changes in the specific records.

06:47.680 --> 06:56.080
You can also use this in a programmatic way, registering your models. And you can even say

06:56.080 --> 07:05.520
which fields to include or exclude from your revisions from your history. And then you can get all

07:05.520 --> 07:14.240
versions and reverts to a specific version. So for example, then you can update your pizza using

07:14.400 --> 07:23.120
proper toppings and bake your pizza. But what about Django or Spraymark? Well, I wrote an

07:23.840 --> 07:29.840
extension for this. So you just need to install Django version or Spraymark and add

07:29.840 --> 07:37.280
her version mid-erware to your mid-erware in settings. And then, of course, you need to register your

07:37.360 --> 07:45.920
model using a version. And if you extend the history model, you set, then you can add a lot of

07:45.920 --> 07:54.320
useful points in your Django APIs. So you have an historian point to list all the version histories.

07:54.880 --> 08:04.160
And also to see a specific record, a specific region. You can see all the deleted records.

08:04.240 --> 08:12.640
And also, you can revert to a specific version of a single object. You can use mixing. So if you

08:12.640 --> 08:18.720
just want to see the history and version, you can use the history mixing, delete the mixing or

08:18.720 --> 08:24.960
revert mixing, if you want to. Everything. And that's it. Thank you very much.

08:24.960 --> 08:35.120
Thank you. You've been as you're really fast in these lightning talks. So we can have more

08:35.120 --> 08:42.320
lightning talks. If someone wants to do another lightning talk, then please queue up there. And

08:42.320 --> 08:50.000
then we just continue until the time is up. So next is Bodhisattva.

08:54.960 --> 09:02.960
What can we plug in here? This is HGMI.

09:18.960 --> 09:24.560
Okay, can you hear me? Thank you again. So welcome. I'm Bodhi. This is my

09:24.560 --> 09:32.240
second time at Bodhisattva. First time I'm doing a talk. What I'm going to share is some nice

09:32.240 --> 09:38.320
small things about the personal Python project I have. What the personal project is about,

09:38.320 --> 09:44.400
it's basically a grab bag of random small utilities. It's probably nothing that you would find useful.

09:45.200 --> 09:50.080
But some of the ideas about how I implemented this project may be useful for you either in your

09:50.080 --> 09:54.800
personal life or at work. So I'm going to share those. Basically there's a small backup script

09:54.800 --> 10:00.160
that I used to wrap board for doing personal backups as a small static website generator because

10:00.160 --> 10:05.920
who doesn't have one personal helper functions for calling sub-processes because I shell out to a lot

10:05.920 --> 10:13.120
of utilities. Also in my Python programs, refactoring all of these experiments on how to package

10:13.200 --> 10:18.480
Python projects in an efficient way. So a lot of random small stuff, which is useful for me,

10:18.480 --> 10:26.960
some of the ideas might be also useful for you. The way the project is set up is that there is a

10:26.960 --> 10:36.880
one root main project that is wrapping all of the other things and I'm going to share how this

10:36.960 --> 10:44.400
looks like. If you go on GitHub, you can see the project top level here. There's a root

10:44.400 --> 10:49.520
pipeline project, it should be very familiar to all of you. It's quite standard-based. I currently

10:49.520 --> 10:56.160
use UV so I use UV lock file for configuring and defining all of the dependencies.

10:58.400 --> 11:02.880
The project set up is very simple. So this is one of the nice things I like is that all of the

11:02.880 --> 11:07.680
system level dependencies that you need to install before you can get started with my project

11:07.680 --> 11:13.760
is Python 3. That's all. You can bootstrap from Python 3 because even though I use UV,

11:14.480 --> 11:21.360
I use the, I guess, unofficial way of paper installing UV inside the virtual end that I create

11:21.360 --> 11:27.120
next to the project folder. So I create the VM first. I activate that. I bootstrap UV using

11:27.120 --> 11:33.840
pip install. Then I use UV sink to install all of the other dependencies in the UV lock file. If I

11:33.840 --> 11:39.440
clone from scratch and random directory, it looks like this. This is the Git clone. This is great

11:39.440 --> 11:47.200
in the VM, activate the VM, install UV, then use UV sink to install everything else. So getting started

11:47.200 --> 11:53.680
is very nice. The root level pipeline project top all defines all of my development dependencies.

11:53.760 --> 11:58.720
It's very standard based, for example, I did it like poetry because of this because it uses a lot of

11:58.720 --> 12:03.360
tool dot poetry that's something. So it's not really portable to other package managers,

12:03.360 --> 12:10.560
but with UV or with PVM, it's a little bit better. I will create one VM for all of my projects,

12:10.560 --> 12:16.160
because I don't like switching between a lot of different virtual environments. And then I have a lot

12:16.160 --> 12:22.640
of subjects in my package folder, so package, sub project by project Tomo that defines all of

12:23.200 --> 12:29.760
dependencies and configurations for all of the real stuff that I care about. That those are

12:29.760 --> 12:34.320
all completely independent. They are in the sub folder. They don't know about any of the other

12:34.320 --> 12:39.600
sub folders I have in the Git repo. They don't even know that I'm using UV to manage everything.

12:39.600 --> 12:44.640
So it's quite standard based. This is the root pipeline project Tomo. It just defines the name,

12:44.640 --> 12:49.360
description, development dependencies. There's the dependency groups for all of my

12:49.360 --> 12:58.960
real sub projects. I use UV and UV sources and workspaces to include all of the sub projects

12:58.960 --> 13:07.600
from the neighboring sub folders. Here's how that's done. I used rough for linting. I could put

13:07.600 --> 13:13.600
any common configuration here in this root pipeline project Tomo. And here's one of the sub

13:13.600 --> 13:21.200
projects. It's a PKG slash BODCLI slash by project Tomo. It defines my command line interface

13:22.000 --> 13:28.880
sub project. If you see a by project Tomo before it's quite standard. Nothing interesting.

13:28.880 --> 13:35.440
It has an entry point for my main function. The main function for the CLI. That's another very nice

13:35.440 --> 13:41.920
small thing. So I have my own custom CLI name as from up from myself for doing stuff that I care about.

13:42.880 --> 13:48.000
I do it for my own development stuff. So this is kind of what I use instead of make or just

13:48.000 --> 13:54.960
or whatever. For example, package the Python libraries that I have within this project or create

13:54.960 --> 14:02.320
the documentation. Here's how it looks like. It's a simple main function. This is in the CLI sub

14:02.400 --> 14:13.040
package. I use this as a 160 line implementation of a CLI. But this doesn't complain all of the CLI

14:13.040 --> 14:21.200
functions that I have. I have factored some of that out using my plugins package. All of the

14:21.200 --> 14:27.040
package code is this 50 lines. I probably could have used plug-ee for this. But what I really needed

14:27.040 --> 14:33.520
was basically just this function from the Python standard library import lib entry point.

14:33.520 --> 14:39.280
So that when I create another sub package, I can create a hook, which creates a CLI sub command.

14:39.280 --> 14:44.080
So for example, when I'm working. I think we need to shut you down now.

14:44.080 --> 14:48.720
Okay. Thank you very much. It's very interesting. So give me a video class.

14:57.040 --> 15:00.000
So next is Thiago?

15:27.120 --> 15:32.000
If it is. Is it working? I'm not sure.

15:34.960 --> 15:36.720
I moved the mouse to the side.

15:38.960 --> 15:45.040
Nope. Oh, I do have a. Yeah, I do have a.

15:45.040 --> 15:55.280
Did you just shoot? Yeah, this was okay.

16:00.080 --> 16:09.600
There you go. Can you can you hold this? Okay, okay. Is it registered?

16:15.280 --> 16:21.280
So hello everyone. My name is Thiago. I came from Brazil, but I'm currently living

16:21.280 --> 16:26.400
a very near here in the Netherlands. And I'm here to talk about actually I like to give a brief

16:26.400 --> 16:33.760
explanation of how to expose your Django application using GraphQL. It's rather a GraphQL.

16:33.760 --> 16:39.120
I am one of the Strawberry maintainers. So if you have any questions after this, feel free to

16:39.200 --> 16:47.680
reach me out. So why GraphQL? GraphQL is basically a library that allows you to

16:48.720 --> 16:53.200
allows your clients to request specific data and get predictable results.

16:54.480 --> 16:58.960
No overfetching under fetching or even like not knowing what type you are going to get.

17:00.000 --> 17:06.000
I like to show this image every time. Like if I went to make an API to request a burger.

17:06.880 --> 17:12.320
If I don't want to request some of the stuff that comes from the burger like I don't want

17:12.320 --> 17:17.760
tomatoes because I don't like tomatoes for some reason. I don't need to request those. And that's

17:17.760 --> 17:23.600
like a base comparison with rest. So let's keep it simple because I only have five minutes.

17:24.320 --> 17:29.840
So in here, we have for example in our model. We have a user. We have the mayo. The mayo has a

17:29.840 --> 17:37.040
primary key to the user. Of course. And we want to expose it like this. This is a GraphQL

17:37.040 --> 17:42.880
always schema, a basic one. We have the root query here in the type query. We can see that we can

17:42.880 --> 17:49.920
request me. It's going to be myself. The user that is lucky. Logging. We can retrieve a user given

17:49.920 --> 17:56.160
a primary key or even list users and there is a pagination in there. Of course, like if we are

17:56.160 --> 18:02.240
returning a user in here, we'd have to type it as well. We do have the user type in there.

18:02.240 --> 18:09.920
With attributes and the user has a list of mayo. So here is the type of the email. So how

18:09.920 --> 18:19.520
to translate that to Python? This is, I just just said this. I decided to do this like a couple

18:19.600 --> 18:25.600
of hours ago, so I'm sorry about this. So in here, for example, as I showed you, we had the

18:25.600 --> 18:31.840
user type, the email type. So we can easily write this as a strawberry type. It's the syntax

18:31.840 --> 18:38.240
is very similar to the data classes. So we can just write just as we would write a data class,

18:38.240 --> 18:45.120
but using strawberry dot type as the decorator for the class. For the Django integration itself,

18:45.680 --> 18:52.320
we can basically, instead of using a strawberry dot type, we can use a strawberry Django dot type

18:52.320 --> 19:01.360
and pass the model. And that allows us to use a one-mange connotator notation, alto, which you

19:01.360 --> 19:08.240
basically introspect the Django model and automatically type it as first. So for example,

19:08.240 --> 19:14.720
to define the BigQuery, I can just go there and define a strawberry field that when it got called,

19:14.720 --> 19:21.440
I will return info.context.user, which is like their Django request itself. For the user itself,

19:21.440 --> 19:30.640
just do user.objects.get and I can get it in the same for users. In this case, just returning the

19:30.640 --> 19:36.480
user model, it's going to get translated to the user that we just type it. In the end, we're

19:36.480 --> 19:41.520
going to get something very similar to this. I removed the implementation for the math, because

19:41.520 --> 19:48.240
it will not fit in there. So let's now query it. So now I need you to believe that this is

19:48.240 --> 19:53.840
exposed it. I have not showed you how to expose this, but like we don't have that time for that.

19:53.840 --> 19:59.680
But if we want to say now a query to get a user, we just want to request the name, the emails,

19:59.680 --> 20:07.680
inside the emails, the email itself, if it's a primary, email or not, we can query it and we should

20:07.680 --> 20:14.880
get something like this. They made the user 1, 2, 3, it's myself. I'm not going to expose my email

20:14.880 --> 20:22.960
here, but there you go. And that's it. If you want to know more about strawberry, there are some

20:22.960 --> 20:30.080
resources to free to join our square channel. We are very welcoming to people in the community.

20:30.880 --> 20:34.880
And thank you very much for this. I appreciate it.

20:34.880 --> 20:41.200
Thank you. Thank you very much.

21:05.840 --> 21:16.240
OK. OK. All right. Hello. Yeah, I'm here to talk about another Python event this year.

21:16.240 --> 21:25.760
We don't have anything missing around the CD or dogs or people. But we have an amazing event with

21:26.720 --> 21:34.720
more than 1,000 people and more than 100 tools and workshop in Bologna this year. So I'm going

21:34.720 --> 21:39.920
to present you Python italias going to be from the 20 hate to the 31st of May.

21:42.160 --> 21:49.600
Yeah, this year it's the first year after basically 20 years that we are moving from Florence to

21:49.600 --> 21:57.520
Bologna because we're having a bigger venue for demand. I'd like to, I mean, if you're interested,

21:57.520 --> 22:04.560
we are now selling tickets, CFP, unfortunately, is already closed. But we are working on the program.

22:04.560 --> 22:11.040
We're going to release it by the end of the month. So yeah, this is it. If you want to follow

22:11.040 --> 22:17.760
us or check it out on the website about prices and events and all the stuff about Python italias,

22:17.840 --> 22:24.720
this is it. Thank you. Thank you.

22:29.120 --> 22:34.960
All right. So the next speaker. Hello, everyone. How new book here is contributing to Python

22:34.960 --> 22:42.000
projects in any way, code, documentation, whatever. How many of you skip your hand up?

22:42.000 --> 22:48.720
It's spending at least five hours per month doing that. Many hands. Now, keep it there. How many of

22:48.720 --> 22:54.800
you are a Python contributor member? PSF contributor member. See, this happened all the time.

22:54.800 --> 22:59.200
You are entitled to be a PSF contributor member. If you're spent at least five hours,

22:59.200 --> 23:04.720
so I really encourage you to go to the Python.org website, PSF, and then you can find information

23:04.720 --> 23:08.880
there about the memberships and how to become a member. If you don't know what, what is the PSF

23:08.880 --> 23:12.960
this guy talking? The Python software foundation is a nonprofit behind the Python language,

23:12.960 --> 23:18.560
which is protecting the language, and of course trying to bring it to many other places as well.

23:18.560 --> 23:22.880
So besides that, I just wanted to invite you to do that and also in case you want to

23:22.880 --> 23:27.840
donate to the nonprofit, maybe yourself, but through your companies and stuff, we are always looking

23:27.840 --> 23:32.720
for responsive. And if you have questions or if you're approached me, I have some very limited

23:32.720 --> 23:37.760
editions shiny Python stickers. So if you want to find me around, just ask me for one. I will

23:37.840 --> 23:41.760
be glad that you'll give you one in case you are contributing to projects or you want to do it.

23:41.760 --> 23:43.840
That's it. Thank you very much. Thank you.

23:47.920 --> 23:52.880
So I think this is it in terms of lightening talks, so we are going to continue with regular schedule

23:53.600 --> 23:54.320
in a few minutes.

