 All right, good afternoon. Happy Friday. Let's see This one let's tweak this Where did the chats go? How's it going? Good afternoon. Good day GdjSky01 Jeff, how's it going my friend and bear as well over on discord nice to see you folks Let me just shuffle a few of these to where I can see them Let's go at Michael pocusa as well. Nice to see you my friend. Hi from Los Angeles. Nice Los Angeles probably uh, I don't know what the weather is like there, but I'm guessing a little bit warmer Where I am at currently It's about 30 degrees and snowing but not like heavily snowing thankfully, which is nice. How's it going Justin? Um, let's do quick introduction. So hello. Good day to everyone. Thanks for tuning in. I have got a cat attacking my foot Um, welcome to the deep dive my name on top of me here All right as I try to appease the cat while I do the intro Uh, my name is uh, tim. I go by foamy guy on github and discord. This is the deep dive, which is a weekly live stream Uh, sometimes it is with me other times it is with scott scott's the lead developer of circuit python Um, which is a good chance to take a quick step back for anybody that might be new catching this for the first time If you don't know, uh, what i'm talking about circuit python You can learn more for the uh at the main website for the project right here circuit python.org This is basically a version of python that runs on tiny computers called microcontrollers These devices typically will plug into your Real computer, you know, your big computer your regular desktop or laptop computer with a usb cable They show up like a thumb drive you edit a python code file on that thumb drive And then when you save it the microcontroller the actual computer that is inside these little chips on the On the devices here will execute your python code for you It can interface with all sorts of extra hardware peripherals as long as you connect them And what you'll find is that of the 468 devices that currently support circuit python There are loads and loads and loads of different shapes and sizes and capabilities With different pieces of built-in hardware some have Just bare bones with pins others have screens and wi-fi and touch screens Others are like entire gaming handheld. So there's all sorts of different form factors of these things The common thread amongst these 468 of them is that they can all run circuit python Circuit python is an open source project But it's primarily funded by Adafruit if you would like to help support circuit python And those of us that work on it you can do so by purchasing hardware from Adafruit They are a hardware and software company based out of new york They design and manufacture not only the microcontrollers themselves But they also design and manufacture different add-ons and things for your microcontrollers So stuff that you can plug in in order to achieve other stuff, you know sensors beacons buttons beepers buzzers levers switches Any kind of little light up widget or doodad that you could imagine really that you can connect to an electronic circuit You can probably find that thing whatever it is over at Adafruit. So head over there get yourself some toys thank you to everybody who Shops at Adafruit and thank you of course to Adafruit for making circuit python possible and for paying The team who works on circuit python including scott and myself and some other folks so Today we are going to take a look at the an upcoming kind of like proposal for a way to refactor The way that the network management works. Let me catch up on the chat as well Uh, that seems unusual deep dive Adafruit. Oh, no, what did I do? Did I mess up the uh? I messed up the youtube thing Timely project. I've been working on this sunny. I hope scott's Yeah scott's I believe out of town for the uh for the week, but definitely uh scott's You know in our all of our thoughts and everything for sure Uh, let me check. I feel like I have messed up the youtube thing. Let me go try to figure out what I did How did you find that? Can you link me to that or something? I only see one. Oh, no, I do see the second one actually deep dive Okay, I've never done this live. So I don't know what's about to happen if we lose folks I'm sorry try refreshing if you're on youtube, especially you might get lost Uh, there's potentially two youtube links. So if uh, if what I Am about to do cuts you off. Maybe try looking for the other link if we have somebody In the chat on discord in just a moment who's watching youtube and it keeps working Drop the link to the one you're using and then other folks can maybe Switch over to that one because I don't think I'm really meant to be on two Uh, I'm not sure We're sure if that's gonna fix it, but I'm gonna click this right here That's gonna do a thing potentially And uh, hopefully we're gonna not be on two anymore, but I don't actually know Okay, there's only one listed here now, which is nice Best test. Yeah, jeff. Thanks for uh, I do see your messages here in the youtube chat I don't know if that was a test for me. Uh, they aren't showing up on the screen though. Are they? Oh, yeah, they are, but it's scrolled down too far All right one problem at a time Okay I think we're down to one I think we're down to one. So uh for anybody Yeah, if you were on youtube, uh, and you got kicked off, then you might not be able to hear me right now Hopefully you will have heard the last bit there to click over to the other link The link that is live now if you're on youtube and you can still hear me and see me Then you should be good to go. That's the link we're gonna do Uh, I'll probably try to figure out how to get rid of the vod on the other one if there was youtube Just watched refreshing Try the other link here. Uh, let me get the other link Where's the primary feed? It should be here wherever you're chatting Should be the primary feed Because that's the one where I can see the chat Okay, yeah I messed it up when I started it today turns out Thanks for the heads up on that. I didn't catch you Through that in first, but yeah, that's totally right There should not have been two and I appreciate the heads up there to get that fixed. Okay Okay So, uh jumping into today's topic the connection manager So Justin who's in the chat a huge hug report goes out to to Justin who has done a bunch of work on this For folks that don't know about the weekly meetings. We do weekly meetings on Monday Justin popped up a couple of weeks ago with some ideas about simplifying the way that the network connections work within circuit python Like how it gets managed the sockets because there's a limited number of sockets that are available We'll get into a bit more of the particulars as we dive into the code, but Justin popped in had some ideas for this Came into a meeting a couple of weeks back talked about it in the weeds We got some good good discussion going on and there are now uh new Uh proposed library connection manager library and then there are a couple of prs Draft prs that are open inside of requests right here is one And many mqtt is the other one So we're just going to take a look at that and try it out I haven't had a chance to look at any of this stuff yet I was there for the discussion. I kind of am aware of what it does, but I have not looked at any of the code I have not tried anything yet. So this is kind of my first look first take on that stuff I meant to grab a usb cable before I started. I totally failed to do so. Let me do that right now brb Uh, let me unplug this that one. I'll get the camera going here as well Nothing like seeing a typo for a question. No worries about that. I'm uh, I am notoriously bad with Billing and grammar and everything like that. So I'm the last person who will ever judge typos or anything Uh, I have let's get the camera going here I have a couple of things we can test that on if I understand everything correctly Which is possible that I don't at this point, but if I do my understanding is this makes it to where We can use this in two ways. We can use this either on the esp 32 spy or Through the native networking and then a potentially ultimately through the ethernet featherwing Which is like whiznet 5k. They call that one. I think Um, I don't know if that one is there just yet or if that's a separate pr in that library or whatever Right now what I have though is not that I have an esp 32 s3 Uh, technically I have a qt pi if anyone's interested in the exact hardware qt pi s3 Which does not come up with s3 qt pi s3 There I don't know if it has ps ram or not, but it probably does. I don't know but qt pi s3 I also have a pi portal here, which we will be able to do the esp 32 spy stuff. So for folks that don't know the pi portals Uh use esp 32 spy or it's sometimes called air lift, which means the main processor the main circuit python device Talks back and forth over spy with a secondary device and esp 32 It talks back and forth over spy and that esp 32 is responsible for the network and it just communicates back and forth with the main cpu whereas on For instance that qt pi esp 32 s3 the main chip on this device actually has the wi-fi capability So it's not handing off between a co-processor and doing all that Just the main chip is doing it. So there's kind of the the hardware difference and then What the software will do is make it so that no matter which one of those two worlds you're writing code for It can equalize the api so that it will hopefully be As the same as it can be and then therefore You know folks can kind of write their Network related code In one way and it can work in more than one context if they switch projects around to a different device How's it going as well? Uh, you know, I never did fix the scroll on the youtube chat. Let me uh That's so that we can actually see the latest one. How's it going? Beata as well as jeff nice to see you folks over on youtube as well as as bjorn If you're still here, uh, thanks for tuning in my friend. Hopefully you got the link Sorry for the troubles on youtube again. That was all me. I totally just bungled it when I started up the stream today Uh, interesting. Does this live allow having more than one open connections? I don't think it will allow any more connections than are possible today This is mostly about the api for managing the sockets Correct me if i'm wrong justin or if anybody else Happens to know the answer to that my understanding though is that we have a set number of sockets and that limits How many open connections there can be this does not change that set number of sockets what it does is give you a manager object a layer a library that will Um keep track of those sockets for you so that you don't have to micromanage it in your user code And so that like the libraries like requests and all the others would not have to try to micromanage it there either Um, that is my understanding tried looking up recent changes to soft keyboard Uh, can I find the json file? I believe we'll accompany it uh Yeah, dj devon. How's it going? I think I may I don't know if I push the latest one. I will um I will make sure to get it pushed either tonight or tomorrow Uh, if it's not, yeah, I think I'm not sure the last time I pushed on that one Qtpi sp3 is an awesome board totally agrees super super tiny and powerful I just busted it out recently of the package Uh, but it's super cool So it'll be a step towards having multiple connections open based on the number uh max number of sockets the number of sockets is limited by lower level Dev's talking about raising the number of sockets. Oh, that'd be cool. Yeah, that's uh, all that kind of stuff is is Ancillary to this although, uh, the more sockets we have, you know, the ability to manage them is certainly gonna be um Well appreciated So I'm just gonna clone this and then we can get it on our device and we'll just throw the requests one I am more Uh, I am more. I'm glad there's not anything ridiculous in this Should have double checked so that I didn't have like settings or anything like that open luckily We uh, we didn't have any passwords or anything. So that's good. Um All right, we clone that I'll open it. Let's open it also And then we'll grab the requests. I should I already have requests cloned, but I what I can do is um All right, what is it called connection manager? We need the c's. Okay Check out the pr over there on requests new window Let's get requests while we're here. So we'll just go it's probably it's probably in re oh in fact It's gonna say it's probably in recents, but I don't want to look for it, but Pretty easy Let's update Well, we're on uh, we're not on main fixed duplicate header issue Oh, Justin also by the way, I don't I want to look in the connection manager For folks that don't know Justin in the chat is the one who worked on this I want to look in a connection manager first here. I know you got to head out a little bit Um, so I'm gonna dive right in the connection manager first what I will do though is Circle back later and hit this request this other pr As well since I figure that's not as important for you to be around necessarily because I'm not anticipating too much coming out of that In the way of feedback Um But that's how my radar as well that pr for requests the the header thing duplicated headers Um, let's pull this. Let's just get updated here ghpr list it. Let me see ghpr check out 147 That's the one we want to look at 149 is the other one there Thanks for clarifying higher number of socks to be useful in htp server. Yeah, totally agree Especially when you want to go with web sockets or that server side server side events. Yeah, I think so Thought about trying to run htp server on one of these but unless Uh, but unless the use case was a lot of short live requests You're going to be quickly limited by the hardware and software limit It's good and good grief if one more client hangs on the connection for any length now You're one out of four socks down. Yeah, that's true. You know one thing I think would be interesting though is evaluating like You know 10 esp 32 s twos behind engine x like is that at all efficient as far as web servers go You could put a vm and an actual server there Um At some point though, I think if you have enough of them you might be able to actually outperform A big server uh in terms of like power savings and stuff, which would be interesting. I'm fascinated to experiment with uh microcontrollers behind a A load balancer like engine x Um, and and then you kind of get around the number of sockets by just throwing more hardware at it, right? Each one only has a few sockets, but if you have 10 microcontrollers then Doesn't matter as much Uh, it might be a totally harebrained idea too. I don't I haven't actually tried it or run any kind of tests Or anything so it may work out to be completely useless and good for nothing more than a gag But I think it's interesting. Nothing else. I intend to give it a try one of these days and Some basic measurements Thanks to no rush dealing with some personal issues. Nice to watch code again. Give me sense of normalcy. Nice Yeah, I'm happy to happy to provide that hope everything works out as best as it can For you and whatever's going on Web socket response keeps the socket open currently only one Yeah Consider using as proxy type setup with the payload or redirects you to larger with more resources You worried about channel overlap interface. You can only But so many before you get saturated band You know overlap you mean on like the wi-fi I guess probably you still need an arpi or something like that Yeah, yeah, you'd still have raspberry pi or or some kind of you'd still have some, you know Linux computer of some variety with engine x in front and then it would Balance the traffic between the microcontrollers for you Okay, are there any so does it actually change the examples or anything? Let's go to here Actually changed with this. Okay. Yeah. Yeah. So for one thing we want to get requests From this we will paste over what I had And then we want to get the examples which are Changed or no Doesn't look like it actually or at least not in the pr all this stuff is draft too So in no way am I expecting this to be like totally final version dunzo ready to go or anything like that? So we're taking a first look here not Anything like pretty okay. So we will grab just simple tests and start there Which is uh, this one. Nope this one Or actually the test is in the connection manager Yeah, oh nope that one's empty. Okay, I think it's on the pr though One of them has one thing we should do also is check this out wanted to make sure let me uh, let me scroll up here Yep, our pie. Yep running engine x with each node being marked as a higher weight limit of two connections. That's on my list I have local code to fix. No, I didn't change the examples yet. Okay. No worries Uh, a lower swarm driven by engine x proxy node. I want to make sure the core was approved first. Yeah, no worries not a problem Uh, if and when you're ready to merge it to Action manager be happy to update htp server to use that as well. Nice Yeah, thank you, Michael. Uh, I thought you were talking about making a cluster server with usb 32 s 3s That'd be neat, but it wouldn't outperform. No, no. Yeah, that is what we're talking about. Uh, yeah, that's exactly what we're talking about So then you'd have, you know x number of hp 32 s 2s or s 3s either one And then you'd have one raspberry pi or any linux computer really that linux computer would have engine x Uh, engine x would distribute that traffic. It would balance the traffic between all the microcontroller So a request comes in it hits the it hits the linux computer It hits engine x and then engine x forwards it over to a microcontroller um And then the microcontroller responds and the the response gets sent back to the final user or the beginning user Just read in the aid for daily the microcontroller just added tls. Oh, that's cool. You'll support for client server. Yeah, that's super sweet I didn't know that Here we go. That's what we want Oh, yeah, yeah, I was testing that header thing. Let me keep that That header thing was actually kind of hard to test Turns out htp servers all the ones I tried are um Very good about parsing the headers into a dictionary which means that duplicated headers don't bother them But I guess there must be some out there because of a spotifier or something somebody found the api that was not working with it Okay, so what we have here is code that can do either esp32 spy or um What I call just native native networking native wi-fi But let's just take a quick scan through it's going to connect to the network based on what we have in our settings dot toml If it is esp32 it's going to go that way If it's native we're going to go that way and then So where does the actual? connection manager, how does this come in? so Okay, there we go ssl context Connection manager create fake ssl context Okay, so you so in the native api you would call create default context here and then this is now analogous Connection manager says create fake ssl connection So then in that case actually the native wi-fi one does not use The connection manager object. Is that true? Let's What's in this code too? Oh Oh, I need the pr one right now. We have no uh, we have no code Uh, yeah, that won't work. Let's go pr. It's the first one. I think right jpr list Check out one. I should have done that first. There we go Here we go I don't have any code. Let's see. Yeah, there we go Sexual code now. We definitely want that on the device Should have looked at it before I pasted it Some of these updated subs. Let's see here Okay, ls non-performant middle layers Non-performant middle layers were crashing burn the bad with bad headers I'm sensing some boards board stubs bias Uh, I hope the project is yours going well. Otherwise connection manager is behind the scenes. Yeah, the stubs thing is super sweet as well I think I forgot to hug report that I need to hug report you this week I've got another hug report coming from my way for that boards thing I'm gonna take a little another closer look into that as well I like to circle back to that during a meeting at some point too to get Uh folks thoughts on what we think is gonna be the best way to get that into the stubs like If we want to build one like top level board.pi stubs that contains everything or if we Like I think the thing you had makes it per board. It can kind of parse the pin C In its per board, which is cool If you know you're using a certain board and you're kind of like a power user and you want to build stubs for your own board Um for kind of generally so I'm thinking maybe one Giant board stub that contains every possibility. It will look Weird because it will show pins that may not exist in your context depending on what your board is but What it will mean is that every possible pin Will be listed so no matter what board you have Your autocomplete will actually work with your pins now Unfortunately the autocomplete for some pins that aren't real will also work so it could be double-edged stored in that way but Okay Nice So we're good to go there. That's our native networking. And then if I'm understanding. Okay, so yeah, I was gonna look in the code too I'm full circle if I'm understanding right the native one does not really use the manager so much. Is that true? Basically the manager takes the place of The built-in api of uh To ssl basically that's what it seems like because that's doing Create the fake context, but then that's doing create the default context Okay, oh it does otherwise get a connection manager behind the scenes it does. Okay Let me see connection. Oh context is this uh, obviously. Okay So that So that will create the context. Oh, but then but that's still not quite the manager. Is it okay? A session pool session context Look at requests. Oh, I got you. I'm sitting here trying to be like how could that be? But yeah, I guess the magic would be inside of requests I see Okay, so inside of here requests creates that connection manager and corrects Connection manager as a singleton When you initialize and then from then on it's going to use that whenever it wants to get Sockets Gotcha, okay Nice Okay, cool. Let's put it through a little bit more of the paces. So we did hit quotes and we got a response. So the basic Uh, basic test is good to go there. Let's do a post Which we could get from request simple test so then Do the examples the examples don't so the examples I guess they only need to change if we want To rewrite them with the the either or logic Do I understand it correctly like this code? HTTPS circuit python This code will actually still work with the new version without anything in here changing And it will be using the connection manager because request is using it under the hood Now if you did want to rewrite this to where It does either or like your codepie here. Whoops. This isn't it but this one here It could be rewritten to where it's got the either or logic so it can do both But it's also, I mean, I think this one we would keep Targeted at one because it's kind of like it's not targeted at a specific device But it's targeted at the devices with built-in So in this for these simple tests, I would try to keep them as small as they can be If it were me. Yes. Okay So then on the 32 spy side those ones will change because those will use the connection manager directly So like that would be this one These would change because they would need connection manager in place of the fake See in place of this one's actually doing the context Place of something in here. I don't know what off the top of my head. Maybe well socket probably in some capacity, okay Okay, that's pretty cool. I do like that that stuff doesn't change. Let's get a post for for um Built-in networking, I mean so we can post this stuff, right? Um, we can basically just redo this whole thing, right? Grab all of this and Put it here So that should do basically simple test is it hits a couple of things it posts Do one of them Fetches after it posts to make sure it worked All right, nice. Okay, so we got tests from white from ater fruit is good a fruit server We got our response from there We posted Um, oh no, actually, this is a get actually this is a get this one's a post we posted 31 f We received 31 f so we did a get afterwards that worked. We actually have uh two posts in here I didn't know that okay, so we post a second time this one with json And then we fetch again and we got json back. Yeah, that's looking all good Uh, let me try on the iPortal side. So that was qt pie ESP 32 s3 We'll grab this same code And we will load up what I have now, which is a pie portal. I never did turn on the camera Did I I said about turning on the camera? I'm a little bit um a bit uh Like a dog in a squirrel kind of sometimes aren't I Oh sneak peek Super secret project Nobody saw that We're good to set the right pins. All right. Yeah, thank you Uh pins will change default ones for the pie portal Which we'll grab from the other simple test I don't know if it matters, but we could probably go board dot spy here. I think we're good there Uh does settings tom not exactly. All right, hold on Just scoot this over to here. We got to make sure we're not showing it Yeah, okay Whoops. Okay. Now we have a settings tom all So that this will work Extra manager we need to install. Also, I need to get requests Like this pr requests Yeah Settings not toml. Yeah I thought I uh I must have wanted to deactivate it for some reason. I don't recall off the top of my head what it was for But I do that a lot where it's like if I'm trying to delete a file, but I want to keep it I'll go I'll just tack not into the name there Stop my headache. I can't really think of why I would have wanted to delete that, but I don't know We want to paste requests Just delete this Doing web workflow stuff. No because this doesn't have web workflow Maybe I was trying to test like what exception gets thrown or something All right, we also need connection manager Directed here now it should at least get past the imports Got it. Okay. It took a little while. I don't know if that's It's after connecting. Is it any longer? I have to tell you what let's do this So let's say copy paste this As con manager test Let's grab simple test I wonder if I did did I not change all the pins Or maybe this maybe I shouldn't have done this Back to if you cannot connect Here's what we're gonna do we grab simple test and drop that in code But we're gonna actually only do the get So we're just gonna kind of do like a rough eyeball test of Is this any faster or slower? Uh, but that part doesn't work obviously right Has no more so it's not good We'd have to go back to regular we'd have to go back to normal requests Here's what we're gonna do. We are gonna go Open this in files. We are gonna rename requests Do you guessed it not requests? No, we'll do pr requests actually There's requests. I'm not pasted in lib Pasted in the root, maybe Oh, is requests frozen? Hold on Pinch here paste there. Yeah, I'm a very very very big Very big paste copy paste here from other stuff for sure Do you haven't changed the settings? Let's see a board with wi-fi will auto connect to the last AP correct. Yeah Reset your discord chat view Oh, wow Thank you for the heads up Okay, we need to know if this is frozen in because if this is frozen in then we actually do need to be using the root and not lib Which is where I pasted it but not on purpose But if it is frozen in then we do need to do it there on purpose I don't remember where which file this is in though It is frozen. Okay I accidentally did the right thing I'm gonna take requests. We're gonna paste that in the root We're gonna call it a fruit request pr That's the pr version so for so so for folks that don't know what I just checked on right here is Check in which libraries are frozen into the device and right here it lists requests as a frozen in library Now what that means is that on this device this pi portal titano that I'm using It means requests is built into the image. You don't actually have to copy paste it into lib And you'll still be able to use it But in our case we're trying to test a modified version, right? We're trying to test the one from the pr which means we need to You know tell it somehow not to use the frozen in one the way that we tell it not to use the frozen in one is by pasting it in the root of circuit pi instead of in lib, which is where it would normally go So if you're ever trying to test a library and uh, it's not using your modified version Double check if it's frozen in and then if it is frozen in what you want to do is Paste your modified one in the root instead of lib In order to get the stock one actually we'll just have the stock one because it's frozen in because of exactly what I'm just talking about right now So we'll just leave that So what I'll do is now so this should now be stock, right? It is and the speed is about the same I forgot to leave in the print. I think we want text Good property or a um It does seem like same speed Which is a lot slower than the built-in wi-fi, but it is to be expected because of the architecture of like Needs the code processor needs to talk back and forth There it is. Okay. Okay. So now that we have it this way What we can do is like we're able to switch our code by choosing to put that pr or not, right? So I can say Code connection manager test I could say requests here with pr like that And then if I wanted to execute this I could go import code con Manager test This will now run this one which is importing request pr But I did mess it up because line 47 would also need to well actually what we need to do is import this as This that way the rest of the code doesn't need to change didn't know that dotrouter Files would only override lib really good to know for library. Yeah. Yeah, if you are Any doing any kind of library work Uh with frozen devices. I could definitely bite you No module I don't know why that printed that it totally succeeded. Oh dot pi. I put like a literal dot pi Why did that execute though? Hold on. Why did that execute? That shouldn't work should it dot pi. Oh dot pi So it looked for a sub module. It tried to treat it like a library A package or whatever So it ran the root level Weird, okay Let's do it correctly. Whoops. Hey, why that is the second Accidentally did something that worked thing that we have done so far. There we go. Okay So both knew and old work on the titano and they both take about the same amount of time So the it's slower than the Built-in Wi-Fi, but it's the same speed as it was before In terms of like this Using the connection manager doesn't seem to have any effect on the speed Um, and it does seem to work successfully. We will Do the let's do the more full Test here with the rest of simple test It's because this includes posts and everything. So here's what I'm going to do is take this back and put it to code I was trying to run. Yep Trying to import like if there would be a pi sub module and then because it's Because the parent module existed and had code in the root It's still executed which made it do kind of what I wanted But then immediately failed to not to find the sub module which it thought I was looking for No, I wasn't okay. So that succeeded on all of these. We got our text from eta fruit server. We got our Uh basic get request response. We got a successful post a successful get of our data Another successful post of json and then finally a successful get of our json data all Successful and honestly they go pretty fast. So really the thing that's slow is the connection Because once we got the first like the whole rest of these go instantly, right like there's really That's not quite instant. I guess never mind. Okay. It's pretty fast though Like the connection definitely takes longer than any request and we could theoretically, um Could we cut out the connection code? Let me see as actually it is connected Okay. No, we probably can't make that any faster. I'm looking the let's take a look at the code real quick Okay, so we got Basic logging action If you don't have not uh, if you don't have logger it provides this that way The rest of the code can kind of pretend that you do have logger What is this kind of thing interesting? What is the else on this? Is there an else? Oh, there's no else But there is a bunch of other stuff Interesting if implementation name circuit python, but I assume this stops it from running on C python common socket protocol. Yeah, these are all type definitions. Basically. Okay common socket circuit python type Connect supports receive as a receive function supports receive into has a receive into python socket Extends all of those standard socket has connect like a union Socket type gets both standard and circuit python module type module type interface Or fake SSL sound Sockets so this I believe maybe moved over to here from ESP 32 spy or maybe from requests. I'm not sure this exists somewhere else I think before at the fake SSL context Action manager Key closed socket. So this basically keeps track of everything for you Types are all from original code and request. Okay. Nice So what did you get my board? Go with link status swiz net Got ethernet featherwing coming sounds like or ethernet something. I think there's a breakout one. Maybe I'll have to bust that one out I haven't messed with that one a little bit Be the socket get socket Basically give it a bunch of information then it will Go and find which socket's available and give it back to you. It's like the meat of it right there. Yeah Okay Yeah, I mean I'm digging it both of those work. Let's test out a mini mqtt that one was here as well like, um I don't know. I don't tend to have super strong opinions on code necessarily some of the other folks on the team are a little more in-depth on Preferences on code and stuff like that. I don't consider myself really that great at Like writing or reviewing Good code necessarily Um, but I'm always happy to test. I'm always happy to look over even if it's not like a Thing where a lot of that stuff jumps out to me. So what we want is actually I'm just gonna open mini mqtt because I have It's already I can just be hpr check out um But I'm digging I'm definitely digging what I'm seeing I am uh, I'm all for I'm all for this personally And it seems to be working well, so good job on the stuff you've done so far. Thanks again for um Being interested in doing this taking it on it's awesome. Let me pull this hpr list extra manager hpr check out 197 Okay, so that one is a mod a package a folder. We take that whole thing. We'll grab it And mini mqtt was not frozen Yeah, okay, so we don't need to do our whole root thing again. That's not a problem this time But we do need to take that customize mini mqtt from the pr. We want to drop that right in the lib Delete the old one because that's probably So let's paste that Eventually anything that uses sockets including wiznet will have all the same connection method could completely unify learn guides In internet simple test. Yeah Although I mean some of the learn guides are specific to the boards in which case I don't think that it needs to be unified like in the learn guide for the You know feather s2 esp 32 feather s2 for instance In that learn guide it doesn't need the esp 32 spy like either or code. I don't think because it's targeted at the one device um Now if you're making like a project learn guide And you want to offer both that i'm totally in for But the the more specific device I guess they call them product guides maybe or just the device guides like the main learn guide for each device or whatever Um Any mqtt will the Let's look at what changed actually will the mini mqtt do I need to get different examples? We may need to modify the examples These are requirements. I don't know you can do that. Can you do that? I've never seen that before inside requirements. Looks like it's uh instead of using pi pi. It's using a github repo on the test I really know what tox is. I seen tox before show up, but I don't really know what it is Gonna make nine x easier to use for the beginner copy paste examples I already copied this Start with this one see if it See python oh and see python folder That's csp Bye the titan right now. We could might as well do that. I guess I'm gonna take all that drop it in con manager test And code pi will be See if that crashes Fox is a tool to run your tests across many versions of python Okay It is installation of different target versions and then injects your code into those environments Interesting. So it's like pi test runner, but it can also kind of like Automatically do different virtual In different environments with different versions many mqtt you can set up the same way you do requests because you have both pool and contacts Okay, okay, so I think that's probably because I don't have If you're dio stuff in my settings one a moment, please Okay, let's try that again I test runner with the joy of multiple distinct python versions. Did I change the font size? Did I make my discord font smaller just now? Has it always been that size? Hopefully small to me. Okay, so no set socket. So that's the part where we will need to change um Set socket so that is going to be The way we did it with requests didn't actually do it copy. Let's see. So that says Quests gets the pool in the ssl context Any mqtt I don't use very much. So socket set interface esp That's socket socket esp So we need to figure out what set socket turned into Sorry, this is probably super easy. I'm just I'll use this one very much Set sockets gone. Yeah, that's right there One manager, so we need to pass. Okay, so we need to pass con manager to the constructor here as Don't pass anything. It does get con manager. So we just don't do set socket. In fact, and it should take care of it Let's do chin. Let's take a look back here. Yeah, I think Because that's actually that's not an argument for a second the the fold here tricked me And I thought that was an argument, but that's not actually the case Yeah, add our info 292, but that's inside of I know I've definitely bungled this all up And you can start a sample for a board with wi-fi then use the helpers for esp 32 spy Everything after the wi-fi connect And then this will be on manager We still do this one Need to right otherwise we don't have Okay, we have to do this because we need to pass this to here This doesn't like this I'll see True it feels weird you would use pool to make this but then you turn around and still pass both to here I don't Know if I'm doing this right Module SSL. So that's just the import that these will not work either. I think We should get rid of this stuff actually anyway I don't think it's gonna work still. I don't know. I don't really know how to convert this code very well That's one can't import either, but if we don't import that one then we can't do This and if we can't do this then we can't have pool This is the part we need We still don't have pool From spy I'm changing the wrong file I think we're almost there finally pool got imported greater context These are gone I guess let me put those back Okay No worries, I mean like I said before it's in draft. I'm definitely not expecting it to be pretty burrowed away done Uh That's because of board.spy, right? Well, I already have board.spy though How would that be in use? Is that happening twice? It's happening twice obviously. I copy pasted both I think I took the long way around here as well but it's not to find P2 Should be board spy Will this be on the test? I hope not. I feel like I'm failing the test if it's on the test, but We'll get there Another thing is I don't even know if I have these feeds it did connect though It's not crashing. I don't know if I have these feeds anymore. Let's see On off. I think does it do photocell? Do it does. Okay, so It's supposed to be sending photocell but I also think that Version do we have? I think we are having the wrong version of esp32 spy Buddy, please stop Hey, hey, hey stop I think it timed out before I did that This I don't think this is connection manager. We'll see if we keep trying that I think this is the wrong version of esp32 spy I did it too early And this is frozen I'm on 829. Is that the newest one right now still? I don't know when frozen libraries got updated Or if they did on the 8 branch 829, that's the newest one I don't know how can you can you check the version? The library? That a thing? We are gonna go circuit install This He's gonna put it in lib. We're gonna copy it from there. Yeah, okay. He was trying to mess with the Blinds on the window Something on the window Yeah, just this This and drop it in the roots If I need to I'll get the python version and I'll put a print statement in here so that we know for a fact A thousand percent. That's the one we're using We'll use the python version anyway, then I guess I was I was at 70. I wish I was still a smart. The system has been so simply done Yeah I'm sure you're plenty smart my friend I've a lot of experience with this type of thing and Even as you stall still I had to kind of fumble my way through it. So it's part of how it goes. I think See, we want to go copy that again. This time the python version The mpy version On mobile but started an mqtt example on the pr. Nice should be enough to get started. Nice appreciate that I'll take a look at that here in just a minute At this point, I think this what I'm The thread I'm digging on here. I think will affect either Even if I go get different code Will affect this too I think we got to get to the newest Need a fruit 32 spot Now we have the problem that Oh, it's still what? Oh, was it skipping it because it was already installed. Wasn't it? I didn't actually read the output Yeah, I guess it pays Pays to read the output the terminal program after you execute it. I guess PTT example. Uh, yep. Thank you my friend Check that one out See we'll need this though But and and this will be good too because afterwards We are still having this weird delay We'll be able to see if I messed it up somehow and added this this delay, but I really think this is a Thing with the inside of here using the old version Combined with the new version of mini mqtt. I actually did some work on this stuff a while ago And so I recognize the symptom of loop blocking until it receives That is something that came from this back when I was working on it. Yeah, there we go. See this time it didn't block So we are loop right here this finished then we printed this and then we do have a time dot sleep five seconds right there So we have five seconds in between each of these But we are posting to photocell Every five seconds a new number and then on off We're receiving so if we add data here Or on off then we'll receive it the next time it calls loop right there So that blocking behavior was a result of having old esp32 spy Okay, now we're up to date though with uh, correct esp32 spy or it's not correct. It's old. It's just the current one But what we can do is take the new pr. Thank you Justin the new uh, not new pr, but the new example that's on the pr right here I'll save my rickety one off here just in case we want to circle back to it, but Probably not I appreciate you whipping that up. That's awesome There's that we got pins we'll swap over We actually I think we have to use board.spy here. I changed this last time thinking it should work either way In my case, I think I actually have to let's try it. I think I have to do board spy because of the built-in display The built-in display will have already initialized the spy bus and uh, I think this will fail because the pins are in use But that would be only applying to Device with a built-in display Go import there and then Uh, this one just connects and then does nothing else And then does nothing else. So let's also grab the bit down here So val feed time. Let's import and get photo cell stuff photo so val is zero right before the loop So feed is just the name of the feed. I think Good speeds One thing it also does not Have yet is the on connect is that right? We will need If we wanted to do anything besides just connect we will need to um It's called subscribe. I don't know if that's the right verb So basically how we can do that is we can have these callbacks for whenever we get connected We want to do this code whenever we get disconnected. We want to do this code whenever a new message comes in We want to do this code And then our connected Well, all of these I guess we set on this when we create it. Is that right? Not at all Oh, okay. It's after we create it fair enough all the way up to 41 Maybe qtt is not connected to Uh, I think I never called cute. Uh, I never called connect You still have this which did not seem to fail either So I'm pretty surprised. I thought that would fail Maybe they have different pins Maybe this one has a separate spy bus. Oh, no, it doesn't use spy on the pi portal though It uses parallel I think Yeah, I think we're okay because this display doesn't actually use spy You need to call connect though I'll connect. We probably want to do that after we put our callbacks, right? I'd use it too early. Just copy this stuff further up Drive it on subscribe with on message Can you subscribe mostly? I'm not to find Okay We read the code. We're blindly pasting in maybe Using code from before it or not There we go All right. Now we've got our five second loop We're posting photo cell We are receiving on off There and then if we go look at photo cell See the latest one is three or Just keep posting see five pop in here after it sends there cool All that is working All good to me my eye at least esp32 spy. We tested requests and mini mqtt Will seem good to me. I'll test mini mqtt on the Qt pi And then after that, I think I will Go back to that other request pr I'll leave a I'll leave a comment on this one with my thoughts so far But I mean I see my thoughts so far or I'm digging Digging what I'm seeing To the extent that it's up to me. I'm on the full full steam ahead boat basically But I don't it's not like a unilateral decision that I make necessarily so Let's get So and then this time around though it it does So this and then does this work the same way before so I think this one can just use stock. Is that right? Native networking stock and then because we will get the modified mqtt library We will be using con manager Internally without our Your code so that's kind of the main difference In terms of the remaining code is like On the esp side you Import and use the connection manager in your user code On the built-in networking side You do not You end up using it because it is in requests for many mqtt that makes me think though Is there some way that it could be like inside of esp 32 spy? Like could esp 32? Is that making any sense? Would it make sense for esp 32 spy to be the thing that Imports and does something with connection manager that way user code Could potentially not have that difference of like user code for esp 32 spy has to import connection manager whereas built-in doesn't but if that import In the get context, but you wouldn't have called get context yet though, right the ssl context Don't do that until you actually make it which is in user code So there may not be a place Not really a spot where it could happen is there I guess I will say that would be nice if somehow it could be set up to where the user code Doesn't have that difference of importing connection manager or not Like there will always be a difference in the user code of importing esp 32 spy versus import wi-fi and import ssl and import socket pool Those will always exist as a difference But it would be nice if we could keep it to those being the only difference But it may not it may not be possible thinking about where that Get default context call usually comes from so I don't know for sure most people I've talked Uh with say that you don't need to manually disconnect after each session It's not using once per 15 minutes I always need a way to specify the physical pins to you not all projects will use exact pins Listenable to display for example, if someone does quad feather Stack the amount of pins left will be only a few available pins When he does quad feather stack Not sure I follow I think I might have uh Not read that at the right time and now I forgot what I was talking about or something Um Okay, we are here with codepie on our feather And then that one I think we don't need to change so let's try this Uh, I will have to do my settings toml stuff again so It's over the problem here actually is I don't have uh Have it Then my next problem is I don't have another plug Okay, hold on. Let's see here I have a copy of it back here. Sorry y'all can't see this park. So I'm doing settings toml stuff So I can tie it for a minute have it in this one. Oh my goodness. Okay, let's see Okay, found it should get like a fake network Big set of tokens so that I can just use my settings Stream It is possible post an example yesterday. It's a lot more closer. Nice. Okay Yeah, I am In favor of that. I would say that's my biggest piece of like actual feedback in terms of the functionality Then would be it'd be super nice if it was structured in that way where The user code that's using sp32 spy would not have to import connection manager and do anything with it That'd be super cool. Not eank uses 7 gpio Yeah displays in general truthfully are usually a lot of pins. Although spy I guess sometimes can get it down, but You know with the sp32 spy or wifi you still have to specify. Oh fit. Oh, I I'm with you as another difference Yeah, which pins you're using is totally true. Yeah, you'll always have to specify that Yeah, even amongst sp32 spy, you may be using different pins than something else and so even in that case like On that one half you could still have to change which is a good point as well. Yeah There's fake requests. Yeah, I've never used fake requests either. I'm not sure exactly. I think fake requests is for um I think pi portal library might use it internally I think what it does and I'm not positive. So don't quote me Maybe go check into it if you're interested. I think what fake requests does though is it makes it to where You can cache your request results. So like You can issue a fake request and if you don't have a cached copy of the response then It will do the real request and cache the response and then next time you do it It will give you the cached response But the api is the same So that you could test your code without actually Going to the network So if you're fetching like medium sized json code or something You don't want to wait for it to transfer every time over a wi-fi I think that's maybe what that's for but I'm not not 100 positive Um, yeah, so I've been busy jabber in here, but this does totally work here as well We've got our modified one. So all four all four kind of permutations requests many mqtt on each of built-in networking and esp 32 spy I'll test it out good Including we did like posts and everything as well. So we did effectively the request simple test Which is making multiple requests, which is good to make sure that we're not locking up the sockets or anything We do get the same behavior as before It's good Other thing i'm going to look at here is this other request pr Which I took a look at the other day and I tested But one thing I didn't do was look over the requested changes because I saw dan had some requested changes Kind of after I got done looking at it and I didn't want to merge it without Even looking at them basically so I didn't merge it when I was looking at this the other day What I'm gonna do is open these real quick We're just going to go through and double check that the requested changes are changed It looks like they are and then as long as they are I already tested this They were basically good to merge as long as there's nothing new Which there's not because that's where this was the other day. Okay I thought I was uh, okay, let's see here. I thought it was for faking the callback So you could specify return data and test with that instead of hammering the server. It could be I could totally be wrong I do not actually know for a certain Can't even I'm not even sure what gave me that impression I think the code inside pyportal is I'm pretty sure inside of the pyportal library or portal base Maybe is the only place Where I've seen anything that references it Oh, but it's been a while Okay A couple of these are not actually requested changes. These were just kind of like Info potentially. Oh, I didn't mean to do that. I bet I thought that was gonna Trying to just fold that is what I was trying to do Dan did mark this one. Yeah, it might be easy if Dan went through and marked them all I just didn't actually look the other day I guess I could just look up the docs from lazy right now Yeah I'm with you Let's see current implementation sends you to user agents Oh, that was like documented in as I didn't even know that documented as a comment in there. That's funny Oh, okay, this is a test interesting That is weird Yeah, I mean, I think that one is good tests in percent Okay, because data would send as a it's probably just doing data equals and then that would convert it to URL encoded so there used to only be one Key value, which means there would be no separator no ampersand now there's two values Means it will have a separator now Well, I'd supplied typo fixed That's fixed here already back method 530 That's the old one. Is it gone now? Let's just search for supplied with three Ps This is in fixed duplicate header I'm sure this is fixed, but Double checks, so Yeah, no triple Ps. All right, good to go Sometimes this sometimes this interface like overwhelms me sometimes I can't My brain just can't interpret what I'm looking at very well sometimes with that red green It depends on the changes sometimes it's better than others, but So we're good there So that's a change already in this one You could put the lower version in a set checks membership It's hard here too because I can't expand we can't really see what The rest of this function is You know, it's another one. I'm sure it's in there. It's just like So it doesn't even show up in line I can't yeah, I don't get GitHub sometimes I do not understand Where the like where are the rest of the comments? Why are some of them in line, but some of them aren't I get it DJ Devon sandboxing So let me catch up on the chat here Oh, I have DJ Devon so sandboxing can come into play then Perhaps might be better might be another way of using fake quest and I never used it. I got you See if we could see this from here I'll actually use set so you set on this one Supplied header for supplied header in supplied header. But does that still exist for supplied? Doesn't not hosting Okay. Yeah, and then Is I that is I think that is a set. Is that right? I think those curly brackets make it a set. Is that true? A literal set. So if you had l equals a list of Some duplicates and some not and then you went s equals or x It had done strings. I'll do strings in a second x Or x in l An s is now a set which means that it doesn't have two ones Has only a single one send Set of bytes that says in send header Oh send headers right here. Well, but that's a function def send header And so yeah now we have socket be There used to have send as bytes, but no longer now It's this which is better because of what this says cheaper no runtime If it's a bit over my head, but definitely trust in Same thing that's just two down right 568. Yeah, that's just like this one. I think maybe or uh, this one right here. I mean Yeah That's the same thing Is it 606 is it further down further down We can't see the function. It's another one where we can't see the function So three, I guess we'll try to find it in a function Okay, right there. Yeah, okay. Okay. So that's our hudp. Okay. So yeah, so we have no more send as bytes on lines You know one and three or whatever indexes if we think of them as indexes zero to three It's kind of weird, but that's how I think Just said that's the second one down. I guess. Yeah, the other one of those is it? No, this is a different one Oh, okay. These were out of order. I see so they yeah, okay. So we had A comment on that one first and then a comment on this one even though they're actually the other way in the code They're the same too And then I tested this the other day. So like ordinarily, I'll test before I merge Library stuff and I did this time too. Just so you all didn't see me do it because I did it the other day basically this was for anybody who's interested This was a bug in requests where it would cause it to send a duplicate of the User agent header So ordinarily whenever you make a request your your client, you know, your browser Which is the client most people are using when they make a request your your your clients sending a user agent header to the server Um, typically there should just be one user agent header which has one value and that's it But the old version of requests actually had a bug where in certain scenarios it would send two user agent headers Both with user agents and like some servers just ignore that no problem, but other servers freak out when you do that We're in funnier for it was a For eye and range Spelling errors happen. Oh did I mess up my uh spelling? Spelling errors happen to everyone. Don't worry about it. I'm just going to make your shift to board Code comments are spelled uh, ferro instead of four I mean, I'm I'm awful with spelling I really admit it straight up. I'm terrible at spelling um Let's do this one with strings. So We had high We could do high upper and we could do hello. Let me do ola Do hey there We have technically a duplicate, but it's upper lower. So here so now we can basically have the code be Pretty much exactly how it was in in request, which is we'd say Item dot lower. I think they called it header, but that's fine. So we'll say item dot lower in for item in l s We end up with a set that only contains A single high. They're all lowercase because we put them to lowercase We only have one high not two actually just learned that syntax like Less than a month ago. I learned the syntax from one of the um days of advent of code I never knew that you could make a set Literal like this anytime. I always wanted to make a set. I would always say s equals set like this and then s.add Just have as many of those as I want. So I'd be like creating multiple lines like that but You can actually do a literal set Inside of curly brackets, which feels weird, right makes it feel like it should be a dictionary But it's actually a set. All right. Another thing we'll do is release So that's uh, what is that? I think that's a minor bump, right? Actually call it they call it. I think not minor actually Because it's no new functionality. It's just a bug fix. I mean it does function different, but it's not like It's not like you can do a thing now that you didn't used to be able to Unless you count talking to a server that doesn't like duplicate user agent headers but I think was it spotify maybe some There's a certain api somebody was trying to use that was having problems with this That api will be happier now with this version, which is good. Um, let's see 204. So fix duplicate header issue Generate I like these automatic ones and then what I've been doing is sticking the old school ones above like this and duplicated duply duplicated User agent headers being sent Request they aren't lower. Better names in the case sensitive Better names are case sensitive. So uh Let me catch up on the chat You also make a generator if you use dot dot dot You create a dick this way too Yeah, if you have colons in there, I guess We create the dictionary forcing all the headers to lower So I think they're not sent as lower. I think it's just the set Curly brackets makes it seem like a json list. Yeah, or dictionary Uh, though, there's no key values. Yep. Yeah, it's like a exactly. It's like an array, but it But the the special rule that makes it different than an array is no duplicates Better names are case in sensitive. So it shouldn't oh interesting. I didn't actually know that force headers to lower Yeah, that's the part I was thinking is it's putting them to lower and then putting them in a in a set And then checking from there, but I think the ones that get sent to the server are actually still um Original whatever they were before Not 100 positive though And I don't want to check it right now because I actually had a bust out wire shark in order to see those headers I could not find a server if anybody happens to know of one if anybody knows of a server that Allows you to look at the raw HTTP request Let me know because I tried flask I tried simple server with python Um, I looked at jango Like i'm really familiar with jango, but I don't think jango could do it either jango'd be way overkill for what I need But I like i'm familiar with it. So I looked at it Um, I could not find a server that would let me look at the raw HTTP request what I ended up settling on was just using a flask server But then running wire shark on my pc and looking at the traffic in wire shark If anyone knows of a server that lets you see those raw requests Let me know because that'd be super useful for troubleshooting and like developing on this library Pretty sure someone's trying to use spotify. Okay. It's a nightmare to work with because uh the ttl tokens for like one hour really Specs says they're supposed to be case insensitive, but the parts Of any system that are consuming the results downstream. Oh, it's not forcing. I don't think so. I think it's just the set Yeah KW youtube discord mess on our breeze compared to spotify Yeah, no worries not a problem No need to apologize Appreciate the uh looking out honestly like uh, I'm always happy for folks to point out things if things seem Odd or wrong or whatever like I'm always happy to have folks yell stuff out. So Definitely no need no need ever to apologize during my stream if pointing out something that you think is wrong Or needs a second look He should be server allows that allows uh Oh the raw request Yeah, so I totally did not think of using the micro using a microcontroller as a server too I was thinking of sending the request from the microcontroller to my pc HTTP server, how do you do that? Can you just do request or something? Thank you. By the way, python's HTTP server. I it probably can um My caveat is like I couldn't figure out how to do it. I only tried for like I don't know 20 30 minutes, but I couldn't figure out how to do it But you know, I don't know that's I'm sure that's likely a me problem. Not a simple HTTP server problem, but I could not find like a dot-raw or a Like I found a stream that like maybe if I would have read from the stream it could have worked I'm not sure. I don't know if I tried that part or not, but Could not figure it out the end wire shark made it pretty easy though. I don't think aida fruit does HTTP requests Our request could be printed as a send perhaps. Yeah, I thought about I thought about modifying requests to print it But then I figured like I really wanted to see it from the server side since requests was Where the fix was that I didn't necessarily like the idea of adding prints in requests to check the fix even though like It's kind of 601 half dozen another it should work fine, but Just felt like I should validate it from the server rather than the client Request allows you to view raw data I guess that's something to do with receive into requests dot raw request All right. Well now I know I'll use half the battle that done. I never actually watched you. I do okay So that's what I'll do next time instead of wire shark in it. I will get two microcontrollers I mean you could probably do it from just one although I don't I don't want to do it from just one because that brings the socket weirdness Who knows maybe that doesn't work the same But what we'll do is we'll we'll do we'll go two microcontrollers one with the server one with the client And then the server will be allowed to just print the raw request. It'll be actually super nice Let's request that prepare You just want the equivalent of htbben.get or anything. It's not formatted in raw, but json htbben.org.get I'm not familiar with it so Kind of yes, but I actually in my case I actually don't want the json because specifically the thing I was looking for was A duplicated header value and by this turning into json and becoming a dictionary It kind of automatically Makes it so duplicated values Don't matter and don't get shown to me Which is where the raw request it would because I'd see both lines there This is pretty cool though. I hadn't I did not know about this and this is cool If you are doing like if you're building out requests on a new context or whatever and you're wanting to See what you're sending. This is pretty cool And it is almost what I what I was thinking. So yeah, I appreciate the pointer to this But the the dictionary bit will make it not work for the exact exact thing I was doing If you're in it, uh, let's see here You do circuit python server. Yep, that's exactly what uh, exactly what uh, Michael suggested. Justin. Yep And that's what I'll do next time is run htp server on the other microcontroller And then just print from there. My service code is full of logging debug calls that dump the raw headers in both directions Using with an api sometimes depending on the api you can check the request with the browser Like firebug Interesting I have to somehow hook it up to where the traffic from the microcontroller goes through there too in that case Sounds like good use of the microcontroller Echoes debugging that's actually we could just write a script. That's like an echo server that just gives you back the raw request Never you send it. That'd be kind of be kind of handy. Actually, maybe I'll whip that up um This is kind of neither here nor there but since we're on the topic of htp server, we only have a few minutes left This is something I was thinking about the other day Do you think there does anybody anybody who's watching now would you be interested in? Or alternatively anybody who's watching now, do you think there are people out there or do you know people who might be interested in a video tutorial probably a couple of videos maybe three or four videos That go over kind of the an introduction to web applications like The target audience is a person who's never made a web application before And the goal is to introduce them to creating web applications And in my mind using circuit python htp server with the idea being that that knowledge is Translatable out to flask and jango and other things even node to an extent like non python stuff um, I kind of like the idea of using circuit python as a Very very basic introduction to web servers web application servers specifically htp servers That's an idea i'm kicking around in my head because like There's something really nice about it running on a microcontroller being handheld and tangible Being able to do things like tie in neopixel colors to your requests very very very easily um, I think we'll make it a Really nice platform to learn the basics the very very very basics of requests and responses and htp servers and callbacks and things like this um Yeah, if anyone has thoughts or ideas around that feel free to hit me up. That's kind of an idea. I'm kicking around That'd be very cool. Okay. Nice. Yeah, I think I I'm I'm with you. I think that would be a nice it's like a thing we don't have today that could serve as a very very base level introduction to folks who have never done it before as like a my first web app type thing So I have to do a lot of refining in terms of like what makes sense to cover and what doesn't how do we keep it easy enough for those folks, but I think that'd be a cool piece of content. Maybe that'll be one of my um 2024 goals is to build something out like that Yeah, totally Being able to do colors for posting either different methods Yeah, I'm being able to send different headers and cookies like introducing all these basic concepts that you You get into in the web server world, but introducing it in a way where you don't have to have An actual VM on an internet server somewhere, right? You don't have to pay for it You don't have hosting services or URLs domain names. You can kind of learn the basics without Doing any of that kind of stuff But you could do on a Raspberry Pi as well But it's even a step down even from there in terms in my mind because you don't have any For the infrastructure that you need to set up exactly. You don't need to run engine x or Yeah, that kind of stuff in between you can just Python script runs server answers as soon as you hit it nice and easy Absolutely, I'm only use htp server once it was like two years ago tutorial changes made recently be excellent Like yes, great stream If it is not urgent, maybe I'd be able to help with that to be honest. Yeah, I would say it's totally not earn totally not urgent and I am Absolutely appreciative of any help from anybody and I think you're obviously a very good person to help because you've done a lot of work on that library So yeah, totally totally down to to collaborate on that As an experimental learner, I'd be interested in such a video tutorial. It's not an area. I've explored yet. Nice. Okay. Cool. Yeah, I think we'll We'll keep We'll keep kicking it around the old noodle and and figure out kind of what what makes sense to include and where the A good set of boundaries are so that we don't make it super duper long, but um Yeah Pick it around and try to get something try to get something going Yeah, michael and uh, if you want to help help me out on that I definitely appreciate that we can link up at some point and kick some ideas around Use some more brainstorming Most of my scripts have debug boolean one of which the full api gets posted. Yeah, I do I like that as well. Debug equals true or whatever and you debug equals true or false And you just have like if debug bunch of stuff add print statements everywhere Restructure my code a lot like that as well Gosh, Nicholas worth passing on the first Not familiar. I don't think nick glouse Not familiar with them. I don't think unfortunate though See most of my scripts. Okay. Yeah. Yeah print fully uh full api. Okay. So we got this merge We did release that I actually click release on this one. Did I get busy chatting? Make sure I actually released here I am going to head out for now. Uh, if folks are interested, I'll be back tomorrow morning at 10 a.m. Central time Uh, so yeah, you can convert that to your time zone, but 10 a.m. Central time on Saturday I will be back over on my own channel uh streaming some more circuit python stuff I don't know for sure what I'm going to work on tomorrow morning. So if you uh, want to find out you can tune in um I will be back next week as well for deep dives. So at uh, four p.m. Central uh, two p.m Pacific Five p.m. Eastern on Friday. So same time as today's stream, you know about two hours ago is when I started and I'll be back At that same time next Friday Um, I think maybe scott will be back after that I'm not sure I haven't actually talked to him about the the weeks after that. I just know though this week and next week I'm definitely here He might be back after that or I might talk to him that next week afterwards and find out that maybe not but we'll see But definitely next week. I'll be here. Definitely tomorrow morning. I'll be here Um, thanks for hanging out everybody again huge hug huge. Thanks to Justin for all this work on requests and the connection manager I think this is really really cool stuff. Um, really appreciate you taking this stuff on Thanks to everybody for watching. Thanks to everyone in the chat who helped me out with different stuff Uh, and yeah, I hope everyone has a good night a good rest of your weekend and all that stuff If I don't see you around tomorrow, um, then I'll see you later and um, yeah, thanks again for watching and uh, have a good one