WEBVTT

00:00:00.001 --> 00:00:05.600
At PyCon 2017, Jake Vander Plaats gave a great keynote where he said Python is a mosaic.

00:00:05.600 --> 00:00:10.740
He described how Python is stronger and growing because it's being adopted and used by people

00:00:10.740 --> 00:00:12.500
with diverse technical backgrounds.

00:00:12.500 --> 00:00:18.040
In this episode, we're adding to that mosaic by diving into how Python is being used in

00:00:18.040 --> 00:00:20.640
the architecture, engineering, and construction industry.

00:00:20.640 --> 00:00:25.580
Our guest, Gui Talrico, has worked as an architect who helped automate that world by bringing

00:00:25.580 --> 00:00:29.700
Python to solve problems where others were just using point-and-click tooling.

00:00:30.360 --> 00:00:32.060
I think you'll enjoy this look into that world.

00:00:32.060 --> 00:00:35.980
We also touch on his project, PyAirtable, near the end as well.

00:00:35.980 --> 00:00:42.580
This is Talk Python To Me, episode 342, recorded November 7th, 2021.

00:00:42.580 --> 00:00:58.860
Welcome to Talk Python To Me, a weekly podcast on Python.

00:00:59.140 --> 00:01:00.560
This is your host, Michael Kennedy.

00:01:00.560 --> 00:01:04.780
Follow me on Twitter, where I'm @mkennedy, and keep up with the show and listen to past

00:01:04.780 --> 00:01:06.760
episodes at talkpython.fm.

00:01:06.760 --> 00:01:09.880
And follow the show on Twitter via at Talk Python.

00:01:09.880 --> 00:01:13.400
We've started streaming most of our episodes live on YouTube.

00:01:13.400 --> 00:01:19.180
Subscribe to our YouTube channel over at talkpython.fm/youtube to get notified about upcoming

00:01:19.180 --> 00:01:21.000
shows and be part of that episode.

00:01:21.740 --> 00:01:26.900
This episode is brought to you by Shortcut and Linode, and the transcripts are sponsored

00:01:26.900 --> 00:01:28.200
by Assembly AI.

00:01:28.200 --> 00:01:31.320
Dee, welcome to Talk Python.

00:01:31.320 --> 00:01:31.880
Thanks.

00:01:31.880 --> 00:01:32.740
Happy to be here.

00:01:32.740 --> 00:01:34.340
Yeah, it's fantastic to have you here.

00:01:34.340 --> 00:01:40.160
I'm really excited to talk about buildings and architecture and that kind of stuff just

00:01:40.160 --> 00:01:41.360
permeates our lives, right?

00:01:41.440 --> 00:01:46.420
That's, you walk around, you go to cities, you marvel at the large buildings, go to someone's

00:01:46.420 --> 00:01:48.520
house, and it's this beautiful place.

00:01:48.520 --> 00:01:49.740
Really nice to see.

00:01:49.740 --> 00:01:52.880
All that starts with good architecture and design, right?

00:01:52.880 --> 00:01:53.820
Yeah, that's right.

00:01:53.820 --> 00:01:59.860
Where we live, where we work, pretty much most of our lives we spend inside some sort of structure.

00:02:01.160 --> 00:02:01.560
Exactly.

00:02:01.560 --> 00:02:02.360
Exactly.

00:02:02.360 --> 00:02:02.640
Cool.

00:02:02.640 --> 00:02:03.840
Well, we're going to talk about that.

00:02:03.840 --> 00:02:06.480
Before we get into that, though, let's just start with your story.

00:02:06.480 --> 00:02:07.820
How'd you get into programming in Python?

00:02:07.820 --> 00:02:09.860
Yeah, it was a bit of a long journey to Python.

00:02:09.860 --> 00:02:15.140
I think my first experience with programming was actually with Lego Mindstorm.

00:02:15.140 --> 00:02:16.500
I don't know if you're familiar with it.

00:02:16.500 --> 00:02:16.920
Yeah.

00:02:16.920 --> 00:02:18.480
A little robot thing, right?

00:02:18.480 --> 00:02:18.820
Yeah.

00:02:18.820 --> 00:02:20.240
You can program those with Python, can't you?

00:02:20.240 --> 00:02:20.600
Yeah.

00:02:20.600 --> 00:02:22.200
I don't know what it looks like these days.

00:02:22.200 --> 00:02:26.340
I guess when I got it, I was maybe, yeah, in my early teenage years or something.

00:02:26.500 --> 00:02:32.220
And at the time, they had something that was similar to MIT's Scratch kind of block, plug and play.

00:02:32.220 --> 00:02:33.540
So I did a little bit of that.

00:02:33.540 --> 00:02:40.300
And then later, I tried to learn Visual Basic 6, I think also in my early teenage years.

00:02:40.300 --> 00:02:42.040
And that was fun.

00:02:42.040 --> 00:02:44.560
I built a couple little personal projects.

00:02:44.560 --> 00:02:49.320
I feel like we still don't have something to take the place of Visual Basic 6.

00:02:49.320 --> 00:02:49.620
Yeah.

00:02:49.620 --> 00:02:50.200
Yeah.

00:02:50.200 --> 00:02:51.020
Do you think so?

00:02:51.120 --> 00:02:56.800
I mean, I look around at all the different UI platforms, whether that's the stuff we have

00:02:56.800 --> 00:03:03.860
in Python or whether that's Swift or whether that's .NET with WPF or whatever else you want

00:03:03.860 --> 00:03:04.280
to talk about.

00:03:04.280 --> 00:03:09.700
Nothing is as easy as, I want these buttons here in a text box and a list and I double click

00:03:09.700 --> 00:03:12.360
it and I write three lines of code and that happens, right?

00:03:12.360 --> 00:03:12.620
Yeah.

00:03:12.620 --> 00:03:14.160
The environment has changed, right?

00:03:14.160 --> 00:03:16.440
Because before they were just desktop apps, right?

00:03:16.440 --> 00:03:18.080
You would build it and that's it.

00:03:18.080 --> 00:03:21.100
And now you have to think about, even if.

00:03:21.100 --> 00:03:25.420
React has made it as easy to build front end app, you still have to deal with something

00:03:25.420 --> 00:03:29.660
else for styling and then you have to figure out how you're going to serve the data or are

00:03:29.660 --> 00:03:30.580
going to deploy it to you.

00:03:30.580 --> 00:03:31.440
Yeah.

00:03:31.440 --> 00:03:32.200
I think you're right.

00:03:32.200 --> 00:03:36.500
I mean, I'm not saying VV6 is the pinnacle of what we could design, right?

00:03:36.500 --> 00:03:39.740
It's not going to win massive design awards, but wow.

00:03:39.740 --> 00:03:42.640
Could people get stuff done quickly with that framework?

00:03:42.640 --> 00:03:42.980
Yeah.

00:03:42.980 --> 00:03:44.560
So you did a little bit there, huh?

00:03:44.560 --> 00:03:44.740
Yeah.

00:03:44.740 --> 00:03:47.980
I never got too deep, but it was an extension of a robotics course that I was taking.

00:03:47.980 --> 00:03:52.700
So we were building these little UIs and then clicking around and having the robot move or

00:03:52.700 --> 00:03:53.000
something.

00:03:53.000 --> 00:03:55.580
So it was very basic UI.

00:03:55.580 --> 00:04:00.040
But what was interesting is at the time I grew up in Brazil and at the time it was still there

00:04:00.040 --> 00:04:03.760
and I wanted to get really deep, but there was this, there was a bit of a language barrier,

00:04:03.760 --> 00:04:04.320
I think.

00:04:04.320 --> 00:04:05.960
This was also, you know, pre-Google.

00:04:05.960 --> 00:04:11.700
So trying to learn how to program while also not knowing how to speak English, I actually

00:04:11.700 --> 00:04:13.960
feel like it slowed me down a bit.

00:04:13.960 --> 00:04:14.280
Yeah.

00:04:14.280 --> 00:04:15.040
I can imagine.

00:04:15.040 --> 00:04:20.700
I've always had a lot of both respect and I guess a little bit of sympathy for people

00:04:20.700 --> 00:04:26.500
who are non-native English speakers, especially people who didn't particularly speak English

00:04:26.500 --> 00:04:32.480
super well, but then had to program with for loops and while loops and true and false and

00:04:32.480 --> 00:04:32.900
ints.

00:04:33.000 --> 00:04:38.400
And it's just like, if, you know, maybe if you're with a language that's not that different,

00:04:38.400 --> 00:04:43.960
it's not that hard, but you know, if you're like Chinese or even Portuguese, it's, you know,

00:04:43.960 --> 00:04:45.760
why do you have to program all these foreign words?

00:04:45.760 --> 00:04:49.180
It just seems crazy to me that that's how it has been, right?

00:04:49.180 --> 00:04:49.460
Yeah.

00:04:49.460 --> 00:04:56.320
And also the resources even today with post-Google era or during the Google era, you can, if you

00:04:56.320 --> 00:05:01.200
search for some sort of engineer problem in English or in Portuguese, I can guarantee you're

00:05:01.200 --> 00:05:05.400
going to get a much bigger pool of answers and resources in English.

00:05:05.400 --> 00:05:06.120
So yeah.

00:05:06.120 --> 00:05:06.700
Yeah.

00:05:06.700 --> 00:05:07.000
Yeah.

00:05:07.000 --> 00:05:08.580
That was a little bit of a barrier.

00:05:08.580 --> 00:05:12.380
In fact, what actually happened is I never really progressed and I just went on to other

00:05:12.380 --> 00:05:12.780
things.

00:05:12.780 --> 00:05:13.240
All right.

00:05:13.240 --> 00:05:14.820
Maybe this program and things not for me.

00:05:14.820 --> 00:05:15.260
Yeah.

00:05:15.260 --> 00:05:16.080
I don't know.

00:05:16.120 --> 00:05:18.800
I guess, yeah, I just kind of didn't really get it.

00:05:18.800 --> 00:05:19.660
Never really clicked.

00:05:19.660 --> 00:05:25.500
And then I moved on to other things and ended up pursuing a degree in architecture to talk

00:05:25.500 --> 00:05:28.280
a little bit about it, but it was a little bit of kind of a gap.

00:05:28.280 --> 00:05:33.500
And then I think it was just during my college years, I tried getting into a little bit of

00:05:33.500 --> 00:05:38.620
web development, played around with action script, flash, or I think that's what it's called.

00:05:38.620 --> 00:05:38.800
Right.

00:05:38.800 --> 00:05:41.060
It was like JavaScript, like inside flash.

00:05:41.060 --> 00:05:46.020
And then within architecture, I got a little bit into like visual programming, which

00:05:46.020 --> 00:05:50.340
it's, I guess, a more sophisticated version of, you know, scratch, but similar to what

00:05:50.340 --> 00:05:52.960
3ds Max uses to compose material.

00:05:52.960 --> 00:05:57.100
You know, this idea that you can kind of connect flows into each other visually.

00:05:57.100 --> 00:06:00.520
And that's used pretty extensively in architecture still.

00:06:00.520 --> 00:06:04.500
And that was kind of like my gateway back into programming in some ways.

00:06:04.500 --> 00:06:08.940
And then a couple of years later, I actually practiced architecture for, I think about five

00:06:08.940 --> 00:06:09.560
or six years.

00:06:10.120 --> 00:06:13.700
And at the time I was trying to figure out how I could change careers.

00:06:13.700 --> 00:06:16.140
And I was just, I had this kind of itch.

00:06:16.140 --> 00:06:19.700
I just really wanted to write code and I couldn't figure out how to kind of break it.

00:06:19.700 --> 00:06:22.980
And I ended up doing this process of changing careers.

