PyCon 2014

Cómo construirte tu propio Python full-stack

Kate Heddleston  · 

Presentación

Vídeo

Transcripción

Extracto de la transcripción automática del vídeo realizada por YouTube.

please join me in welcoming stingy was gonna be talking about how that is to be a full-stack developer alright hi everybody welcome um so my name is Kate Huddleston I am a software engineer I hail from San Francisco California that is a picture of me and then

also my self-portraits I drew it because my mom decided recently that she wanted to embroider a jean jacket for me with an image of a computer girl so I have a sweet jean jacket with that on the back if you want to find me later in the conference so why am

i giving this talk I submitted this presentation because I I am an applications developer and when I started doing contract work I had to manage the whole stack myself and it turns out Python is usually part of a much larger system and when you come outside

of the application layer it can be very confusing you can get lost there are a lot of pieces and that's pretty much roughly how I play Tetris as well as how I program so there's just a lot of stuff going on and it's important to understand how

this system works as a whole okay so what we're gonna talk about today I'm gonna walk you through a semi typical web application and I say semi typical because this is computers and there are always a lot of different ways to do things I'm gonna

walk you through kind of the system of systems which is development staging and production environments as well as deploy and then along the way I'm going to talk to you about some helpful Python libraries what we are not going to talk about today we are

not going to talk about massively scalable web applications so if you're looking to build something like Google or Facebook or understand those we're not going to talk about that today we're not going to talk about every single installation on

the machine there are things missing from this presentation because I cannot cover everything in 25 minutes and we're not gonna go into the nitty gritty details of anything okay so a semi typical web application how many of you have heard the term lamp

a lamp stack nice I've actually never programmed a lamp stuff stack specifically but what it refers to is Linux Apache my sequel and PHP and these are kind of the four core parts of a small full stack web application it's the operating system which

in this case is Linux the web server which is Apache the database which is my sequel and the application language which is PHP however most of us here probably don't program that stack we I program something like lint limp Ellen peepee Linux nginx Postgres

Python so you can change out the parts of this stack the next part of this presentation I can either speak or I can do in song because I kind of came up with the theme song one day while I was getting ready so does anyone have a strong preference either way

song okay I was kind of hoping and dreading that you would say that all right it's to the tune of the Brady Bunch theme song all right it's the story of a Linux server that was hosting Apache and some apps all of them were running Python because it's

awesome the smallest one with flask it's the story of a post card server that was busy with some data of its own it was clear these two should come together that's the way we built our first full stack web app full stack web apps full stack web apps

that's the way we built our first full stack web app Duronto Ton Ton Hey yes you were all free to laugh at me now but this actually has the right content amazingly enough being for being as corny as it is it's um it's all the parts of a small full

stack web application it has the operating system the web server the application and the database and so if you take a look at these parts the web server is what receives requests and gives back responses nginx in G unicorn or Apache and mod whiskey are typical

tools that people use for their web servers the application layer which is where the bulk of a lot of engineers spend most of their time this is where frameworks like Django and flask live Python libraries some of your front-end code may be your static files

although those can technically be served from anywhere because they are static and then finally your database and a lot of people use relational databases like Postgres sequel my sequel sequel server you can also use alternative data alternative data stores

like key value stores such as Redis or MongoDB you can use those in conjunction with or in lieu of a relational database people kind of do either these days so we're gonna start adding stuff to our small web application now you've got things up and

running you have a website it you know serves web pages you might have user authentication and things like that and so now you want some logging you want to know what's going on you want to know who's accessing your web application and these can just

live as log files on the machine for now because you have one server and it's pretty small so you just have maybe a jewnicorn access log some Python logs whatever you also probably have something for version control you probably don't just have code

hosted on this server so for version control people use get an SVN and they use github or bitbucket to host code repositories so next now that everything's working and running you have a web application people can log in it you know does whatever it is

[ ... ]

Nota: se han omitido las otras 2.607 palabras de la transcripción completa para cumplir con las normas de «uso razonable» de YouTube.