Simple HTTP Server in Python

  Рет қаралды 178,805

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

Пікірлер: 99
@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 6 ай бұрын
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 2 ай бұрын
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.
@SoftEngiNir
@SoftEngiNir 4 ай бұрын
Thank you so much! Very simply put, great job!
@leiloz
@leiloz 2 жыл бұрын
Very useful video, thanks!
@markosth09
@markosth09 2 жыл бұрын
Btw {{ is the proper way to escape { in f-strings
@mathisart
@mathisart 2 жыл бұрын
yup
@RhoChalmers
@RhoChalmers 4 ай бұрын
This was fun. Thanks!
@Indodapro
@Indodapro 2 ай бұрын
That intro deserves a sub
@albertoricardomorales6328
@albertoricardomorales6328 2 жыл бұрын
This is great, no more usb 😂 Very useful!
@jackReme
@jackReme 2 жыл бұрын
Thanks alot I love your videos! They are always very helpful! Thanks
@teclote
@teclote Жыл бұрын
Outstanding.
@jonurwin1
@jonurwin1 2 жыл бұрын
Great video, thanks!
@dorb1337
@dorb1337 Жыл бұрын
basic but gold. thank you!
@cuzconice
@cuzconice 2 жыл бұрын
Gracias por la informacion! Thank you!!!
@marlymutos1000
@marlymutos1000 2 жыл бұрын
Thanks for the knowledge...
@biruktilhun7930
@biruktilhun7930 2 жыл бұрын
thanks! very good one
@TozzaYT
@TozzaYT Жыл бұрын
thank you so much 🎉
@CR33D404
@CR33D404 Жыл бұрын
Does the basehttpServer doesn’t provide a way for the handler to get the query parameters?
@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?
@legends_talk1
@legends_talk1 10 ай бұрын
OMG 😮😮❤ thats cool
@erezperez4907
@erezperez4907 Жыл бұрын
best techer
@AlexBerkk
@AlexBerkk Жыл бұрын
how do you retrive data from request? like URL path, POST data, get params?
@shocker9434
@shocker9434 2 жыл бұрын
bro your videos are always helpful to me
@cwansu
@cwansu 2 жыл бұрын
Please provide full video of your Beginning example
@kklol07
@kklol07 2 жыл бұрын
HEY I JUST DISCOVERED YOUR CHANNEL TODAY, THANKS!
@LoneWolf-lw1sl
@LoneWolf-lw1sl Жыл бұрын
Do you know how give timeout for that http server using python?
@biswarupbhattacharyya4322
@biswarupbhattacharyya4322 Жыл бұрын
Can upload and download at the same time? Is there a way to do both?
@Sarah_42
@Sarah_42 Жыл бұрын
nice
@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.
@spectate_009
@spectate_009 Жыл бұрын
does anyone know how to add styling to the uhh directory listing ?
@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 Жыл бұрын
That’s what I’m looking for, I’m too lazy to make a flask app for that
@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 Жыл бұрын
@@LZulbwhat the heck is this
@LZulb
@LZulb Жыл бұрын
@@CR33D404 probably some code
@CreepyMemes
@CreepyMemes 7 ай бұрын
@@LZulbwtf
@tamakunay9158
@tamakunay9158 2 жыл бұрын
thanks for the video
@programmingnothing
@programmingnothing 2 жыл бұрын
amazing...
@oitudobom7418
@oitudobom7418 2 жыл бұрын
how Do I made other ppl to connect to my ip adress
@giorgikhachidze64
@giorgikhachidze64 Жыл бұрын
What is "-m" for ?
@shiyan99s
@shiyan99s Жыл бұрын
-m flag is when you want to use a Python module as a script.
@fastturtle888
@fastturtle888 Жыл бұрын
How do I stop the server?
@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
@mohdqayyoomkhan2446
@mohdqayyoomkhan2446 8 ай бұрын
@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_ 8 ай бұрын
import python websocket library, reimplement all of http tls ssl and https yourslef i guess
@alternativeenergyresearch4857
@alternativeenergyresearch4857 Жыл бұрын
Hello can you provide code to make excel as dde server
@ojasdillikar4738
@ojasdillikar4738 2 жыл бұрын
Trust me , one day I'm gonna speedrun all your python videos 😤
@vasto_boy
@vasto_boy Жыл бұрын
Did you accomplish your mission sir?
@x9rtu3os1t8
@x9rtu3os1t8 2 жыл бұрын
Name of song please
@rojeetmndr3749
@rojeetmndr3749 2 жыл бұрын
Here first
@TheLeOn4you
@TheLeOn4you Жыл бұрын
are you from Romania? sorry, im just curious !
@rtr195807
@rtr195807 2 жыл бұрын
One more important information!
@indeliblyronnie
@indeliblyronnie 5 ай бұрын
Why not just rsync or scp?
@user-sr1ij3hw4r
@user-sr1ij3hw4r Жыл бұрын
thhhhhx
@arrayindexoutofboundsexcep1088
@arrayindexoutofboundsexcep1088 2 жыл бұрын
I learned something
@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
@CR33D404
@CR33D404 Жыл бұрын
The ide should have warned u that u forgot to add a comma there
@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 2 жыл бұрын
Try python3 -m http.server I think the syntax was different in python 2
@yessir919
@yessir919 2 жыл бұрын
did u get through the 1st step ? i also need some help, would appreciate it
@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.
@geochicken9156
@geochicken9156 Жыл бұрын
How do you make computers on different networks connect 😭
@ItsCOMMANDer_
@ItsCOMMANDer_ 8 ай бұрын
so, you need to forward the port on wich the server is running, and then access it by public ip
@kacpersuchecki3707
@kacpersuchecki3707 Жыл бұрын
WinError 10049- The requested address is not valid in its context
@Kaeribana
@Kaeribana 2 жыл бұрын
Second
@dafenshi2478
@dafenshi2478 2 жыл бұрын
3
@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 7 ай бұрын
Lol i had the same issue.
@juniustoh7772
@juniustoh7772 7 ай бұрын
@@TheKing-hf8is Thank you so much, bless you
@sanspentester8506
@sanspentester8506 2 жыл бұрын
Bro How can I have your Desktop wallpaper?
@christianjekhiphop8246
@christianjekhiphop8246 10 ай бұрын
what is the fucking comand for switch to deskop -
@technically677
@technically677 Жыл бұрын
This dont work
@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 2 жыл бұрын
@@MrChoclateChip isn't this for hacking people cameras. What do you want with that 🤔
@SilverMiraii
@SilverMiraii Жыл бұрын
your intro destroyed my ears
@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 2 жыл бұрын
@@SuperMan-nl6hi apart from tracking where he is. Nothing special..
@ItsCOMMANDer_
@ItsCOMMANDer_ 8 ай бұрын
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
Рет қаралды 71 М.
Coding a Web Server in 25 Lines - Computerphile
17:49
Computerphile
Рет қаралды 331 М.
Пранк пошел не по плану…🥲
00:59
Саша Квашеная
Рет қаралды 7 МЛН
Create Stunning Python GUIs in 10 Minutes With Drag & Drop
11:38
Coding Is Fun
Рет қаралды 41 М.
Python Sockets Simply Explained
39:33
NeuralNine
Рет қаралды 159 М.
Building a Simple HTTP Server in Python
16:08
Chuck Severance
Рет қаралды 48 М.
Create A Python API in 12 Minutes
12:05
Tech With Tim
Рет қаралды 602 М.
build a meme Python website (Flask Tutorial for Beginners)
13:30
NetworkChuck
Рет қаралды 472 М.
40 APIs Every Developer Should Use (in 12 minutes)
12:23
Coding with Lewis
Рет қаралды 334 М.
FastAPI, Flask or Django - Which Should You Use?
9:49
Tech With Tim
Рет қаралды 62 М.
Why The Windows Phone Failed
24:08
Apple Explained
Рет қаралды 228 М.
Coding Encrypted Chat in Python
20:33
NeuralNine
Рет қаралды 46 М.
КРУТОЙ ТЕЛЕФОН
0:16
KINO KAIF
Рет қаралды 7 МЛН
ноутбуки от 7.900 в тг laptopshoptop
0:14
Ноутбуковая лавка
Рет қаралды 3,5 МЛН
Tag him😳💕 #miniphone #iphone #samsung #smartphone #fy
0:11
Pockify™
Рет қаралды 4,3 МЛН