00:06:22.980 --> 00:06:28.380
I actually took a year off and spent every kind of brief minute I had trying to learn how

00:06:28.380 --> 00:06:28.780
to code.

00:06:28.780 --> 00:06:31.480
Was that on your own or did you go to university?

00:06:31.480 --> 00:06:32.800
Yeah, it was just on my own.

00:06:32.800 --> 00:06:33.140
Yeah.

00:06:33.260 --> 00:06:36.780
Literally like Google, what language should I learn first?

00:06:36.780 --> 00:06:40.200
And this was like 2014, I think 15.

00:06:40.200 --> 00:06:42.300
And I actually picked Ruby first.

00:06:42.300 --> 00:06:44.220
This was Ruby on Rails.

00:06:44.220 --> 00:06:44.700
Yeah.

00:06:44.700 --> 00:06:45.880
Golden years, I guess.

00:06:45.880 --> 00:06:51.500
And I started with Ruby and after a couple of weeks, I just didn't enjoy it that much.

00:06:51.500 --> 00:06:56.160
I was getting confused with some of the basic kind of built-in blocks and I decided to try

00:06:56.160 --> 00:06:59.480
Python and it was just kind of smooth sailing.

00:06:59.480 --> 00:07:02.120
I mean, I guess as smooth as it can be learning by yourself.

00:07:02.120 --> 00:07:02.980
Yeah, yeah, sure.

00:07:03.140 --> 00:07:07.040
But, you know, I felt like even the basic grammar, it was just kind of stick.

00:07:07.040 --> 00:07:11.100
I didn't have to keep going back and say, oh, how do you do a for loop again?

00:07:11.100 --> 00:07:16.440
I found it was always a bit stickier with me, not having to think about where semicolons

00:07:16.440 --> 00:07:17.580
would go, you know.

00:07:17.580 --> 00:07:18.540
Yeah.

00:07:18.540 --> 00:07:21.980
It was just easier and smoother and more enjoyable for me in general.

00:07:21.980 --> 00:07:22.460
For sure.

00:07:22.460 --> 00:07:27.460
Well, I gave VB a lot of positive praise a little bit ago.

00:07:27.460 --> 00:07:33.120
I think also that language is a really interesting example of how to try to be like,

00:07:33.120 --> 00:07:34.960
Python, but not do it well.

00:07:34.960 --> 00:07:40.820
So, with JavaScript or C# or a lot of these languages, you have all these symbols

00:07:40.820 --> 00:07:42.920
on the screen, especially the static languages.

00:07:42.920 --> 00:07:44.660
C#, Java, C++, right?

00:07:44.660 --> 00:07:49.200
Semicolons, angle brackets, you know, parentheses, all sorts of stuff all over the place.

00:07:49.340 --> 00:07:52.800
And then there's languages like Python that say, you know, you don't need that.

00:07:52.800 --> 00:07:53.880
You don't need all these symbols.

00:07:53.880 --> 00:07:55.180
Let's just go and write it.

00:07:55.180 --> 00:07:56.880
And, you know, VB is like that, right?

00:07:56.880 --> 00:07:57.920
There's no semicolons.

00:07:57.920 --> 00:07:58.940
There's not that many symbols.

00:07:58.940 --> 00:08:03.400
But it's like everything is begin for, end for.

00:08:03.560 --> 00:08:05.520
Like, it's just, it's the worst possible.

00:08:05.520 --> 00:08:09.760
It's like they still need the closing curly braces and stuff like that, but they don't want to

00:08:09.760 --> 00:08:10.440
put a curly brace.

00:08:10.440 --> 00:08:13.920
So, they make you type like a huge long word, which is crazy.

00:08:13.920 --> 00:08:19.420
And somehow Python struck that like smooth balance of not having all that stuff, but not giving

00:08:19.420 --> 00:08:20.420
up too much as well.

00:08:20.520 --> 00:08:23.680
Yeah, and also the boilerplate that's required.

00:08:23.680 --> 00:08:26.560
I think I had tried doing some C# as well.

00:08:26.560 --> 00:08:32.500
And when you open up the simplest example you can find, and it's class, void, public.

00:08:32.500 --> 00:08:34.000
And you're like, wait, what is public?

00:08:34.000 --> 00:08:40.220
You haven't gone to understand classes or access and things like that.

00:08:40.220 --> 00:08:41.600
And it's really overwhelming.

00:08:41.600 --> 00:08:46.520
And in Python, it's like, even the class takes a little bit when you're learning, but you can

00:08:46.520 --> 00:08:49.340
just, here's a function that's inside of this object.

00:08:49.340 --> 00:08:52.280
And it's much easier to understand, I think, as a beginner.

00:08:52.280 --> 00:08:53.100
It's kind of ramp up.

00:08:53.100 --> 00:08:59.020
I think it's a big testament that you can be really effective with Python with a super, like

00:08:59.020 --> 00:09:02.720
a very partial understanding of what Python is or how it works, right?

00:09:02.720 --> 00:09:06.660
You can not even be aware that half of the stuff exists and you can still get along just

00:09:06.660 --> 00:09:06.960
fine.

00:09:06.960 --> 00:09:08.360
So, that's pretty awesome.

00:09:08.360 --> 00:09:12.620
So, let's dive into the main topic, buildings, architecture.

00:09:12.620 --> 00:09:18.820
So, I've seen some of the presentations you've given, and it sounds to me like this is an industry

00:09:18.820 --> 00:09:23.120
that's ripe for more programming, automation, empowerment.

00:09:23.120 --> 00:09:28.140
You know, I always say that programming is a superpower for people who are not programmers,

00:09:28.140 --> 00:09:28.540
right?

00:09:28.540 --> 00:09:33.680
If you're an architect versus an architect who programs, the programming architect can do way

00:09:33.680 --> 00:09:34.220
more, right?

00:09:34.220 --> 00:09:38.880
And it sounds to me like this area is kind of open for more of that.

00:09:38.880 --> 00:09:39.480
Yeah, absolutely.

00:09:39.480 --> 00:09:40.500
Give us the background.

00:09:40.500 --> 00:09:44.380
So, it starts with pictures and drawings and blueprints type things, right?

00:09:44.380 --> 00:09:45.380
Yeah, yeah, exactly.

00:09:45.380 --> 00:09:49.820
So, I mean, I guess I should just preface this with the fact that I've been outside the industry

00:09:49.820 --> 00:09:52.180
for about four years now.

00:09:52.180 --> 00:09:54.780
I'm just doing more traditional software development.

00:09:55.020 --> 00:10:00.460
So, I may be a little bit out of the loop on some changes, but in general, the time I spend

00:10:00.460 --> 00:10:05.620
in the industry, what you would see is that it's still a pretty kind of analog industry.

00:10:05.620 --> 00:10:07.220
And there are parts that are improving.

00:10:07.220 --> 00:10:08.940
There are parts that are very advanced.

00:10:08.940 --> 00:10:11.680
I mean, we do still manage to build incredible buildings.

00:10:12.080 --> 00:10:16.980
But there's this weird kind of tension where people are coming up with these design concepts

00:10:16.980 --> 00:10:20.940
and figuring out what the building is going to look like, what spaces you're going to need.

00:10:20.940 --> 00:10:27.800
And then kind of at the other end, you have people standing on their literally cutting material

00:10:27.800 --> 00:10:29.180
and assembling things.

00:10:29.180 --> 00:10:33.360
And then there's this big kind of gap in the middle of how you go from one thing to another.

00:10:33.360 --> 00:10:36.120
And that's kind of the meat of architecture.

00:10:36.860 --> 00:10:40.820
So, my experience was primarily medium and large buildings.

00:10:40.820 --> 00:10:47.360
And it's actually just very labor-intensive labor as far as software, not the hands-on labor

00:10:47.360 --> 00:10:48.160
for architects.

00:10:48.160 --> 00:10:52.880
But there's just a lot of work that goes into designing a big building.

00:10:52.880 --> 00:10:58.500
So, if you have a, I don't know, one of the office buildings I worked on, 150,000 square

00:10:58.500 --> 00:10:59.920
feet, six-story or something.

00:10:59.920 --> 00:11:04.180
And someone had come up with a design, okay, it's going to look like this.

00:11:04.180 --> 00:11:06.620
And it was very conceptual design, kind of massive.

00:11:06.620 --> 00:11:13.900
And then you have to turn into a real project with faucets that work and lights and sprinklers.

00:11:13.900 --> 00:11:14.620
Exactly.

00:11:14.620 --> 00:11:16.540
When you think, well, let me rephrase that.

00:11:16.540 --> 00:11:21.660
When I think of architecture, I think of the overall feel of it, right?

00:11:21.660 --> 00:11:22.940
Is it flowing?

00:11:22.940 --> 00:11:24.500
Does it have sharp edges?

00:11:24.500 --> 00:11:26.340
Does it feel modern, right?

00:11:26.340 --> 00:11:27.460
And so on.

00:11:27.560 --> 00:11:32.060
I have a picture here on the screen for us to look at that's this, you know, sort of

00:11:32.060 --> 00:11:32.980
wood structure.

00:11:32.980 --> 00:11:34.220
It's light and airy.

00:11:34.220 --> 00:11:36.480
And sure, that's architecture.

00:11:36.480 --> 00:11:39.500
But it sounds like, and so are the support beams.

00:11:39.500 --> 00:11:40.940
So is the plumbing.

00:11:40.940 --> 00:11:44.000
So is the light switch and where they go.

00:11:44.000 --> 00:11:49.180
And just way more detail than just the general skeleton or structure.

00:11:49.560 --> 00:11:54.460
Yeah, and like which part of the plywood is going to go in which direction, like on your

00:11:54.460 --> 00:11:57.520
kitchen counter or something, like that level of detail.

00:11:57.520 --> 00:12:01.420
But what you're showing here, it's kind of what you see in school and what you get really

00:12:01.420 --> 00:12:02.460
excited about in school.

00:12:02.460 --> 00:12:06.660
And then when you start working, you realize that there's only a few people that get to

00:12:06.660 --> 00:12:07.680
do this type of work.

00:12:07.680 --> 00:12:13.280
And the majority of the people are just kind of doing coordination and working on lots of

00:12:13.280 --> 00:12:15.940
drawings and coordination between different trades.

00:12:16.560 --> 00:12:20.140
But, you know, of course that does happen, but big chunk of the work is just figuring

00:12:20.140 --> 00:12:22.120
out how to coordinate and assemble drawings.

00:12:22.120 --> 00:12:28.760
So if you imagine a lot of this work is done on kind of traditional desktop applications.

00:12:28.760 --> 00:12:34.520
So if you're familiar with Autodesk, the biggest ones in the US are AutoCAD, Revit.

00:12:34.520 --> 00:12:38.520
Those are more, Revit is very like architecture kind of building focused.

00:12:38.520 --> 00:12:42.320
AutoCAD is more kind of generic, I know, drawing and drafting.

00:12:42.660 --> 00:12:48.960
And then you have other players like MacNeil, they do kind of 3D modeling and it's used all

00:12:48.960 --> 00:12:53.240
the way from small jewelry design and boats all the way to buildings, but more at the conceptual

00:12:53.240 --> 00:12:58.420
stage and Revit is kind of the big dog as far as like building documentation.

00:12:58.420 --> 00:13:01.740
And there's this interesting process because at the same time you are coming up with the

00:13:01.740 --> 00:13:03.300
building at large scale, right?

00:13:03.300 --> 00:13:04.220
Like what do you see there?

00:13:04.220 --> 00:13:05.220
That's kind of mass in.

00:13:05.220 --> 00:13:09.180
You have to zoom in all the way to what is it going to look like?

00:13:09.180 --> 00:13:12.560
Like cove in a bathroom, for example, and you might have to.

