Simple HTTP Server in Python

  Переглядів 165,846

NeuralNine

NeuralNine

День тому

In this video, we learn how to build a simple Python HTTP server.
◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
📚 Programming Books & Merch 📚
🐍 The Python Bible Book: www.neuralnine.com/books/
💻 The Algorithm Bible Book: www.neuralnine.com/books/
👕 Programming Merch: www.neuralnine.com/shop
🌐 Social Media & Contact 🌐
📱 Website: www.neuralnine.com/
📷 Instagram: / neuralnine
🐦 Twitter: / neuralnine
🤵 LinkedIn: / neuralnine
📁 GitHub: github.com/NeuralNine
🎙 Discord: / discord
🎵 Outro Music From: www.bensound.com/
Timestamps:
(0:00) Intro
(0:28) Command Line
(6:18) Custom Python HTTP Server
(17:23) Outro

КОМЕНТАРІ: 100
@azkaarkhatib
@azkaarkhatib Рік тому
Great info. I love how you actually googled after you got stuck and didn't cut that part out. Google search is an important skill for any programmer.
@Logan_Wolf_Online
@Logan_Wolf_Online 3 місяці тому
A lot of new programmers feel insecure about googling things after a while, because all these folks who show different tutorials tend to not show just how common it is to need to reference documentation or their source code they are using for the tutorial. It happens a lot however, so there is no shame in needing to check reference information.
@RileyMeta
@RileyMeta 10 годин тому
It doesn't matter if you know how to do everything from memory. It only matters if you know how to get the answers and implement them properly.
@Indodapro
@Indodapro 3 дні тому
That intro deserves a sub
@markosth09
@markosth09 2 роки тому
Btw {{ is the proper way to escape { in f-strings
@mathisart
@mathisart 2 роки тому
yup
@leiloz
@leiloz 2 роки тому
Very useful video, thanks!
@SoftEngiNir
@SoftEngiNir Місяць тому
Thank you so much! Very simply put, great job!
@jackReme
@jackReme 2 роки тому
Thanks alot I love your videos! They are always very helpful! Thanks
@dorb1337
@dorb1337 Рік тому
basic but gold. thank you!
@RhoChalmers
@RhoChalmers Місяць тому
This was fun. Thanks!
@jonurwin1
@jonurwin1 Рік тому
Great video, thanks!
@cuzconice
@cuzconice Рік тому
Gracias por la informacion! Thank you!!!
@marlymutos1000
@marlymutos1000 2 роки тому
Thanks for the knowledge...
@teclote
@teclote Рік тому
Outstanding.
@TozzaYT
@TozzaYT 11 місяців тому
thank you so much 🎉
@biruktilhun7930
@biruktilhun7930 Рік тому
thanks! very good one
@CR33D404
@CR33D404 9 місяців тому
Does the basehttpServer doesn’t provide a way for the handler to get the query parameters?
@legends_talk1
@legends_talk1 7 місяців тому
OMG 😮😮❤ thats cool
@shocker9434
@shocker9434 2 роки тому
bro your videos are always helpful to me
@cwansu
@cwansu 2 роки тому
Please provide full video of your Beginning example
@albertoricardomorales6328
@albertoricardomorales6328 2 роки тому
This is great, no more usb 😂 Very useful!
@janusztarnowski115
@janusztarnowski115 Рік тому
Simple Application Enter your details ukposts.info/have/v-deo/fIefaWN8oW6DjoE.html
@erezperez4907
@erezperez4907 Рік тому
best techer
@kklol07
@kklol07 2 роки тому
HEY I JUST DISCOVERED YOUR CHANNEL TODAY, THANKS!
@vishwasluhana
@vishwasluhana 2 роки тому
Hi, I think the problem at 14:04 is “,” before “utf-8” which you accidentally removed while typing. I am still not sure that if it would work with comma or not but it might be the problem.
@prboric
@prboric 2 роки тому
You are correct, he deleted the comma by mistake in 13:46. He still needed the backslashes \{ and \} for it to work in addition to the missing coma.
@LZulb
@LZulb Рік тому
The other problem is that f'\{"time": "{date}"\}' Should look like this f'\{"time": f"{date}"\}'
@CR33D404
@CR33D404 9 місяців тому
@@LZulbwhat the heck is this
@LZulb
@LZulb 9 місяців тому
@@CR33D404 probably some code
@CreepyMemes
@CreepyMemes 4 місяці тому
@@LZulbwtf
@DaivaDarpana
@DaivaDarpana Рік тому
I'd like to create a test www using html+python but... not on my local computer only directly on the server in order to be visible for any1 via internet. Have you got any tutorial how to do that?
@terryscript64
@terryscript64 2 роки тому
Can you do a video on how to make a customisable theme for http directory listing, the default one looks really old.
@CR33D404
@CR33D404 9 місяців тому
That’s what I’m looking for, I’m too lazy to make a flask app for that
@biswarupbhattacharyya4322
@biswarupbhattacharyya4322 Рік тому
Can upload and download at the same time? Is there a way to do both?
@joetimbersock7639
@joetimbersock7639 Рік тому
Is this server secure? I was going to use this as a server but, the internet said it’s not secure. Is it secure? Need to know.
@AlexBerkk
@AlexBerkk Рік тому
how do you retrive data from request? like URL path, POST data, get params?
@LoneWolf-lw1sl
@LoneWolf-lw1sl Рік тому
Do you know how give timeout for that http server using python?
@tamakunay9158
@tamakunay9158 2 роки тому
thanks for the video
@alternativeenergyresearch4857
@alternativeenergyresearch4857 Рік тому
I am getting data in python in excel sheet I want to push data to other programs / software through DDE please can you make video
@programmingnothing
@programmingnothing 2 роки тому
amazing...
@giorgikhachidze64
@giorgikhachidze64 Рік тому
What is "-m" for ?
@shiyan99s
@shiyan99s Рік тому
-m flag is when you want to use a Python module as a script.
@ojasdillikar4738
@ojasdillikar4738 2 роки тому
Trust me , one day I'm gonna speedrun all your python videos 😤
@vasto_boy
@vasto_boy 9 місяців тому
Did you accomplish your mission sir?
@TheLeOn4you
@TheLeOn4you Рік тому
are you from Romania? sorry, im just curious !
@Sarah_42
@Sarah_42 Рік тому
nice
@spectate_009
@spectate_009 Рік тому
does anyone know how to add styling to the uhh directory listing ?
@mohdqayyoomkhan2446
@mohdqayyoomkhan2446 5 місяців тому
@Anto-mi5pn
@Anto-mi5pn 2 роки тому
What is the native python way to host a web server with REST APIs? How do you do it without frameworks? Is there no way to do it without frameworks that implement WSGI?
@ItsCOMMANDer_
@ItsCOMMANDer_ 5 місяців тому
import python websocket library, reimplement all of http tls ssl and https yourslef i guess
@oitudobom7418
@oitudobom7418 2 роки тому
how Do I made other ppl to connect to my ip adress
@alternativeenergyresearch4857
@alternativeenergyresearch4857 Рік тому
Hello can you provide code to make excel as dde server
@fastturtle9788
@fastturtle9788 10 місяців тому
How do I stop the server?
@rtr195807
@rtr195807 2 роки тому
One more important information!
@indeliblyronnie
@indeliblyronnie 2 місяці тому
Why not just rsync or scp?
@x9rtu3os1t8
@x9rtu3os1t8 Рік тому
Name of song please
@CR33D404
@CR33D404 9 місяців тому
The ide should have warned u that u forgot to add a comma there
@kacpersuchecki3707
@kacpersuchecki3707 Рік тому
WinError 10049- The requested address is not valid in its context
@user-sr1ij3hw4r
@user-sr1ij3hw4r Рік тому
thhhhhx
@arrayindexoutofboundsexcep1088
@arrayindexoutofboundsexcep1088 2 роки тому
I learned something
@Mitchief
@Mitchief 2 роки тому
i cant even get through the first step..in terminal when i write python -m http.server it shows invalid syntax!!!
@JThompson_VI
@JThompson_VI Рік тому
Try python3 -m http.server I think the syntax was different in python 2
@yessir919
@yessir919 Рік тому
did u get through the 1st step ? i also need some help, would appreciate it
@rojeetmndr3749
@rojeetmndr3749 2 роки тому
Here first
@geochicken9156
@geochicken9156 Рік тому
How do you make computers on different networks connect 😭
@ItsCOMMANDer_
@ItsCOMMANDer_ 5 місяців тому
so, you need to forward the port on wich the server is running, and then access it by public ip
@codewithsmoil4098
@codewithsmoil4098 2 роки тому
It means that I can start localhost at any port ?
@colton3507
@colton3507 2 роки тому
Any open port
@codewithsmoil4098
@codewithsmoil4098 2 роки тому
@@colton3507 Ohh and what about closed ports ?
@colton3507
@colton3507 2 роки тому
@@codewithsmoil4098 it just won't work on those ports. Idk the exact error it will give. But try it out!
@codewithsmoil4098
@codewithsmoil4098 2 роки тому
@@colton3507 Okay thanks for info.
@ananrishan4333
@ananrishan4333 2 роки тому
can u access the http server using a ipad or a phone or any other device instead of a computer?
@TheKing-hf8is
@TheKing-hf8is 2 роки тому
Yep but u must be connected to the same connection
@sanspentester8506
@sanspentester8506 2 роки тому
Bro How can I have your Desktop wallpaper?
@christianjekhiphop8246
@christianjekhiphop8246 7 місяців тому
what is the fucking comand for switch to deskop -
@ameymore7528
@ameymore7528 2 роки тому
But how did you stop the server at 1:28 please tell me 😟😟 ??
@TheKing-hf8is
@TheKing-hf8is 2 роки тому
Ctrl c
@juniustoh7772
@juniustoh7772 4 місяці тому
Lol i had the same issue.
@juniustoh7772
@juniustoh7772 4 місяці тому
@@TheKing-hf8is Thank you so much, bless you
@badonker
@badonker 2 роки тому
Second
@dafenshi2478
@dafenshi2478 2 роки тому
3
@jotascript6910
@jotascript6910 11 місяців тому
This dont work
@SilverMiraii
@SilverMiraii Рік тому
your intro destroyed my ears
@fehgabriel67
@fehgabriel67 2 роки тому
how to host as Public IP?
@theonplore7373
@theonplore7373 2 роки тому
Did you figure this out already?
@fehgabriel67
@fehgabriel67 2 роки тому
@@theonplore7373 no, can you tell me?
@theonplore7373
@theonplore7373 2 роки тому
@@fehgabriel67 no I haven't yet either, I have been testing things with aws EC2 instance, and trying to configure my web server's get and post reponses on there but I am running into problems, idk what your usecase is for but try looking into "IIS Web Server" maybe that'll help
@MrChoclateChip
@MrChoclateChip 2 роки тому
ngrok
@DominicNweze
@DominicNweze Рік тому
@@MrChoclateChip isn't this for hacking people cameras. What do you want with that 🤔
@netanelkomm5636
@netanelkomm5636 2 роки тому
You showed your IP lol…
@SuperMan-nl6hi
@SuperMan-nl6hi 2 роки тому
hope guys who are watching this are just incapable of doing anything with that. lol
@DominicNweze
@DominicNweze Рік тому
@@SuperMan-nl6hi apart from tracking where he is. Nothing special..
@ItsCOMMANDer_
@ItsCOMMANDer_ 5 місяців тому
it starts with 192.168. wich mean that its an local ip you bafoon, wich cannot be used to track his location nor anything else you bafoon@@DominicNweze
@LeProffeseurFOU
@LeProffeseurFOU Рік тому
Error code explanation: 501 - Server does not support this operation. Please Helpe @NeuralNine
Simple Mail Checker in Python
14:13
NeuralNine
Переглядів 65 тис.
Coding a Web Server in 25 Lines - Computerphile
17:49
Computerphile
Переглядів 315 тис.
Піхотинці - про потребу у людях
00:57
Суспільне Новини
Переглядів 958 тис.
Teenagers Show Kindness by Repairing Grandmother's Old Fence #shorts
00:37
Fabiosa Best Lifehacks
Переглядів 31 млн
Lenovo ThinkPad P15s G1: Workstation for lighter tasks
8:40
Laptop Retrospective
Переглядів 497
Python Socket Programming Tutorial
49:43
Tech With Tim
Переглядів 993 тис.
Create A Python API in 12 Minutes
12:05
Tech With Tim
Переглядів 519 тис.
Modern Graphical User Interfaces in Python
11:12
NeuralNine
Переглядів 1,4 млн
Make A Python Website As Fast As Possible!
22:21
Tech With Tim
Переглядів 651 тис.
Python Sockets Simply Explained
39:33
NeuralNine
Переглядів 149 тис.
3 PYTHON AUTOMATION PROJECTS FOR BEGINNERS
17:00
Internet Made Coder
Переглядів 1,4 млн
Best OS for programming? Mac vs Windows vs Linux debate settled
8:41
🤯Самая КРУТАЯ Функция #shorts
0:58
YOLODROID
Переглядів 3,1 млн
Наушники Ой🤣
0:26
Listen_pods
Переглядів 426 тис.