Python In The Browser! PyScript First Look

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ธ.ค. 2024

ความคิดเห็น • 277

  • @TraversyMedia
    @TraversyMedia  2 ปีที่แล้ว +198

    Remember, this is in Alpha, so it is very very new. It also will never replace JS. In my humble opinion, It will simply bring some great Python packages and tasks to the browser environment. Which I think is pretty damn cool. Anyone saying it will replace JS is fear-mongering or trying to get clicks.

    • @universecode1101
      @universecode1101 2 ปีที่แล้ว +10

      Totally agree with you Brad, I wrote something like that in the comment. However JavaScript !== Python ✌🏻

    • @Joshuahendrix
      @Joshuahendrix 2 ปีที่แล้ว

      Thanks for everything Brad! My life has been impacted for the better because of you!

    • @Israeljoelic
      @Israeljoelic 2 ปีที่แล้ว +5

      Hey Brad, my fear is actually is thinking of how much I should know to be a complete web developer

    • @Israeljoelic
      @Israeljoelic 2 ปีที่แล้ว +1

      Am glad to be one of the few ugandan students of brad traversy.... You have impacted my whole Mr Brad

    • @NewoneFPV
      @NewoneFPV 2 ปีที่แล้ว +1

      Hope this comment will age well

  • @nalinipathak1035
    @nalinipathak1035 2 ปีที่แล้ว +64

    The new intro is so modern and fire!!!

    • @harmitchhabra989
      @harmitchhabra989 2 ปีที่แล้ว +6

      It's fine, but the old one carries so much with it that topping it seems impossible

    • @hakanaki
      @hakanaki 2 ปีที่แล้ว +1

      @@harmitchhabra989 I miss the old one 😔.

  • @ighsight
    @ighsight 2 ปีที่แล้ว +99

    console.log from inside a Py script took my breath away. Obviously the the ability to use Py packages in the browser is great but the bi-directional link between Py and JS to me is the most fascinating thing about this innovation.

  • @universecode1101
    @universecode1101 2 ปีที่แล้ว +49

    Finally a video that clarifies pyscript. I think it's just the beginning but it could be bigger later on. But sure it doesn't replace JAVASCRIPT, let's not exaggerate. They are always two different things and I say this from Js-React dev, which is learning Python. They are both extraordinary

    • @FlanPoirot
      @FlanPoirot 2 ปีที่แล้ว +1

      we'll see compiled languages more and more being adopted for frontend development. but python just isn't one of those. python requires loading a runtime + all your code, which is pretty bad. don't get me wrong there are some applications where having an embedded python runtime might be useful.
      but for general programming we'll see more and more people using other languages, some open source projects are already taking advantage of this:
      - Penpot uses Clojure;
      - Appflowy uses Rust;
      just to name a few. I'm honestly excited for javascript losing ground on the web space (more creativity and newer more correct and more secure languages on the web will be a huge plus, fragmentation will be a problem but it's something I'm willing to accept and it never bothered me since there has always been a lot of computer languages)

    • @PlasmaSnake369
      @PlasmaSnake369 2 ปีที่แล้ว +3

      But if it compiles to webassembly it should actually be faster than JS no? (Although probably a larger download size) and if it has a fully featured DOM manipulation API then the only thing stopping it from replacing JS would be user adoption I would think. But then again, there are a bunch of JS frameworks that are faster than react and arguably better but that hasn't done too too much to slow down React's popularity.

    • @dhkatz_
      @dhkatz_ 2 ปีที่แล้ว

      @@PlasmaSnake369 No the only thing stopping it is the fact that every browser has a JS engine built in and it is extremely optimized at what it does for the browser

    • @PlasmaSnake369
      @PlasmaSnake369 2 ปีที่แล้ว +1

      @@dhkatz_ Its optimized as well as is reasonable but same browser is built to run web assembly much faster

  • @m.lamintamba7821
    @m.lamintamba7821 2 ปีที่แล้ว +12

    Can't wait to see a full course from you, when Pyscript is ready. Thanks very much

  • @kleczekr
    @kleczekr 2 ปีที่แล้ว +13

    That's wicked, thanks for the small review video, I've got so many tools programmed in Python on so many machines, I already see some potential for moving a few of them online and accessing them via some neat user interface. I had no idea something like that existed, plus it looks super intuitive. So thanks for that :)

  • @opopopop6286
    @opopopop6286 2 ปีที่แล้ว +2

    Funny, been learning JS for the past month or so. Just today decided to switch over for a bit to Python for various reasons...then I come across this video. How perfect a timing!

  • @akshaypendyala
    @akshaypendyala 2 ปีที่แล้ว +29

    I can already see myself invested in this and creating something as I love python. Thanks for the video!

    • @codingwithlu
      @codingwithlu 2 ปีที่แล้ว +1

      I work on web app using Python, Django and Flask, I'm loving this a lot. I will must definitely be playing around with this

    • @akshaypendyala
      @akshaypendyala 2 ปีที่แล้ว +1

      @@codingwithlu yes, I believe compared to Django we are going to get much more flexibility and we can implement complex things with this.

  • @firelordkushroll
    @firelordkushroll 2 ปีที่แล้ว +8

    very nice. as a web dev and a slytherin, i really love the idea of adding Python to my applications.

  • @petecapecod
    @petecapecod 2 ปีที่แล้ว +9

    Wow that was incredible! 🤯 The ability to use Python packages in the browser!!! That's huge 💯
    Thanks for putting this video together Brad 👍🏻

    • @codingwithlu
      @codingwithlu 2 ปีที่แล้ว +1

      Couldn't agree more

  • @sqlyoutuber8230
    @sqlyoutuber8230 2 ปีที่แล้ว

    Thank you so much for making this video. You saved me from getting a low c on my final project.

  • @t1234-q5z
    @t1234-q5z 2 ปีที่แล้ว

    I started coding 6 years back had a job for 5 years they getting ready to fire me soon. I written a ton of different things for them and now I understand the true power of these programs after using them in real work examples. Anyways thanks and cheers to the futuree

  • @BCTAHbKA
    @BCTAHbKA 2 ปีที่แล้ว

    Kjo është videoja më e mirë ndonjëherë

  • @fvgoya
    @fvgoya 2 ปีที่แล้ว +12

    This PyScript will be extremely helpful using with IoT. Simple project: You can have an Arduino/ESP32/Raspberry Pi, Python in the middle and PyScript on the Front-end and create really nice Dashboard, for instance.

  • @OneCSeven
    @OneCSeven 2 ปีที่แล้ว +6

    Thats cool I bet you can make python and JS interoperate using the dom as a messaging service

  • @AndreaManna85
    @AndreaManna85 2 ปีที่แล้ว +1

    Finally good video about Pyscript! Thanks 👏👏👏👏

  • @teodortodorov6729
    @teodortodorov6729 2 ปีที่แล้ว +5

    This seems great! I have a question, about the practicality of it. Considering that the heavy computational operations that python would be doing, isn't that going to make any large scale website even more ram hungry? React + AI powered by Python sounds amazing, but the end user might disagree. I am just a junior, sorry if I'm missing something obvious.

    • @codingwithlu
      @codingwithlu 2 ปีที่แล้ว +2

      I would assume for large dataset that it will utilize a good amount of memory, just like it would if you were running the script locally. As more ppl start testing this we will see what type of limitations there are. But I still think this is a great start for using Python on the front-end

  • @bootstrapsimplified4698
    @bootstrapsimplified4698 2 ปีที่แล้ว

    I m realy excited to use python on the front end I was struggling with Js for months ,and finally python for the rescue .Thank you for sharing knowledge with the community.You earned +1 subscriber❤❤

    • @catholic_zoomer_bro
      @catholic_zoomer_bro 2 ปีที่แล้ว +2

      Keep practicing, I'm sure you'll get the hang of JS eventually

  • @freedom13245
    @freedom13245 2 ปีที่แล้ว +11

    A bit confusing that the python print function doesn't output on console imo

    • @akshaypendyala
      @akshaypendyala 2 ปีที่แล้ว

      I see what you did there :)

    • @darshandev1754
      @darshandev1754 2 ปีที่แล้ว

      @@akshaypendyala ?

    • @akshaypendyala
      @akshaypendyala 2 ปีที่แล้ว

      @@darshandev1754 I honestly forgot why I wrote that 😂😂😂

    • @darshandev1754
      @darshandev1754 2 ปีที่แล้ว

      @@akshaypendyala 😂

  • @JoshPaulie
    @JoshPaulie 2 ปีที่แล้ว

    7:15 omg finally, something actually useful. you're the only tutorial ive seen so far that has shown something more than describe how cool it is and use print().

  • @jennitogo
    @jennitogo 2 ปีที่แล้ว

    As a Python developer... this is wild!

  • @SpaceJunkie66
    @SpaceJunkie66 2 ปีที่แล้ว

    trying to do the same thing you did at 12:07, however i keep getting this error; JsException(TypeError: Failed to fetch). Please help, i'm using a macbook.

  • @AzeezGafar
    @AzeezGafar 2 ปีที่แล้ว +2

    Thank you as always Brad! 👏🏽👏🏽👏🏽

  • @Vrx-yp1eu
    @Vrx-yp1eu 2 ปีที่แล้ว

    The most beautiful Frankenstein monster I've ever seen! this is awesome though ngl

  • @niluparupasinghe8581
    @niluparupasinghe8581 2 ปีที่แล้ว

    Just waited for your explanation as usual. It helped to learned a lot from this single video than prevous 2-3 days. Thanks man.

  • @wilsonwang8641
    @wilsonwang8641 2 ปีที่แล้ว +1

    20:35 really hit the frontend developers's thought!

  • @danilotorres2425
    @danilotorres2425 2 ปีที่แล้ว

    I see this as a huge oportunity to run ai in the browser, like tensor flow, keras. Really looking forward to check this one out

  • @JM-st1le
    @JM-st1le 2 ปีที่แล้ว

    A real "Finally, it's here" video

  • @eotikurac
    @eotikurac 2 ปีที่แล้ว

    reinventing the wheel in this industry never ends -.-

  • @cerealport2726
    @cerealport2726 2 ปีที่แล้ว +7

    seems like a nice shortcut to make a basic user interface in HTML/CSS/JS, and power some underlying processes with Python. certainly seems possible to be less annoying than fighting with Tkinter, Flask, or Django, though I haven't tried using PyScript like this, so I am just speculating.

  • @Realswagoverlord
    @Realswagoverlord 2 ปีที่แล้ว +2

    I been waiting for something like py script for years. I love working with numpy and pandas and im very excited to make projects where I easily put that into the browser.
    Thanks for the awesome video :)

  • @KrzysztofDanielCiba
    @KrzysztofDanielCiba 2 ปีที่แล้ว

    This is crazy! Wow! Already love it.

  • @RickBeacham
    @RickBeacham 2 ปีที่แล้ว

    Gota love Web Assembly - Thanks Brad!

  • @seanmackenziedataengineering
    @seanmackenziedataengineering 2 ปีที่แล้ว

    Great intro! This is a big step forward imho

  • @seanpe8474
    @seanpe8474 2 ปีที่แล้ว

    whats insane to think about is that you could do datascience stuff, and then have javascript frontend to output it. a big problem is trying to find a way to output cool datasci stuff in python to a format where javascript can take over. a lot of websites are gonna come out with some great datascience visualizations soon.

  • @MarkKClotfelter
    @MarkKClotfelter 2 ปีที่แล้ว

    What editor are you using?

  • @a_maxed_out_handle_of_30_chars
    @a_maxed_out_handle_of_30_chars 2 ปีที่แล้ว +15

    the project is good but it will take time for it to be as fast and reliant as javascript

    • @TraversyMedia
      @TraversyMedia  2 ปีที่แล้ว +18

      I don't even think it is comparable for basic front-end stuff. I think it will be used for Python-specific tasks in the browser. Stuff that you would not use JS for (Data Science, ML, etc)

    • @ararune3734
      @ararune3734 2 ปีที่แล้ว +1

      @@TraversyMedia Yeah excellent point, what's the point of creating another JavaScript anyway?

    • @gd44481
      @gd44481 2 ปีที่แล้ว +3

      It will never be as fast. Only JS can access the dom. This is jet another wrapper around js + wasm modules for the language logic.

    • @FlanPoirot
      @FlanPoirot 2 ปีที่แล้ว +2

      it will never be as fast as javascript, you're shipping a python wasm interpreter with your code to run python. wasm itself is still slower than javascript for DOM manipulations, even once these have been fixed python will still be slower than javascript and by then most people will be using faster languages with wasm anyway (rust, haskell, c, go, kotlin, nim, etc)

    • @softwarelivre2389
      @softwarelivre2389 2 ปีที่แล้ว +2

      Python is damn slow and has little to no advantages over JS, even more so if it runs on top of WASM instead of running natively. The only thing Python has over JS is operator overloading.

  • @tonybrutal
    @tonybrutal 2 ปีที่แล้ว

    I am doing a project for college right now and I need to apply my dice game that I made with python to a web browser. So far it doesn't work, probably because its a game thats played using the terminal. I was wondering if I could get some pointers about how I could go about it? my game asks for user input which is the main issue im having trying to figure out with pyscript.

  • @sg8nj
    @sg8nj ปีที่แล้ว

    Great demo❤

  • @thiagosannafreiresilva4366
    @thiagosannafreiresilva4366 2 ปีที่แล้ว

    I wonder if you could then package it using electron, as an alternative to tkinter and all that faff for simple GUI apps.

  • @rlopez6636
    @rlopez6636 2 ปีที่แล้ว

    This is next generation. .really cool

  • @pieterdebaere5931
    @pieterdebaere5931 ปีที่แล้ว

    This is so cool! Wonder if it could also display data visualisations created in Python within the browser, imagine being able to display seaborn graph without having to learn an entirely new data vis. framework like d3.js to display data in front-ends.

  • @HighlineGuitars
    @HighlineGuitars 2 ปีที่แล้ว

    I was hoping I could use PyScript with tkinter, but no apparently.

    • @ztcanada_1
      @ztcanada_1 2 ปีที่แล้ว

      Helpline 📲📩
      QUESTIONS CAN COME IN☝️⬆️ ⬆️......

  • @briankipkemoikoech8364
    @briankipkemoikoech8364 2 ปีที่แล้ว

    I think you can still use to parse/manipulate the dom tree, using Beatufulsoup

  • @noiseoid
    @noiseoid 2 ปีที่แล้ว

    very good introduction

  • @NewLondonMarshall
    @NewLondonMarshall 2 ปีที่แล้ว

    Ooh I like the new intro! :)

  • @MrSchattka
    @MrSchattka 2 ปีที่แล้ว +2

    This is great, thanks for posting this video!

  • @bboychris168
    @bboychris168 2 ปีที่แล้ว

    Question. Is pyscript able to import any module if as long as i put it in a seperate .py file? For e.g Importing Requests module or importing sockets etc. Keep in mind i am also new to coding and i really like how Pyscript works.

  • @rayankhan12
    @rayankhan12 2 ปีที่แล้ว +2

    Great and concise as always!

  • @clickadelic7681
    @clickadelic7681 2 ปีที่แล้ว

    Man, you are just insanely fast with new tech, whatever it is. How?

  • @tochukwuokafor1251
    @tochukwuokafor1251 2 ปีที่แล้ว

    Thanks you sir for good work. It will be a privilege to meet you one on one

  • @jenglinux4948
    @jenglinux4948 2 ปีที่แล้ว

    I'm no expert in python but can I used Pip packages ? or how will I know the available packages that I can use, example beautifulsoup ?

  • @Wallee580
    @Wallee580 2 ปีที่แล้ว

    Me: Starts learning HTML, CSS, and JavaScript so I can make websites
    Traversy: Hold my PyScript

  • @yashinshekh802
    @yashinshekh802 2 ปีที่แล้ว

    are we going to web assembly with this?

  • @maxfrischdev
    @maxfrischdev 2 ปีที่แล้ว

    Very interesting video Brad! 👍🏻🤙🏻

  • @aaronhawkins3722
    @aaronhawkins3722 2 ปีที่แล้ว

    Thanks for this Brad...How exciting! Plenty to explore. Any suggestions for a proper extension to get rid of all my underlined errors. Everything works great, but I just have these errors due to linting. Thanks again Brad!

  • @ibrahimkhalil6861
    @ibrahimkhalil6861 2 ปีที่แล้ว

    Hello Mr.brad I have a question
    how i can use the pyscript tag locally?

  • @simply-dash
    @simply-dash 2 ปีที่แล้ว

    What VSC theme are you using?

  • @prabhup9465
    @prabhup9465 2 ปีที่แล้ว

    Is that possible to access the file systems from browser using this? Also all the file operations like create, read, write, delete.

    • @tjgdddfcn
      @tjgdddfcn 2 ปีที่แล้ว

      No, websites are run in a virtual machine and dont have acces to local computer’s filesystem

  • @vaidasdatenis376
    @vaidasdatenis376 2 ปีที่แล้ว +1

    Would it work in Angular?

  • @champikadilshan3676
    @champikadilshan3676 2 ปีที่แล้ว

    please explanin this..What langauge we learn from today,what is the best javascript or pyscript

  • @ibrahimshakir1392
    @ibrahimshakir1392 2 ปีที่แล้ว

    well that would create much of a "new programming language" to me, since like the mix can be soo interesting and all, i would have a copy of the source and modify some things for a new file type (like pjs or pys for example) that would be really cool!!
    ALSO never forget typescript!!! :O, imagine if we also get a chance for that!!

  • @eango
    @eango 2 ปีที่แล้ว

    would love to call python libraries like this on backend node server too

  • @RandoTheFandango
    @RandoTheFandango 2 ปีที่แล้ว

    I could see a use for this in basic authentication for new backend developers

  • @RandhirRawatlal
    @RandhirRawatlal 2 ปีที่แล้ว

    This is incredible..! Can you train a model, pickle it and distribute the pickle through the web this way? This facilitates true distributed computing..!

  • @909shayan
    @909shayan 2 ปีที่แล้ว

    Waiting for PyScript frameworks😃

  • @theobellash6440
    @theobellash6440 2 ปีที่แล้ว +1

    00:49 Numpy not Num-Pee

  • @rocketmailmillonelytworoad
    @rocketmailmillonelytworoad 2 ปีที่แล้ว

    This is exciting!

  • @ccall48
    @ccall48 2 ปีที่แล้ว

    just working directly with browser, it doesn't like file import - cors error on brave. but never the less thanks lmk how to get around this if you know.

  • @jan_harald
    @jan_harald 2 ปีที่แล้ว +1

    how does this compare to brython?
    that's been a thing for a whiiiile, ALSO python in browser using webassembly...
    yet it's super obscure...which I'm not sure that this will have any bigger of an impact, if nobody's been using brython for like last 5 years, why would people use pyscript?

  • @onlineedu4u117
    @onlineedu4u117 2 ปีที่แล้ว

    I think it's making slow our Web page. You just wrote free lines of on which it was loading for free second.

  • @blackdedo93
    @blackdedo93 2 ปีที่แล้ว

    This is thrilling!!!

  • @codewarriors5716
    @codewarriors5716 2 ปีที่แล้ว

    Just some more crazy stuff has come. Web-D is becoming more intresting now.

  • @okiroroobrutheanagho8779
    @okiroroobrutheanagho8779 2 ปีที่แล้ว

    Thanks Brad.

  • @johngiftakis9878
    @johngiftakis9878 2 ปีที่แล้ว

    Can we have REPL tag that has some content prefilled?

    • @ztcanada_1
      @ztcanada_1 2 ปีที่แล้ว

      Helpline 📲📩
      QUESTIONS CAN COME IN☝️⬆️ ⬆️....

  • @luisafonseca6768
    @luisafonseca6768 2 ปีที่แล้ว

    me watching this video:
    "Oh, that's cool"
    "Wait, whaaat?"
    "OMG, that is siiiick"

  • @repotranstech
    @repotranstech 2 ปีที่แล้ว +1

    Htmx is also so cool and revolutionary.

  • @shafiemukhre
    @shafiemukhre 2 ปีที่แล้ว +1

    This is powerful, I once had to built separate APIs using Flask just so that I can use some of the python packages for ML applications. Tensorflow.js is there but it's not as nice. Great intro video, thank you!

  • @xenro77
    @xenro77 2 ปีที่แล้ว

    This vid is good and very educational for me! thanks.

  • @webylancers5607
    @webylancers5607 2 ปีที่แล้ว +1

    MashaaAllah Aameen 🙏 😍 🤲

  • @hasanrashed537
    @hasanrashed537 2 ปีที่แล้ว

    Take love from Bangladesh

  • @ahmed-developer
    @ahmed-developer 2 ปีที่แล้ว

    i want to design Ripl with Css? how can i be?

  • @ThankYouESM
    @ThankYouESM 2 ปีที่แล้ว

    Exactly in what way will it never replace JS?

  • @TheCodeDealer
    @TheCodeDealer 2 ปีที่แล้ว

    Cant wait to try this out

  • @BsktImp
    @BsktImp 2 ปีที่แล้ว +3

    What is the likelihood of PyScript being identified as an additional security vulnerability for browsers?

    • @tjgdddfcn
      @tjgdddfcn 2 ปีที่แล้ว +1

      Well its basically just webAssembly so all the vulnerabilitis of pyscript will be just webassembly vulnerabilitis. Pyscript is not a web standard or anything

    • @lonewolfcoding5208
      @lonewolfcoding5208 ปีที่แล้ว

      it depends
      security is more on backend than frontend
      servers has 0 trust on clients so dont worry

  • @muhammadmejanulhaque3305
    @muhammadmejanulhaque3305 2 ปีที่แล้ว +1

    basically, a Blazor alternative that was created a long time ago.

  • @ashutoshpattnaik5446
    @ashutoshpattnaik5446 2 ปีที่แล้ว

    What is that little yellow icon at the bottom right??

  • @pratikchakravorty983
    @pratikchakravorty983 2 ปีที่แล้ว

    Long way from this being actually useful but still a great step

  • @TheVertical92
    @TheVertical92 2 ปีที่แล้ว +1

    So how does this compare to Brython?

    • @kacoufal
      @kacoufal 2 ปีที่แล้ว

      brython is transpiler: it translate python source into javascript source and intrepret it in browser.
      pyscript using pyodide webassebly python distribution (all c code from cpython compiled into webasebly target) python code is interpreted directly in python interpreter running in browser webasebly enviroment.

    • @TheVertical92
      @TheVertical92 2 ปีที่แล้ว

      @@kacoufal ah i see. Thank you 👍

  • @ImmoTheBest
    @ImmoTheBest 2 ปีที่แล้ว

    Hello, thank you for the video. There was some problem with numpy - ModuleNotFoundError: No module named "numpy" even when the module was actually installed.

    • @BarcalonaFTW90
      @BarcalonaFTW90 ปีที่แล้ว +1

      Had the same issue. Try this in the head (note even if it's just one package it needs the square brackets):

      packages = ['numpy']

    • @ImmoTheBest
      @ImmoTheBest ปีที่แล้ว +1

      ​@@BarcalonaFTW90 Thanks man.

  • @dmytrob7336
    @dmytrob7336 2 ปีที่แล้ว

    How does PyScript works with minifying and obfuscation ?

  • @epj-m8s
    @epj-m8s 2 ปีที่แล้ว

    would this be possibile on webflow?

  • @AvidAfrican
    @AvidAfrican 2 ปีที่แล้ว

    I'm the first to watch it and comment. Uraaa!))

  • @hawarhekmat1174
    @hawarhekmat1174 2 ปีที่แล้ว

    Can i do image processing? With PIL

  • @amitchaudhary3760
    @amitchaudhary3760 2 ปีที่แล้ว

    Javascript ❤ always stay never expire

  • @iampiyushsingh7544
    @iampiyushsingh7544 2 ปีที่แล้ว +1

    Make space for King, his tutorial is here

  • @kchinnikrishna
    @kchinnikrishna 2 ปีที่แล้ว

    what is the browser he uses?

  • @marco201ful
    @marco201ful 2 ปีที่แล้ว +3

    NumPee!

  • @merabc
    @merabc 2 ปีที่แล้ว

    As I understand it's interpretation of the phyton language in JS

  • @h.vats_
    @h.vats_ 2 ปีที่แล้ว

    Interesting and starting of something big maybe. Nobody knows :)