00:13:12.800 --> 00:13:14.300
Cut a section through that in detail.

00:13:14.300 --> 00:13:19.100
And there's this weird process we are still in where buildings are designed half in 3D

00:13:19.100 --> 00:13:19.940
and half in 2D.

00:13:19.940 --> 00:13:25.580
So you do some 3D and then you get sort of these views, but then you might zoom in and

00:13:25.580 --> 00:13:26.080
actually.

00:13:26.080 --> 00:13:27.420
Then you do a projection.

00:13:27.420 --> 00:13:29.240
You're like, oh, we need to see just this wall.

00:13:29.240 --> 00:13:29.660
Yeah.

00:13:29.660 --> 00:13:30.180
Yes.

00:13:30.180 --> 00:13:31.460
Or just the floor.

00:13:31.460 --> 00:13:32.120
How it's going to look.

00:13:32.120 --> 00:13:35.420
You can assemble the sketch work needs a drawing of like, what does it look like if I cut

00:13:35.420 --> 00:13:35.800
through here?

00:13:35.800 --> 00:13:40.580
And you literally draw in 2D and you have to assemble these big drawing sets that are references

00:13:40.580 --> 00:13:44.840
that show the 3D and say, okay, if you were to cut through this, here's what you would see.

00:13:44.840 --> 00:13:47.460
And oftentimes they're not even like the same model.

00:13:47.460 --> 00:13:50.600
You're just trying to make this thing look coordinated.

00:13:50.600 --> 00:13:52.040
How often does it go wrong?

00:13:52.040 --> 00:13:53.100
Oh, pretty often.

00:13:53.100 --> 00:13:53.500
Yeah.

00:13:53.500 --> 00:13:54.200
Pretty often.

00:13:54.200 --> 00:13:58.920
So one of the things that's done, usually there's a tool called Navisworks is one of the ones

00:13:58.920 --> 00:14:00.840
that's used that's for clash detection.

00:14:00.840 --> 00:14:05.440
So, cause not only have the architects, but you also have these trades coming together, right?

00:14:05.440 --> 00:14:11.780
So you have separate models for the architecture, like walls and floors and things like that.

00:14:11.780 --> 00:14:17.060
And then you have the structural engineer as a separate model with all the steel or concrete

00:14:17.060 --> 00:14:17.540
structure.

00:14:17.540 --> 00:14:24.500
And maybe the MEP, mechanical, electrical employment folks have a separate model and then they all

00:14:24.500 --> 00:14:25.140
get linked.

00:14:25.140 --> 00:14:30.980
And in the end you may have like a duck going through a life fixture or things kind of through

00:14:30.980 --> 00:14:31.220
all.

00:14:31.220 --> 00:14:35.540
And you actually have to do clash detections and trying to figure out places where the model

00:14:35.540 --> 00:14:37.540
may not have a kind of a valid condition.

00:14:37.540 --> 00:14:37.860
Yeah.

00:14:37.860 --> 00:14:38.820
I can imagine.

00:14:38.820 --> 00:14:45.300
So this Revit app is largely a .NET C# desktop application.

00:14:45.300 --> 00:14:45.700
Is that right?

00:14:45.700 --> 00:14:46.580
Yeah, correct.

00:14:46.580 --> 00:14:47.060
Yeah.

00:14:47.060 --> 00:14:50.420
And so if you want a programmer to work with it, what do you do?

00:14:50.420 --> 00:14:51.780
Do you do that in C#?

00:14:51.780 --> 00:14:52.020
Yeah.

00:14:52.020 --> 00:14:56.660
So Revit's been around for a while and I'm not sure when it started.

00:14:56.660 --> 00:15:01.860
I don't think it was from the very beginning, but at some point they released an API and without

00:15:01.860 --> 00:15:04.980
this API, you can do everything through the UI, right?

00:15:04.980 --> 00:15:08.740
So you can click around and you can basically achieve everything you need to.

00:15:08.740 --> 00:15:13.140
And through the API, you can sort of automate everything that's visible and sometimes a

00:15:13.140 --> 00:15:14.020
little bit more.

00:15:14.020 --> 00:15:20.260
But the idea is that, for example, one of the first tasks I automated in Revit was I was working

00:15:20.260 --> 00:15:24.500
in a really large office buildings and each room would get tagged with like the name of

00:15:24.500 --> 00:15:25.140
the room.

00:15:25.140 --> 00:15:25.140
Right.

00:15:25.140 --> 00:15:27.220
And I would have to literally drag the stag on.

00:15:27.220 --> 00:15:27.220
Right.

00:15:27.220 --> 00:15:31.620
And then sometimes as the building moved, things would get kind of out of place and you

00:15:31.620 --> 00:15:35.540
wanted the tags to be kind of centered nicely and you would literally have to go around and

00:15:35.540 --> 00:15:36.580
move around these tags.

00:15:36.580 --> 00:15:37.860
And one of the first.

00:15:37.860 --> 00:15:39.140
For hundreds of rooms, right?

00:15:39.140 --> 00:15:42.340
That sounds like not a fun, good use of your time.

00:15:42.340 --> 00:15:43.940
Oh, no, definitely not at all.

00:15:43.940 --> 00:15:44.340
Yeah.

00:15:44.340 --> 00:15:48.660
And yeah, one of the first automations I built was this tool that would just go

00:15:48.660 --> 00:15:51.460
automatically room by room and make sure the tag was in the center.

00:15:51.460 --> 00:15:55.300
So I'm just going to figure out the delta between the center of the room and where the tag was and

00:15:55.300 --> 00:15:56.020
like slide it.

00:15:56.020 --> 00:15:56.420
Yeah.

00:15:56.420 --> 00:16:01.300
And I actually had at the company that I worked at a time, I had a system that would measure the

00:16:01.300 --> 00:16:05.860
use of tools and that tool would just get used like hundreds of times a day.

00:16:05.860 --> 00:16:10.740
So imagine every time someone clicked that button, the amount of time you would see these architects

00:16:10.740 --> 00:16:15.140
like going around and moving these packs to get them center and just little things like that.

00:16:15.140 --> 00:16:21.860
Very kind of monotonous, boring, not very impressive automations, but actually a lot of time in the day

00:16:21.860 --> 00:16:22.180
to day.

00:16:22.180 --> 00:16:22.580
Yeah.

00:16:22.580 --> 00:16:27.300
But you can easily apply code to those and really make people's lives better.

00:16:27.300 --> 00:16:32.020
And it sounds like hundreds of people's lives better by, you know, not making them fiddle with

00:16:32.020 --> 00:16:33.220
stupid labels all the time.

00:16:33.220 --> 00:16:33.860
Oh yeah.

00:16:33.860 --> 00:16:34.580
Push a button.

00:16:34.580 --> 00:16:35.060
Right.

00:16:35.060 --> 00:16:40.100
So while these can be programmed in C#, there's a Python angle, right?

00:16:40.100 --> 00:16:40.660
Yeah.

00:16:40.660 --> 00:16:42.660
There's a couple of different ways that Python comes in.

00:16:42.660 --> 00:16:48.660
I think Revit itself does support some sort of Python automation, but it's again, it's a bit

00:16:48.660 --> 00:16:50.820
bulky, difficult to use, difficult to debug.

00:16:50.820 --> 00:16:55.380
So one of the main ways that it's used these days, there's this project and I've actually

00:16:55.380 --> 00:16:59.860
become really good friends with the maintainer, but there's this project called PyRevit.

00:16:59.860 --> 00:17:05.860
And the idea is that when you write Python, you get used to things being sort of Pythonic or more

00:17:05.860 --> 00:17:08.180
elegant and it's easy to do, right?

00:17:08.180 --> 00:17:13.620
So what he was trying to do is how can we have this kind of experience building automations within

00:17:13.620 --> 00:17:14.660
Revit?

00:17:14.660 --> 00:17:21.220
So instead of having to compile my C# add in, how can I kind of just pop up the script, click

00:17:21.220 --> 00:17:24.340
a button and have it run my Python code.

00:17:24.340 --> 00:17:26.660
And that's essentially, you know, what he built.

00:17:26.660 --> 00:17:32.420
So initially it was using only Iron Python because that's the way it integrates within the Revit

00:17:32.420 --> 00:17:32.900
environment.

00:17:32.900 --> 00:17:36.020
Since it's .NET, you would essentially use an Iron Python.

00:17:36.020 --> 00:17:39.540
You could interact directly with Revit through the common language runtime.

00:17:39.540 --> 00:17:39.940
Right.

00:17:39.940 --> 00:17:41.380
So tell us a bit about Iron Python.

00:17:41.380 --> 00:17:43.620
I suspect many people do know about it.

00:17:43.620 --> 00:17:48.580
This came originally out of a project at Microsoft.

00:17:48.580 --> 00:17:50.420
I think, was this Dino Veland?

00:17:50.420 --> 00:17:51.140
I can't remember.

00:17:51.140 --> 00:17:52.260
Yeah, that's what I've heard.

00:17:52.260 --> 00:17:55.860
I've interacted with the maintainers a couple of times over the last few years.

00:17:55.860 --> 00:18:00.260
And the impression I've had is that there was one or two people kind of trying to get this

00:18:00.260 --> 00:18:02.900
going, but it's not very active.

00:18:02.900 --> 00:18:06.020
And I think the three release wasn't too late.

00:18:06.020 --> 00:18:08.580
So it shows there it's still in alpha actually.

00:18:08.580 --> 00:18:11.220
At the time when I was using it, it was still in 2.7.

00:18:11.220 --> 00:18:12.980
It's been stuck there for a long time.

00:18:12.980 --> 00:18:14.260
At least it's making progress.

00:18:14.260 --> 00:18:16.500
I mean, here's a release in 2021 on it.

00:18:16.500 --> 00:18:17.060
So that's good.

00:18:17.060 --> 00:18:17.540
Yeah.

00:18:17.540 --> 00:18:21.940
One of the things I'm not too familiar with it, but I remember hearing from the PyRevit

00:18:21.940 --> 00:18:26.900
maintainer that they actually ended up using this other project called Python.net.

00:18:26.900 --> 00:18:27.140
Yes.

00:18:27.140 --> 00:18:33.060
And Iron Python is essentially a Python interpreter that was written in C#.

00:18:33.060 --> 00:18:35.700
And Python.net does something kind of different.

00:18:35.700 --> 00:18:40.260
It actually allows you to use CPython, but interact with the .NET side.

00:18:40.260 --> 00:18:43.860
And I don't quite remember how he worked, but I know he got it to work and he was able

00:18:43.860 --> 00:18:46.660
to get CPython applications running inside of Revit as well.

00:18:46.660 --> 00:18:47.060
Right.

00:18:47.060 --> 00:18:54.020
So Iron Python is a Python interpreter, but instead of having the interpreter implemented

00:18:54.020 --> 00:19:00.820
in C the way that the one that we're all mostly familiar with is, it's implemented on top of .NET.

00:19:00.820 --> 00:19:03.140
And yeah, that was Dino Vila in that double check.

00:19:03.140 --> 00:19:05.140
So nice job on that, Dino.

00:19:05.140 --> 00:19:11.780
And it's implemented on top of the .NET CLR runtime and it's kind of its own little thing in this thing called the dynamic language runtime,

00:19:11.780 --> 00:19:18.020
which means integration with .NET is super easy because it's already running in .NET.

00:19:18.020 --> 00:19:23.620
It's equivalent to saying integration with C is easy on CPython because it's already effectively running in C, right?

00:19:23.620 --> 00:19:30.980
And I guess that's probably a pretty natural way to go because if you're trying to integrate with a C# .NET library,

00:19:30.980 --> 00:19:34.580
you got to somehow get that thing in and do something with it, right?

00:19:34.580 --> 00:19:34.900
Right.

00:19:34.900 --> 00:19:37.220
So I could see why they would go with Iron Python first.

00:19:37.220 --> 00:19:44.580
But yeah, I've sort of heard that Python.NET is, it seems a little bit more CPython friendly, I guess.

00:19:44.580 --> 00:19:50.500
Yeah, I think one of the issues with the Iron Python project is that it's kind of impossible to maintain.

00:19:50.500 --> 00:19:58.500
Like how do you keep up with all the changes and releases of CPython and like rebuild them from scratch in C#?

00:19:58.500 --> 00:20:04.500
I would imagine it would take a huge amount of time and resources to keep that project like going in the same pace.

00:20:04.500 --> 00:20:12.260
Yeah. So here looking at Python.NET, we've got, it supports 27, but also 35, 36, 37, and 38, which is not 39 and 310.

00:20:12.260 --> 00:20:12.660
Yeah.

00:20:12.660 --> 00:20:15.860
But it sure is better than alpha support for 3.4.

00:20:15.860 --> 00:20:19.860
Yeah. Do you know how it actually, like what it actually does? How does it get to?

00:20:19.860 --> 00:20:27.860
I have no, I have not learned enough about Python.NET to know how it works, but it's, yeah, it looks pretty neat though, doesn't it?

00:20:27.860 --> 00:20:33.780
Yeah. But I think it's just, it's, you're able to operate in CPython, but kind of import common-legged

00:20:33.780 --> 00:20:40.580
during time and talk to your .NET DLLs in the same way you would from Iron Python. So it's pretty interesting.

00:20:40.580 --> 00:20:46.820
Yeah. You get very foreign looking code. Import CLR from system.winds.forms, import form,

00:20:46.820 --> 00:20:50.900
which is something you would expect to see in a .NET project, not in a Python project.

00:20:50.900 --> 00:20:55.300
Yeah. But there's actually, that's one interesting thing that I've seen happen quite a bit because

00:20:55.300 --> 00:21:01.860
people within this industry ended up using Iron Python quite a bit. I know there's a few projects

00:21:01.860 --> 00:21:08.580
out there for building UIs in Python, but I've actually seen quite a few projects with like desktop UIs

00:21:08.580 --> 00:21:12.020
basically built using, you know, .NET because it has...

00:21:12.020 --> 00:21:12.580
Oh, interesting.

00:21:12.580 --> 00:21:15.460
What is it? Windforms? I forgot what the other one was.

00:21:15.460 --> 00:21:21.540
Yeah. Windforms is the one that's like the modern-ish VB. I say modern-ish because I think they kind of

00:21:21.540 --> 00:21:28.180
stopped advancing that in something like 2008, I think is when they stopped advancing it. So it's

00:21:28.180 --> 00:21:34.100
not like super modern, but it's way more modern than VB6 was. So yeah, there's that and there's WPF.

00:21:34.100 --> 00:21:34.980
And then some weird variants.

00:21:34.980 --> 00:21:37.940
Oh yeah. WPF is the more current one, right?

00:21:37.940 --> 00:21:41.700
Yeah. Also way harder to use, but yeah, more modern one.

00:21:41.700 --> 00:21:49.300
This portion of Talk Python To Me is brought to you by Shortcut, formerly known as clubhouse.io.

00:21:49.300 --> 00:21:53.540
Happy with your project management tool? Most tools are either too simple for a growing

00:21:53.540 --> 00:21:58.420
engineering team to manage everything or way too complex for anyone to want to use them without

00:21:58.420 --> 00:22:03.940
constant prodding. Shortcut is different though, because it's worse. Wait, no, I mean, it's better.

00:22:03.940 --> 00:22:07.460
Shortcut is project management built specifically for software teams.

00:22:07.460 --> 00:22:12.420
It's fast, intuitive, flexible, powerful, and many other nice positive adjectives.

00:22:12.420 --> 00:22:17.860
Key features include team-based workflows. Individual teams can use default workflows or

00:22:17.860 --> 00:22:23.460
customize them to match the way they work. Org-wide goals and roadmaps. The work in these workflows

00:22:23.460 --> 00:22:29.380
is automatically tied into larger company goals. It takes one click to move from a roadmap to a team's

00:22:29.380 --> 00:22:34.580
work to individual updates and back. Type version control integration. Whether you use GitHub,

00:22:34.580 --> 00:22:40.260
GitLab, or Bitbucket, clubhouse ties directly into them so you can update progress from the command line.

00:22:40.260 --> 00:22:46.340
Keyboard-friendly interface. The rest of Shortcut is just as friendly as their power bar, allowing you to

00:22:46.340 --> 00:22:50.260
do virtually anything without touching your mouse. Throw that thing in the trash.

00:22:50.260 --> 00:22:56.420
Iteration planning. Set weekly priorities and let Shortcut run the schedule for you with accompanying

00:22:56.420 --> 00:23:02.260
burndown charts and other reporting. Give it a try over at talkpython.fm/shortcut. Again, that's talkpython.fm/shortcut.

00:23:02.260 --> 00:23:10.980
Choose Shortcut because you shouldn't have to project manage your project management.

00:23:10.980 --> 00:23:17.940
So what you're saying is you've seen some people write Python code that then will do stuff like this

00:23:17.940 --> 00:23:21.060
to put that kind of UI on the screen, right? Right.

00:23:21.060 --> 00:23:26.740
Yeah. And even PyRevit itself had quite a few kind of UI components and they were all just using standard

00:23:26.740 --> 00:23:33.220
.NET stuff, but writing in Python. And what's interesting too is in addition to PyRevit, there's

00:23:33.220 --> 00:23:38.660
a few other projects. And one of them I had worked on that's called, it was called Revit Python Wrapper.

00:23:38.660 --> 00:23:44.100
And there's another one called Revitron, which all have kind of similar idea, which is like,

00:23:44.100 --> 00:23:50.660
I want to have the Python experience, but, you know, using this other kind of stack. So the idea

00:23:50.660 --> 00:23:57.700
for Revit Python Wrapper is that the Revit API, it's this very bulky C# API. Yeah.

00:23:57.700 --> 00:23:58.900
It's enormous. There's...

00:23:58.900 --> 00:24:04.180
You can make it do its thing in Python, but you work with the type names and the function

00:24:04.180 --> 00:24:09.140
names and stuff straight out of the .NET world, right? Which is clearly not Pythonic. They're

00:24:09.140 --> 00:24:13.060
very different in the way of doing things. Yeah. So your code doesn't look or feel like Python. And

00:24:13.060 --> 00:24:18.100
then the interfaces and kind of the APIs for the libraries are weird. So like, if I want to just

00:24:18.100 --> 00:24:23.460
query, you know, this model for a wall, I would have to like build this object and this kind of like

00:24:23.460 --> 00:24:29.140
builder pattern. And, you know, it's, it's very strange. Like it doesn't feel like Python. So when I

00:24:29.140 --> 00:24:34.100
started writing that, I would build these little functions that would take the C# code and

00:24:34.100 --> 00:24:39.620
give me like a Python-like column that I could make. And that's what this project came out from,

00:24:39.620 --> 00:24:44.660
was this idea that I wanted to wrap everything that didn't feel Pythonic to make it like feel like I

00:24:44.660 --> 00:24:50.740
was using it. So you wrote your own, like your PyRevit wrapper a little bit that would then make it

00:24:50.740 --> 00:24:55.300
easier, right? And make it feel more natural. And then eventually you just decided... Yeah. So at the

00:24:55.300 --> 00:25:00.100
time I was writing, I was writing Python code and the PyRevit, it was sort of, it was kind of the

00:25:00.100 --> 00:25:04.020
environment. So the idea for PyRevit is you would, you could literally just save this .NET

00:25:04.020 --> 00:25:10.580
file in a folder and put a PNG icon and it would sort of load it up that file and add it to the

00:25:10.580 --> 00:25:15.540
Revit ribbon. So someone could click on it. And when he clicked, it would load your source code and feed

00:25:15.540 --> 00:25:21.620
it into the Python engine. So it would just help you kind of establish this environment and you didn't

00:25:21.620 --> 00:25:28.500
have to compile and add in, restart Revit. And then Revit Python wrapper was that every script that I had,

00:25:28.500 --> 00:25:34.900
I would just import Revit Python wrapper and then just say collector type equals wall and it would

00:25:34.900 --> 00:25:39.380
query for every wall of the model. And I stopped working on this project for a while. Then I recently

00:25:39.380 --> 00:25:44.260
ran into this Revitron, which is a much more kind of sophisticated version, but essentially the same

00:25:44.260 --> 00:25:51.060
idea. People wanted to write a very clean Python, but operate kind of on top of the Revit API without

00:25:51.060 --> 00:25:57.620
having to deal with the non kind of Python look and feel. Interesting. Okay. Yeah. And even has its own

00:25:57.620 --> 00:26:04.820
CLI. Oh yeah. Yeah. I guess it integrates with the PyRevit CLI, right? Yeah. So one of the things that's

00:26:04.820 --> 00:26:11.380
interesting about this high Revit, which if I go further enough back, I'll find it, is that you can use

00:26:11.380 --> 00:26:17.300
Python to build these little toolbar buttons or widgets, right? Yeah. And the way you do it is,

00:26:17.300 --> 00:26:23.940
as you sort of described, there's this super convention of all of these directory, this directory

00:26:23.940 --> 00:26:29.860
structure, right? Like if you put this file there and then the Python file in like some location that can,

00:26:29.860 --> 00:26:36.500
it'll trigger the discovery that'll then create like a, some kind of icon and action in there, right? Maybe

00:26:36.500 --> 00:26:40.660
tell us about that a bit. Yeah. And under the hood, if you were to write this in C#, there would be a

00:26:40.660 --> 00:26:45.940
whole bunch of boilerplate that you would have to add for how those buttons get instantiated and loaded

00:26:45.940 --> 00:26:52.100
into the UI. And one thing that I've sort of witnessed, like seeing PyRevit project grow, I was one of the

00:26:52.100 --> 00:26:59.780
kind of early users, adopters. And it was this huge barrier for people who wanted to automate Revit because

00:26:59.780 --> 00:27:07.220
you had to learn C# and the add-ins were difficult to build. And it was just this big time.

00:27:07.220 --> 00:27:11.460
You probably had to learn interfaces and how to implement them and all that kind of stuff.

00:27:11.460 --> 00:27:16.260
Yeah. And like you had to, you had to go around like the little, you know, the compile settings and

00:27:16.260 --> 00:27:20.660
think around with it to get it to work. And you had to compile for different versions of Revit. And it was

00:27:20.660 --> 00:27:26.260
really difficult, at least for me, maybe it's easier for some people, but with PyRevit, you could literally just

00:27:26.260 --> 00:27:31.460
duplicate this folder and open a new Python file, start messing with it. And every time you click,

00:27:31.460 --> 00:27:35.460
it would rerun. You wouldn't even have to reload anything because you would just read the source

00:27:35.460 --> 00:27:40.100
code and feed it to the RnPython interpreter. So for the first time, I felt like I had this ability to

00:27:40.100 --> 00:27:46.340
iterate quickly and explore and test things out. So it was a totally different experience.

00:27:46.340 --> 00:27:52.020
Yeah, that's great. I'm looking at the code sample here for PyRevit, the create your first command

00:27:52.020 --> 00:27:58.820
example. And I see exactly what you're talking about with this sort of C# abstractions leaking into the

00:27:58.820 --> 00:27:59.220
Python world.

00:27:59.220 --> 00:28:01.220
Yeah, there's definitely a little vision there.

00:28:01.220 --> 00:28:05.220
Yeah, because it says, oh, look how easy it is to build this. You just drop this in this here and you put your

00:28:05.220 --> 00:28:12.580
Python file in the folder that is like your button where it contains your icons. And then you write capital

00:28:12.580 --> 00:28:19.780
db, capital F filtered, capital E element, capital collector. So filtered element collector of

00:28:19.780 --> 00:28:26.660
da da da da, right? It's real similar to what you would expect from that language. That language's idioms

00:28:26.660 --> 00:28:27.780
and not Python's idioms.

00:28:27.780 --> 00:28:28.660
Yeah.

00:28:28.660 --> 00:28:32.740
In the Revit Python wrapper, I started wrapping these classes. So for example, the filtered

00:28:32.740 --> 00:28:38.180
element collector, I mean, that's a pretty long that I wouldn't give it to a Python class usually. So

00:28:38.180 --> 00:28:43.540
I just called it the collector and I created a class that wrapped the filtered element collector. So

00:28:43.540 --> 00:28:49.300
instead of writing something like this, you would say collector type equals wall. And you could write,

00:28:49.300 --> 00:28:54.740
you know, wall as an enum and you would sort of basically output this code that you're seeing there.

00:28:54.740 --> 00:28:58.740
But the problem is you can't really avoid it because even though you wrapped collector,

00:28:58.740 --> 00:29:04.500
there are like 8,000 other like C# classes that I'm not going to wrap them individually.

00:29:04.500 --> 00:29:08.260
So like eventually just kind of leaks. You just can't, you can't do the whole thing.

00:29:08.260 --> 00:29:13.140
Yeah. Somewhere there's some function you can't get in front of and it returns one of these things.

00:29:13.140 --> 00:29:15.300
And then, then there it is. Right. Exactly.

00:29:15.300 --> 00:29:20.260
I tried at some point, I had these wrappers that would take the return and wrap those into some sort

00:29:20.260 --> 00:29:24.500
of generic wrapper. And you would get so complicated and people that they couldn't

00:29:24.500 --> 00:29:28.660
figure out what it was doing. So that's why that Revit Python project ended up

00:29:28.660 --> 00:29:32.500
just kind of being abandoned at some point. And I wasn't as involved with it anymore.

00:29:32.500 --> 00:29:36.740
So I just kind of sat there, but that was the idea. If you look at an example for that one,

00:29:36.740 --> 00:29:39.780
you see that it looks a lot more, more Python-like.

00:29:39.780 --> 00:29:43.140
Yeah, absolutely. I'm clearly seeing stuff that looks more like Python.

00:29:43.140 --> 00:29:47.860
And that's fantastic. Right. Like, you know, variable names. Another thing that you spoke about that,

00:29:47.860 --> 00:29:53.780
I don't even know what you were doing to solve this, but you said that you had to somehow adapt to things like

00:29:53.780 --> 00:30:00.180
out parameters and ref parameters, which is a certain way to have a, instead of doing pass by value,

00:30:00.180 --> 00:30:05.540
so you can actually modify the reference itself and the parameter. It's a little bit like

00:30:05.540 --> 00:30:11.380
passing a pointer to a pointer in C or something like that, where you can change the pointer itself

00:30:11.380 --> 00:30:16.500
inside the function. What did they do in Python to deal with that? That seems, I don't know how to

00:30:16.500 --> 00:30:17.060
do that in Python.

00:30:17.060 --> 00:30:22.180
Iron Python has a special, I don't remember because it's been a while, but Iron Python has a special construct.

00:30:22.180 --> 00:30:25.620
Oh, okay. So in Iron Python, there's like an out or something. Okay.

00:30:25.620 --> 00:30:32.180
Yeah. So you import some special Iron Python object, and that becomes your reference and pass that.

00:30:32.180 --> 00:30:38.420
So, you know, Iron Python is this, is this weird kind of ways of handling those differences. What's

00:30:38.420 --> 00:30:42.820
difficult is that it's a very niche thing. So when you run into a problem with, with those,

00:30:42.820 --> 00:30:47.860
there's not a whole lot of people like trying to solve this. So it was always a little bit difficult

00:30:47.860 --> 00:30:48.260
too.

00:30:48.260 --> 00:30:54.740
I've had that sort of scenario before. And it's, it's not very often fun. And I remember

00:30:54.740 --> 00:30:59.060
specifically one time there was something I was trying to do with this code and it just

00:30:59.060 --> 00:31:06.180
was not responding in any way that I expected. And I was, I was at my wits and I'm like, I'm just going

00:31:06.180 --> 00:31:10.980
to Google this. I'm just going to just find whatever I can. And the only answer I could find was a blog

00:31:10.980 --> 00:31:15.060
post I wrote about it six months ago. I'm like, well, that's it. We're done. There's,

00:31:15.060 --> 00:31:19.860
there's no hope for me now. Cause I'm sure I've tried. I can't do it. And I, the only thing I can

00:31:19.860 --> 00:31:23.540
find is some dumb blog posts that didn't really answer the question I wrote about it. So here we go.

00:31:23.540 --> 00:31:29.220
On Iron Python, a couple of times I had issues. My only resource was to go into the GitHub project

00:31:29.220 --> 00:31:34.660
and actually post an issue. And I said, there's a stack over full question, no responses. I'm

00:31:34.660 --> 00:31:36.100
completely at lost here.

00:31:36.100 --> 00:31:40.900
Yeah. Well, that's such one of those, such a big challenge of using one of the

00:31:40.900 --> 00:31:46.820
these sort of niche interpreters or runtimes, because when you need help, there's no one to

00:31:46.820 --> 00:31:51.620
help you. And if it comes down to some little weird internal behavior, right, that behavior might be

00:31:51.620 --> 00:31:54.980
different. And just because people, they'll tell you, well, that's how it works in CPython. You're

00:31:54.980 --> 00:31:58.820
like, well, I know, but that's not how it works for me right now. Right. Can you help me? Like,

00:31:58.820 --> 00:32:01.220
no, I don't know anything about that. Right. It's, it's a challenge.

00:32:01.220 --> 00:32:06.420
Yeah. And if you're trying to post a reproducible example in Stack Overflow, and you have to have

00:32:06.420 --> 00:32:10.660
Revit open, for example, to execute this, if you're trying to deal with some like,

00:32:10.820 --> 00:32:14.260
lots of iron Python within this environment, it's really difficult.

00:32:14.260 --> 00:32:17.700
Yeah. Oh my gosh. I can see why you would want to get away from it. I'm guessing that

00:32:17.700 --> 00:32:22.500
Python.net makes this easier. Maybe it's still the same. I'm not entirely sure. I would like to learn

00:32:22.500 --> 00:32:23.780
more about that one, but yeah.

00:32:23.780 --> 00:32:24.420
Same here.

00:32:24.420 --> 00:32:27.700
Yeah. Let's see. On the live stream, I just want to say, hey,

00:32:27.700 --> 00:32:33.060
Bhavani, that finally could catch up on the live stream here. Big fan of Python. And just,

00:32:33.060 --> 00:32:37.700
you know, people listening, if you get the chance to be grateful to drop by the live stream we do on

00:32:37.700 --> 00:32:42.420
YouTube, just go to talk python.fm/youtube. YouTube can be part of it. It's always fun to get

00:32:42.420 --> 00:32:47.860
input from everyone out there. All right. Give us some examples of the types of things that you were

00:32:47.860 --> 00:32:52.980
able to do with Python and automating Revit. There's a talk, I'll go ahead and link to the talk that you

00:32:52.980 --> 00:33:00.820
gave at a meetup in San Francisco at Pine Silla. I'm saying that correctly. Yeah. And you talked about,

00:33:00.820 --> 00:33:05.460
there's a lot of nice graphics and you talked a lot about what you've done at various projects and stuff.

00:33:05.460 --> 00:33:09.540
Give us some concrete examples. Like it's all great in practice to say you could automate stuff,

00:33:09.540 --> 00:33:10.660
but like, what did you actually do?

00:33:10.660 --> 00:33:16.020
Yeah. So there was a lot of those kind of very boring, automating, moving tags type of thing.

00:33:16.740 --> 00:33:21.220
Some of the other bigger projects I worked on at the time I was working at WeWork.

00:33:21.220 --> 00:33:23.780
This is the fast growth time at WeWork as well, right?

00:33:23.780 --> 00:33:29.300
Yeah, that's right. So when I joined WeWork, it was a relatively small team. I think the

00:33:29.300 --> 00:33:34.660
built-in information, you know, modeling team, which is the team that I had joined, had just a handful,

00:33:34.660 --> 00:33:41.220
like four, five people. And I think the company as a whole was maybe 800. And when I left four years

00:33:41.220 --> 00:33:46.340
later, they were at around 10,000 employees. Oh my gosh. And then the building department,

00:33:46.340 --> 00:33:51.540
or the design building and design department initially was open in one or two buildings a

00:33:51.540 --> 00:33:58.900
month. And by the time I left, they were open in like 25 or 30. So all other kind of WeWork drama

00:33:58.900 --> 00:34:03.700
side of what happened within the company, within the kind of design and architecture department,

00:34:03.700 --> 00:34:07.540
it was just, it was really interesting to see. Yeah. Because traditionally,

00:34:07.540 --> 00:34:11.940
companies build in buildings, they're doing that as a service. So they're an architecture office

00:34:11.940 --> 00:34:16.580
that you hire. And WeWork was one of those examples where you had this kind of vertical integration.

00:34:16.580 --> 00:34:21.460
They were the owners, they were the operators, they were the designers, they were the builders,

00:34:21.460 --> 00:34:28.180
they even bought, they acquired a general contractor. So you had this huge opportunity to optimize and to

00:34:28.180 --> 00:34:33.300
integrate. So some of the things that we did, like one of the projects I worked there was related to

00:34:33.860 --> 00:34:39.940
integrating data from the earlier design process into everything that would happen kind of downstream.

00:34:39.940 --> 00:34:44.420
So for example, as designers were working on buildings and trying to get them through the

00:34:44.420 --> 00:34:50.660
approval process, as soon as this project was sort of starting to materialize, we wanted to get those

00:34:50.660 --> 00:34:57.780
spaces fed into the kind of sales pipeline. So we would actually build Revit integrations that would extract

00:34:57.780 --> 00:35:03.300
data from these models and feed them to other parts of the company. So one of them was related to

00:35:03.300 --> 00:35:04.020
Oh, interesting.

00:35:04.020 --> 00:35:08.500
Yeah. To figuring out how many offices are going to be in this building, how big are they,

00:35:08.500 --> 00:35:12.980
how many desks are in each one, and essentially integrate that, for example, with Salesforce,

00:35:12.980 --> 00:35:20.420
so that the sales team could start selling them. We did things with supply chain as well. So we have

00:35:20.420 --> 00:35:26.980
logistics company that would be trying to orchestrate shipment of, for example, these chairs and couches

00:35:26.980 --> 00:35:31.540
that you see in the photo, they would need to be placed at warehouses and then delivered to buildings

00:35:31.540 --> 00:35:36.900
before opening. And they turned these buildings around really quickly. So it was really important

00:35:36.900 --> 00:35:42.580
that they had kind of insight. So as people were designing these buildings, we could actually start

00:35:42.580 --> 00:35:48.260
quantifying what was being used, what was going to be assigned, and then get the data sort of out of the

00:35:48.260 --> 00:35:54.100
model, which is not very, it's essentially a file that sits there. And we would use Python, for example,

00:35:54.100 --> 00:35:59.060
to quantify these things, pull the data out, and then send them on to other platforms. So it's a

00:35:59.060 --> 00:36:00.420
little bit of kind of data wrangling.

00:36:00.420 --> 00:36:06.340
Yeah. It's like JIT interior design, just in time, right? Like, we're going to need this here by

00:36:06.340 --> 00:36:11.140
Tuesday. So we're going to automate it. So one of the things you have to do is you have to figure out

00:36:11.140 --> 00:36:15.540
how, you know, maybe describe for, I'm sure not everyone's been inside of what we work before. Give

00:36:15.540 --> 00:36:19.620
us a quick sense of like, what is the inside of what we work look like? Or any, a lot of these co-working

00:36:19.620 --> 00:36:22.020
spaces, but we work is probably one of the bigger ones.

00:36:22.020 --> 00:36:29.220
Yeah. So we work, it would take empty floor spaces and they would use sort of storefronts,

00:36:29.220 --> 00:36:35.220
kind of glass their storefronts and subdivide them into small offices, as small as a single desk or

00:36:35.220 --> 00:36:41.940
kind of cuticle. And they could be as big as a 15 or 20 person office. And they were really efficient

00:36:41.940 --> 00:36:46.740
in how they kind of packed these desks. And they would do it in a way that it was very efficient for them.

00:36:46.740 --> 00:36:50.740
They would pack these offices really close, but then they would create these really nice,

00:36:50.740 --> 00:36:57.140
beautiful shared common spaces. So when you would walk into WeWork, you would often see these very

00:36:57.140 --> 00:37:03.220
kind of slick hip spaces, well-designed music playing. So it was this kind of nice experience,

00:37:03.220 --> 00:37:09.940
this cool kitchen and coffee area. And I think they were really good at it. I got to work out of WeWork

00:37:09.940 --> 00:37:15.620
for many years and it was a really nice change for my previous kind of office environments. And even as a

00:37:15.620 --> 00:37:18.100
a product, I actually really enjoyed what they were building.

00:37:18.100 --> 00:37:22.660
Nice. Yeah. So one of the things you spoke about is setting up some automation to figure out, well,

00:37:22.660 --> 00:37:28.100
how should we lay out these tables, either this open space, like just hangout area tables or

00:37:28.100 --> 00:37:34.340
like the co-working desks, or there's some parts that have like glass, clear glass separators. So you

00:37:34.340 --> 00:37:38.340
have some sort of quiet, but it's still, they've all got to be laid out, right? And you can say,

00:37:38.340 --> 00:37:42.740
okay, if we adjust the walls like this or do that, then here's the arrangement, right?

00:37:42.740 --> 00:37:47.380
Yeah. A couple of my coworkers were trying to figure out how to automate this so that

00:37:47.380 --> 00:37:52.580
as architects are taking this kind of big floor plate and they're slicing it, they're generally

00:37:52.580 --> 00:37:56.660
trying to figure out how the circulation is going to work. And then we build these kind of long blocks,

00:37:56.660 --> 00:38:00.660
and then you're going to start subdividing them to offices. And then as you start subdividing them,

00:38:00.660 --> 00:38:04.500
then you've got to figure out how the desks are going to work. And then you have columns. So actually

00:38:04.500 --> 00:38:11.220
like laying them out and getting kind of an efficient algorithm can be kind of time consuming. So some folks from

00:38:11.220 --> 00:38:17.460
the data and research team, they were writing algorithms. And the first one that I saw was actually written in Python.

00:38:17.460 --> 00:38:23.460
And I think it was served like using a Flask API, but the idea is that you could pass it a polygon

00:38:23.460 --> 00:38:28.900
and you would apply these rules about how you can lay out desks within this kind of polygon.

00:38:28.900 --> 00:38:35.220
And you would say, the door is here, do your best to lay out desks. And you would, you would try to do that. It was

00:38:35.220 --> 00:38:40.100
fairly straightforward math. It wasn't artificial intelligence or some sort of machine learning. It

00:38:40.100 --> 00:38:44.020
was actually pretty straightforward kind of brute force, which I found laying these out along the

00:38:44.020 --> 00:38:48.340
edges. But they were really interesting. They did some really interesting research on that.

00:38:48.340 --> 00:38:53.060
Yeah. Cool. A lot of nice examples of what you can do with a little bit of Python, a little bit of

00:38:53.060 --> 00:38:58.820
automation, even if you've got to somehow mash that together with a .NET or, you know, I guess if it

00:38:58.820 --> 00:39:02.340
was a Java API, you could use Jython or some other thing like that, right?

00:39:02.340 --> 00:39:07.540
Yeah. And this one specifically, the way we got around it is by actually building it as an API and

00:39:07.540 --> 00:39:13.780
have a C# add in called API to do the calculation. So that way we're going to have to deal with it.

00:39:13.780 --> 00:39:15.620
Nice. Yeah, that's perfect.

00:39:15.620 --> 00:39:23.860
This portion of Talk Python To Me is sponsored by Linode. Cut your cloud bills in half with Linode's

00:39:23.860 --> 00:39:29.860
Linux virtual machines. Develop, deploy, and scale your modern applications faster and easier. Whether

00:39:29.860 --> 00:39:34.660
you're developing a personal project or managing larger workloads, you deserve simple, affordable,

00:39:34.660 --> 00:39:40.340
and accessible cloud computing solutions. Get started on Linode today with $100 in free credit

00:39:40.340 --> 00:39:46.260
for listeners of Talk Python. You can find all the details over at talkpython.fm/linode.

00:39:46.260 --> 00:39:52.340
Linode has data centers around the world with the same simple and consistent pricing, regardless of

00:39:52.340 --> 00:39:59.540
location. Choose the data center that's nearest to you. You also receive 24/7/365.

00:39:59.540 --> 00:40:04.340
human support with no tiers or handoffs, regardless of your plan size. Imagine that,

00:40:04.340 --> 00:40:09.780
real human support for everyone. You can choose shared or dedicated compute instances,

00:40:09.780 --> 00:40:16.740
or you can use your $100 in credit on S3 compatible object storage, managed Kubernetes clusters, and more.

00:40:16.740 --> 00:40:22.820
If it runs on Linux, it runs on Linode. Visit talkpython.fm and click the create free account button

00:40:22.820 --> 00:40:28.100
to get started. You can also find the link right in your podcast player show notes. Thank you to Linode for

00:40:28.100 --> 00:40:35.780
supporting Talk Python. Let's talk about this other thing that you've been working on,

00:40:35.780 --> 00:40:41.780
AEC.works, which is architectural engineering and construction works. And tell us a bit about this

00:40:41.780 --> 00:40:47.220
project. This is a website you built for raising the visibility of cool companies in the space.

00:40:47.220 --> 00:40:55.620
Yeah. This actually started when I was an engineer at WeWork and I was seeing a lot of really interesting

00:40:55.620 --> 00:41:04.180
companies start to show up and try to build either software products or try to take a technology and

00:41:04.180 --> 00:41:10.500
build new companies within AEC that were trying to use technology in some interesting way. And I started

00:41:10.500 --> 00:41:16.100
keeping a list of it, Google sheet or your table form or something. And this list started growing.

00:41:16.100 --> 00:41:21.140
And so it started with four and five and eventually I had 20 or 30 of them. And I would often share them

00:41:21.140 --> 00:41:26.900
in different kind of community forums. And then I thought it would be interesting if I could somehow make

00:41:26.900 --> 00:41:33.380
that available and maybe even so that people could contribute and edit them. So basically build this out.

00:41:33.380 --> 00:41:40.580
It's a Django, a traditional, somewhat traditional Django app, except that on the front end, instead of

00:41:40.580 --> 00:41:47.860
using templates, I just use Vue.js. So it's a front end, back end separation type project. And yeah,

00:41:47.860 --> 00:41:52.340
the idea is that you can create these entries that represent these different companies or products.

00:41:52.340 --> 00:41:56.500
And then it just, you know, it's kind of displays them. It's pretty simple, nothing really crazy.

00:41:56.500 --> 00:42:01.140
Nice. Yeah. I will highlight a couple just to give people a sense, but there's a way to come here and say,

00:42:01.140 --> 00:42:05.220
suggest a company that's doing like innovative work here, right? So if people are out there like,

00:42:05.220 --> 00:42:07.300
why is my company out here? Well, there's a button, right?

00:42:07.300 --> 00:42:08.020
Yeah, exactly.

00:42:08.020 --> 00:42:13.940
All right. So I just briefly, let's talk about two of them that are maybe noteworthy.

00:42:13.940 --> 00:42:20.500
This one right at the top of the moment that says it's called Speckle. And let's see, it says,

00:42:20.500 --> 00:42:25.220
engineers, designers, and hackers, and the entire organization rely on us for interoperability

00:42:25.220 --> 00:42:30.980
automation. So it's like source control collaboration, versioning notification for

00:42:30.980 --> 00:42:33.380
architectural construction folks.

00:42:33.380 --> 00:42:40.820
Yeah. It's a little bit like AC architecture, geoconstruction data wrangling on steroids, right?

00:42:40.820 --> 00:42:45.140
So when you're in, and if you're working with software, you can pretty much always just like

00:42:45.140 --> 00:42:50.420
make a JSON and pass it around. Right. And you can, as long as you can get, you know, at least some basic

00:42:50.420 --> 00:42:56.020
data types. Now, if you have to pass around a wall, it's much more difficult than just passing around a

00:42:56.020 --> 00:43:02.500
string. And what type of wall is it? Where is it located? How big it is? It's complicated. So you have

00:43:02.500 --> 00:43:06.260
all these different desktop applications. And I've highlighted some that are used primarily within

00:43:06.260 --> 00:43:11.060
architecture, like Revit, for example. But there's all these other applications for other disciplines

00:43:11.060 --> 00:43:13.860
within the construction, you know, engineering industry.

00:43:13.860 --> 00:43:19.860
Right. Some of the ones they highlight are like Unity, Civil, 3D, E-Tabs, Blender, Unreal,

00:43:19.860 --> 00:43:21.220
that kind of stuff. Yeah.

00:43:21.220 --> 00:43:21.220
Yeah.

00:43:21.220 --> 00:43:22.180
There's Revit, yeah.

00:43:22.180 --> 00:43:28.020
So yeah, the first time Speckle came around, I believe it was like an academic project came out of

00:43:28.020 --> 00:43:32.980
Europe. And what they would do is they would build, like, for example, you know, an add-in for one of

00:43:32.980 --> 00:43:39.140
these platforms. And they would output some sort of serialization of these objects. And then they would

00:43:39.140 --> 00:43:44.980
build an add-in for another of these, you know, desktop apps that could read that JSON object.

00:43:44.980 --> 00:43:50.020
And DC realized it back into this architectural or, you know, engineer whatever structural beam or

00:43:50.020 --> 00:43:54.500
something. So it was about building all these connectors and would plug into these environments

00:43:54.500 --> 00:43:58.260
that weren't very easy to interrupt data in and out. Right.

00:43:58.260 --> 00:44:03.140
And on top of it, you would have a web platform. I think they call it like streams or something.

00:44:03.140 --> 00:44:08.020
And that way you could take data from one thing and plug it into another, see them all online

00:44:08.020 --> 00:44:12.340
together and share them, for example. So there's some, you know, really interesting ideas about

00:44:12.340 --> 00:44:17.380
collaborating, tracking them. And that's only possible because you take them out of these desktop

00:44:17.380 --> 00:44:23.220
apps, because a lot of them are not really built for this type of collaboration or this type of data

00:44:23.220 --> 00:44:26.820
sharing. Yeah. That's a really interesting idea. Like these things do not support

00:44:26.820 --> 00:44:31.780
any sort of interoperability, but if we can just get stuff in and out of any one of them,

00:44:31.780 --> 00:44:36.340
we could be that middle ground. Right. Yeah. So I don't know a ton about this. I really basically

00:44:36.340 --> 00:44:41.300
just skim the website and watch their explainer video, but it seems like some pretty cool open

00:44:41.300 --> 00:44:44.740
source stuff for people in this space. So they could check that out. Right.

00:44:44.740 --> 00:44:48.980
Yeah. And what I think what it's exciting about them is that they're actually open source too. So

00:44:48.980 --> 00:44:55.780
a lot of software in AC is they're big companies and they're paid and there's not a lot of example of

00:44:55.780 --> 00:45:02.340
successful open source companies essentially. They've actually been able to become a real company with

00:45:02.340 --> 00:45:06.900
employees and raise money and they're open source. So it's really interesting to see them trying to

00:45:06.900 --> 00:45:10.980
build a successful open source model within the industry. Yeah, absolutely.

00:45:10.980 --> 00:45:18.340
Prad Vaughan out in the live stream says two double high fives for Django for your app at

00:45:18.340 --> 00:45:23.860
AEC.works. All right. So that's Speckle, which is cool. And then also Ladybug, Ladybug tools.

00:45:23.860 --> 00:45:28.340
Yeah. Ladybug is incredible too. Ladybug's been around for a while. I don't know how long,

00:45:28.340 --> 00:45:33.620
but it was actually one of my first experiences, one of the first times I got exposed to open source

00:45:33.620 --> 00:45:39.780
within AC industry as well. But it's essentially, it started, it was a bunch of Python tools that would help you

00:45:40.340 --> 00:45:46.260
do kind of environmental analysis and they would basically use like weather data and some

00:45:46.260 --> 00:45:51.620
existing products. I forgot that it's been a while since I used this, but they would essentially wrap

00:45:51.620 --> 00:45:58.820
around these heavier duty programs that could actually do like daylight simulation or like solar analysis.

00:45:58.820 --> 00:46:04.740
But they would, they would build an interface in Python that you could use within, or Revit wasn't too much

00:46:04.740 --> 00:46:09.940
later, but right now when some of these other AC applications and the outcome within was that you

00:46:09.940 --> 00:46:15.300
would basically would allow any kind of architect, you know, students to essentially take any type of

00:46:15.300 --> 00:46:20.020
building that they were designing and actually run and see what does this building look like throughout

00:46:20.020 --> 00:46:25.940
the year? What does sun hit or what does light look like inside and actually render these analytical

00:46:25.940 --> 00:46:31.140
kind of drawings from it? So it was really interesting. It made all of that kind of accessible to a lot of

00:46:31.140 --> 00:46:35.700
people that wouldn't have been able to otherwise. And I think it was entirely written in Python for a long time.

00:46:35.700 --> 00:46:41.060
Yeah. It has a cross platform, Ladybug tools. It's written in Python, which can be run almost anywhere

00:46:41.060 --> 00:46:47.220
and plugged into any geometry engine, which is great. And then it talks about having some visual aspects of

00:46:47.220 --> 00:46:54.100
harnessing the capabilities of CAD to produce a variety of interactive 3D graphics, which producing cool interactive graphics in

00:46:54.100 --> 00:46:56.820
Python is always fun. But yeah, this one's also free and open source.

00:46:56.820 --> 00:47:01.860
Yep. That's right. I think they've received some grants from the public of energy or something like

00:47:01.860 --> 00:47:03.780
that. They're pretty well supported.

00:47:03.780 --> 00:47:09.540
Yeah. And it's 99.8% Python. That's still a lot of Python and 0.2% other.

00:47:09.540 --> 00:47:10.580
It's probably marked down.

00:47:10.580 --> 00:47:15.620
It's probably. I'm guessing it's the one shell script and the requirements.txt here.

00:47:15.620 --> 00:47:16.580
Yeah, that's right.

00:47:16.580 --> 00:47:22.100
Awesome. All right. So all that stuff is super neat. The work that you're doing here to shine a light on,

00:47:22.100 --> 00:47:26.820
the different ways we can automate stuff. In architecture, we've got Revit and then the

00:47:26.820 --> 00:47:35.220
PyRevit and the Python Revit wrapper and then Revtron, you said. And then also these open source

00:47:35.220 --> 00:47:40.020
like connectors and interoperability platforms are all super neat. I do want to talk to you about

00:47:40.020 --> 00:47:44.740
one other thing that doesn't have a super clear connection, but it's also, it sounds like it came

00:47:44.740 --> 00:47:48.340
out of your time at WeWork, this stuff you did with Airtable. Is that right?

00:47:48.340 --> 00:47:49.460
Yeah. Yeah, that's right.

00:47:49.460 --> 00:47:54.500
Yeah. So Airtable is something that I've seen and I've had people tell me that, oh, you definitely have

00:47:54.500 --> 00:48:00.420
to work with Airtable. It's amazing. It's like Sheets or Excel, but way nicer or things like that.

00:48:00.420 --> 00:48:04.820
Tell us, you know, a couple people out there, Airtable is this commercial product, right? Tell us about

00:48:04.820 --> 00:48:08.020
this and then we'll get to some Python side of things in a moment.

00:48:08.020 --> 00:48:13.620
Yeah. I'm a huge fan of Airtable. Pretty much since the first time I sort of run into it,

00:48:13.620 --> 00:48:19.540
I've been an user and I use it for everything personal projects work, but I define it as this

00:48:19.540 --> 00:48:25.940
kind of Google Sheets meet relational database. And I think there are other products like it,

00:48:25.940 --> 00:48:28.980
but I find Airtable just really kind of a joy to use.

00:48:28.980 --> 00:48:34.260
Yeah. I also feel like there's a Trello Kanban board aspect of it as well, right?

00:48:34.260 --> 00:48:37.860
Yeah. They've been adding, you know, quite a few kind of like views

00:48:37.860 --> 00:48:42.340
and tooling on top of the underlying data. So there's some interesting things you can do.

00:48:42.340 --> 00:48:49.780
It's not as sort of pure of a kind of tracker as Trello is, but you can basically build a Trello-like

00:48:49.780 --> 00:48:56.020
interface and there's a Kanban mode. So you can, whatever your roles are, if you have certain fields.

00:48:56.020 --> 00:49:01.140
So for example, you could maybe have a table with like apartments you're enlisted, for example, and maybe

00:49:01.140 --> 00:49:07.540
you have a column that is the status, whether you've visited them or not. And in Google Sheet, you would maybe

00:49:07.540 --> 00:49:12.740
type it or do like a data validation. In Airtable, you can actually see this is a field that links to

00:49:12.740 --> 00:49:19.140
this other table and you have the options that I want. And you can kind of create truly kind of relational

00:49:19.140 --> 00:49:24.100
data and have these views be linked to each other and in some really interesting ways.

00:49:24.100 --> 00:49:30.340
Yeah. Cool. Yeah. So it's, it's a little bit like spreadsheet meets relational database

00:49:30.340 --> 00:49:34.340
that has relationships rather than just random stuff you type in Excel, right?

00:49:34.340 --> 00:49:39.540
Yeah, that's right. Cool. All right. So that's Airtable. The Python side of things is you created

00:49:39.540 --> 00:49:45.700
this thing called a PI Airtable, which is a Python client for the Airtable API, right? Tell people about

00:49:45.700 --> 00:49:51.460
this. The initial version of this was through my time at WeWork as well, but we had all these Airtables

00:49:51.460 --> 00:49:56.820
that would store, I think one of them was like a furniture database. So everywhere was a piece of

00:49:56.820 --> 00:50:02.820
furniture and you had all this detail about these objects, maybe some data. And now you were to use

00:50:02.820 --> 00:50:08.180
that in other places or you wanted to feed additional data in that, in that table. So Airtable

00:50:08.180 --> 00:50:14.020
expose an API, but API, it's somewhat simple and minimal, but you know, it works as effective.

00:50:14.020 --> 00:50:21.380
So this was originally called Airtable Python Wrapper and was recently renamed to PI Airtable, but it's just

00:50:21.380 --> 00:50:29.300
a kind of a lightweight Python client around. It just, it adds a lot of the kind of nuances about the API

00:50:29.300 --> 00:50:34.820
itself, some of the data types and just kind of a high level interface. So then you can just kind of

00:50:34.820 --> 00:50:39.540
import it and you don't have to go spend too much time in the documentation, figuring out what all

00:50:39.540 --> 00:50:44.500
the HTTP requests are. And it just wraps them up and handles a lot of the, a lot of the things and add

00:50:44.500 --> 00:50:49.860
some, you know, nice high level abstractions to make it really easy to use. I've been working on this

00:50:49.860 --> 00:50:54.900
project for probably maybe three years now. And it was really interesting because in the beginning it was

00:50:54.900 --> 00:51:00.260
just me and I thought it was useful to have this and I just kind of put it out there. And it was really

00:51:00.260 --> 00:51:06.980
fun to see like people coming into the repo and actually asking questions or opening bug tickets.

00:51:06.980 --> 00:51:13.300
And in some cases, like I've had people just do lots of contributions. Like this one, this one person

00:51:13.300 --> 00:51:18.740
came out of nowhere, would they, and just like rewrote a test suite for it. I had these, the initial

00:51:18.740 --> 00:51:24.420
test suite, I guess I didn't know any better, would actually make calls to the API. And it was hard because

00:51:24.420 --> 00:51:30.100
the state wasn't predictable. Tests were a bit slow. So I guess when I did that, I didn't know you should

00:51:30.100 --> 00:51:35.300
sort of mock your requests and run your tests that way. And they literally came and like rewrote all

00:51:35.300 --> 00:51:41.300
my test suites. And so it was really fun. And it's been kind of one of the longer running open source

00:51:41.300 --> 00:51:46.180
projects that I've had. And over time I've just gotten better at kind of maintaining and added features.

00:51:46.180 --> 00:51:52.980
And then more recently, I just kind of rebranded Aspire table, build new documentation. And it's been

00:51:52.980 --> 00:51:58.820
really fun to see the project grow and it's got a decent user base. So I often see people coming up in

00:51:58.820 --> 00:52:02.980
there and I searched GitHub every once in a while and I see it used in a lot of different places.

00:52:02.980 --> 00:52:04.020
So it's really cool to see.

00:52:04.020 --> 00:52:10.100
Yeah, that's fantastic. So you said it has 200,000 downloads a month and it's listed as the

00:52:10.100 --> 00:52:14.580
official Python air table library, right? And the air table docs.

00:52:14.580 --> 00:52:22.340
Yeah. I assume those 200,000, a lot of them are CI. I don't know how many are actual direct installs,

00:52:22.340 --> 00:52:26.340
but you know, it does get used. Yeah. And then the air table documentation.

00:52:26.340 --> 00:52:29.460
That's not nothing, right? So that's a lot, right? Even if it's a quarter,

00:52:29.460 --> 00:52:29.940
Yeah. Yeah.

00:52:29.940 --> 00:52:31.860
That's still a ton of people using the library.

00:52:31.860 --> 00:52:35.700
Yeah. It's pretty exciting. And then recently, I think it was about a month ago or so,

00:52:35.700 --> 00:52:41.140
they added to the official documentation as the community driven kind of Python client. And

00:52:41.140 --> 00:52:46.020
they didn't have any others listed before that. So I think that's bringing more people.

00:52:46.020 --> 00:52:49.620
Nice. And so you said it also has some ORM capabilities.

00:52:49.620 --> 00:52:54.420
Yeah. So this was really fun. I would always use this library or whatever I needed to work with

00:52:54.420 --> 00:53:00.580
their table, but I would oftentimes want to build classes for the models that I had. I was always,

00:53:00.580 --> 00:53:05.780
I love using Django and these different types of ORMs. I think it's a really fun way of kind of working

00:53:05.780 --> 00:53:12.260
with persistence. And I wanted to do something like that with air table. So I, in this recent release,

00:53:12.260 --> 00:53:18.580
I basically kind of tried to build my little ORM and the idea is that I would define, for example,

00:53:18.580 --> 00:53:24.180
if I had an air table that it was contact, name, first name, email or something, I could essentially,

00:53:24.180 --> 00:53:30.740
you know, define a class called contact and then inherit from this air table base model and then

00:53:30.740 --> 00:53:37.300
define the fields. And then I could just instantiate that class and say, not save. And you would fire the

00:53:37.300 --> 00:53:42.340
request to basically save it. I could update an attribute and then just hit save and you would

00:53:42.340 --> 00:53:47.860
update it or call it delete method. So it was really fun. I don't know how much that's used. It's kind of

00:53:47.860 --> 00:53:53.860
a new feature, but I had tons of fun building it. And I got into descriptors, which I had never used

00:53:53.860 --> 00:53:59.620
before. Yeah. Descriptors are wild. Yeah. They were really crazy. So you had to define, these are the

00:53:59.620 --> 00:54:04.340
attributes this model should have, but when you actually instantiate, they behave very differently.

00:54:04.340 --> 00:54:10.340
You want to get the actual value, but not the kind of the field type. So descriptors were

00:54:10.340 --> 00:54:13.460
the natural answer, everything to it, but it was really fun building it.

00:54:13.460 --> 00:54:18.500
Right. And you've got like text fields and email fields and even checkbox fields, which I don't

00:54:18.500 --> 00:54:24.820
typically recall from the Django ORM or SQL. Yeah. That's an air table, a kind of native type.

00:54:24.820 --> 00:54:30.980
Yeah. Yeah. Cool. Yeah. You even have links from one air table to another. Cool. Yeah. I didn't

00:54:30.980 --> 00:54:36.100
realize it had this ORM aspect to it. This is very neat. Yeah. So when you fetch a record from air table,

00:54:36.100 --> 00:54:41.140
if it's a link, you actually just get the ID. It doesn't actually like transverse the link. So

00:54:41.140 --> 00:54:47.300
if you define it as a, as a link field, it actually takes that ID and fetches the next one. And then

00:54:47.300 --> 00:54:53.060
actually gives you the object instead of the ID. Yeah. Perfect. Like a foreign key type of relationship

00:54:53.060 --> 00:54:57.860
thing. Awesome. All right. Anything else you want to throw out there about higher table before we

00:54:57.860 --> 00:55:01.620
wrap this thing up? No, that's it. Yeah. So if people are out there using air table and they want to

00:55:01.620 --> 00:55:06.260
treat it like an ORM, I just want to talk to it. Yeah. Sounds like you should check this out.

00:55:06.260 --> 00:55:11.860
Yeah. I actually have a blog post I wrote when I, maybe about a year ago, that was called using air

00:55:11.860 --> 00:55:18.180
table as a backend on the medium. And it was an initial version of AC that works instead of having

00:55:18.180 --> 00:55:24.580
a Django backend. I actually tried to build it with just an air table serving it. And it was interesting.

00:55:24.580 --> 00:55:29.300
It's not, you won't have all the guarantees you have from a, from a proper database, but it's a really

00:55:29.300 --> 00:55:34.900
easy way if you just want to put data somewhere and be able to fetch it. And you also get a free kind of

00:55:34.900 --> 00:55:40.100
UI that you can see the data and change it. So yeah, it's kind of like the admin backend of Django,

00:55:40.100 --> 00:55:45.060
but it's like this super rich thing in the form of air table, right? Yeah, exactly. Yeah. Very nice.

00:55:45.060 --> 00:55:51.300
I mean, maybe it's not a full ACID transactional database, but at the same time, if that's where

00:55:51.300 --> 00:55:55.700
people are putting the data, you don't want to put it into Postgres and then try to keep the thing in

00:55:55.700 --> 00:56:00.500
sync or something like that. Doesn't sound fun either. Right. So use the one place that holds the data.

00:56:00.500 --> 00:56:03.780
That's what you're doing. Yeah, exactly. You won't get, I mean, I think if you're doing this,

00:56:03.780 --> 00:56:08.180
you're probably not, you won't be replacing Postgres, but it would maybe be replacing just

00:56:08.180 --> 00:56:13.860
like a local file or something. Yeah. But yeah, you do get, you get some form of like revision.

00:56:13.860 --> 00:56:19.060
It keeps track of every change. And so you get a lot for free. Yeah. Very nice. Yeah. People should

00:56:19.060 --> 00:56:23.860
definitely check that out. All right. Well, we're about out of our time. So let me ask you the final

00:56:23.860 --> 00:56:29.460
two questions here. If you're going to write some Python code, what editor do you use? I think these days

00:56:29.460 --> 00:56:33.860
it's probably always VS Code, right? Or a big percentage of it.

00:56:33.860 --> 00:56:39.540
Yeah. There's definitely a big chunk. Yeah. I had a little, like my first one was notepad

00:56:39.540 --> 00:56:45.780
plus. Then I think I used add a sublime for a while and then add them and then end up in VS Code. And

00:56:45.780 --> 00:56:51.460
these days I just, I love the Python integrations that the team that there has built. So I couldn't

00:56:51.460 --> 00:56:55.060
really see myself moving away from it anytime soon. Yeah. That's cool.

00:56:55.060 --> 00:56:55.860
Very invested in it.

00:56:55.860 --> 00:57:02.100
Oh, there's a lot of action going around on with VS Code in general. And then also in the Python

00:57:02.100 --> 00:57:09.780
aspect of it. Right. I do feel like this sublime to Adam to almost everyone who is on that path.

00:57:09.780 --> 00:57:11.300
VS Code is the destination.

00:57:11.300 --> 00:57:11.700
Yeah.

00:57:11.700 --> 00:57:12.260
I agree.

00:57:12.260 --> 00:57:12.260
Yeah.

00:57:12.260 --> 00:57:14.020
It just kept getting easier.

00:57:14.020 --> 00:57:18.420
Cool. All right. And notable IPI package. I mean, you've already given us

00:57:18.420 --> 00:57:22.340
many different packages and things for people to check out, but something that, you know,

00:57:22.340 --> 00:57:25.300
you ran across like, oh, this is cool. I really got to tell people about this one.

00:57:25.300 --> 00:57:30.500
Yeah. This is not a secret package. I think it's a pretty well-known, but I, I've just

00:57:30.500 --> 00:57:35.300
really come to enjoy using a Pydantic. It's one of those that I think I added on pretty much every

00:57:35.300 --> 00:57:41.220
project I have. I think it's such a blast just to be able to define my classes and set the types.

00:57:41.220 --> 00:57:46.180
I really enjoyed the way the project came together and it's sort of one of the standard ones that I

00:57:46.180 --> 00:57:47.140
added everywhere now.

00:57:47.140 --> 00:57:52.900
Yeah. If you have to parse data into your model or turn your model into something like JSON,

00:57:52.900 --> 00:57:56.580
it really helps a lot, especially if you have a hierarchical model, right? I've got this thing

00:57:56.580 --> 00:58:01.860
that contains a list of other Pydantic models, and then you've got to do type conversions to date

00:58:01.860 --> 00:58:04.580
times or to numbers or stuff like that. Yeah. It's fantastic.

00:58:04.580 --> 00:58:10.660
Yeah. And even on projects, you're collaborating with other people, you have a sort of my PY first

00:58:10.660 --> 00:58:15.380
kind of approach, right? Where from the very beginning, your objects are kind of typed and

00:58:15.380 --> 00:58:19.860
that just makes it a lot easier to collaborate with other people that will jump into your project. And

00:58:19.860 --> 00:58:22.900
it's very clear what that object is and all the types. Yeah.

00:58:22.900 --> 00:58:25.540
So that kind of helps make sure that you stick with it.

00:58:25.540 --> 00:58:29.940
Absolutely. Good recommendation. I suspect people probably have heard of it as well, but it's

00:58:29.940 --> 00:58:34.260
definitely a good one. Yeah. I've had Samuel on the show to talk about it. All right. Final call to

00:58:34.260 --> 00:58:40.500
action. People, especially those out in architecture, engineering, construction, are excited about Python

00:58:40.500 --> 00:58:41.940
and some of the tools. What do you tell them?

00:58:41.940 --> 00:58:46.660
I think it's a, it's an exciting time for the construction industry. It's kind of really good

00:58:46.660 --> 00:58:52.100
place to innovate. There's a lot of exciting technology products and companies being built.

00:58:52.100 --> 00:58:57.300
So I think there's a lot of opportunities to do something in kind of a different space. And I think

00:58:57.300 --> 00:59:02.260
they can really benefit from experience people that have been, you know, doing more traditional

00:59:02.260 --> 00:59:07.380
software development to help them scale and build things. So yeah, it's interesting to see how

00:59:07.940 --> 00:59:12.580
that those kinds of streams cross and to see architects go to build software and also seeing

00:59:12.580 --> 00:59:18.100
engineers come to help make the architecture and construction industry better. Yeah. Fantastic.

00:59:18.100 --> 00:59:24.180
All right. Well, thank you so much for being here. It's been great to have you on the show. And I'd love

00:59:24.180 --> 00:59:29.620
to get these views into the different areas and communities where Python is making a difference.

00:59:29.620 --> 00:59:32.260
So thanks for sharing it in the architecture space.

00:59:32.260 --> 00:59:33.140
Nice. My pleasure.

00:59:33.140 --> 00:59:34.740
Yeah, you bet. See you later.

00:59:34.740 --> 00:59:35.300
Thanks, man.

00:59:35.300 --> 00:59:42.020
This has been another episode of Talk Python To Me. Thank you to our sponsors. Be sure to check

00:59:42.020 --> 00:59:47.140
out what they're offering. It really helps support the show. Choose Shortcut, formerly Clubhouse.io,

00:59:47.140 --> 00:59:51.940
for tracking all of your projects work because you shouldn't have to project manage your project

00:59:51.940 --> 00:59:58.020
management. Visit talkpython.fm/shortcut. Simplify your infrastructure and cut your cloud bills in

00:59:58.020 --> 01:00:03.220
half with Linode's Linux virtual machines. Develop, deploy, and scale your modern applications faster and

01:00:03.220 --> 01:00:08.580
easier. Visit talkpython.fm/linode and click the Create Free Account button to get started.

01:00:08.580 --> 01:00:14.900
Do you need a great automatic speech-to-text API? Get human-level accuracy in just a few lines of code.

01:00:14.900 --> 01:00:17.940
Visit talkpython.fm/assemblyai.

01:00:17.940 --> 01:00:24.660
Want to level up your Python? We have one of the largest catalogs of Python video courses over at Talk Python. Our content ranges from

01:00:24.660 --> 01:00:32.660
true beginners to deeply advanced topics like memory and async. And best of all, there's not a subscription in sight. Check it out for yourself at training.talkpython.fm.

01:00:32.660 --> 01:00:49.300
Be sure to subscribe to the show, open your favorite podcast app, and search for Python. We should be right at the top. You can also find the iTunes feed at /itunes, the Google Play feed at /play, and the direct RSS feed at /rss on talkpython.fm.

01:00:49.300 --> 01:01:01.300
We're live streaming most of our recordings these days. If you want to be part of the show and have your comments featured on the air, be sure to subscribe to our YouTube channel at talkpython.fm/youtube.

01:01:01.300 --> 01:01:07.300
This is your host, Michael Kennedy. Thanks so much for listening. I really appreciate it. Now get out there and write some Python code.

01:01:07.300 --> 01:01:27.300
I'll see you next time. I'll see you next time.

01:01:27.300 --> 01:01:57.280
Thank you.

