YouTube Transcript:
Chris Laffra - PyScript - Python in the Browser | PyData London 25
Skip watching entire videos - get the full transcript, search for keywords, and copy with one click.
Share:
Video Transcript
Welcome everybody to the afternoon
session by data London day two after
tutorials yesterday or the first day of
the actual conference. I'd like to talk
to you today about running Python in the
browser. I like running Python in weird
places and I think the browser is
probably the weirdest where you can run Python.
Python.
Uh this is not a project that I came up
with but I picked it up when it was
announced and I built some applications
on top of it and I think it's a really
fun environment to play with Python and
I try to persuade you of that. So that's
my goal for
today. So who am
I? I grew up in the Netherlands. I got
my master's degree and PhD there. Then I
moved to the US. I worked at technology
banks, technology and banks. So IBM
research was the beginning of my career.
Then Morgan Stanley, then back to the
Netherlands for a bit. Then I joined
Bank of America where we built a large
trading system or platform in Python
that ran all of the trading in Bank of
America or Meil Lynch.
So this is an investment bank where you
want to have a single representation of
what is called an instrument. Uh so that
is an asset or like a stock or a bond or
an interest rate. And these are things
that you trade. So you sell and buy from other
other
people. So at some point you want to
know how much is it worth. So you need a
function on that is called price or and
you have some attributes that you pass
in. So if you have different
implementations in different parts of
the bank then predictability becomes a
problem and your numbers cannot be
compared or compatible and you cannot
calculate your risk reliably. So there's
a lot of efforts in large banks to come
up with single instrument
representation and the project I joined
in bank of America is called quartz
where it tried to do that in
Python. Later on, if you step forward a
little bit, I'm at JP Morgan again,
which is Athena. So, this is sort of um
u a reverse time series. Okay, I I
joined iteration three of this project
and then later on I joined iteration
two. So, I saw like it was like an
alternate reality. Um but there's only
really one way in which you can solve
this problem and all these banks are
trying it on their own way.
I also worked at Google and Uber. So I
have a mix in both technology and
finance but I'm not a command or
something like that. Today I work at AIA
which is based in Abu Dhabi in the
Emirates and that's a sovereign wealth
fund where we manage money by trying to
do systematic trading and make more.
So you can understand that that requires
a lot of data science because you have
to like gather a lot of data from
outside make decisions based on it and
then come up with trading strategies
that you
apply. In all of these worlds there are
two different kinds of people. Let's
just like just make it black and white.
So there's two kinds of people. There's
like uh econ economists, they're like
data scientists, they're like uh
quantitative, they're mathemat
mathematicians, and they like to use um
Jupyter notebooks. On the other side,
you have people in production that like
to have predictability of the results.
They want to have standardized Python.
They want to have reuse. They want to
have not copies of things. And they want
to run at yeah production scale because
you have to manage a lot of
data and these are like aliens. They
cannot talk to each other. So that is my
goal in life is to like sort of get them closer
closer
together. In parallel to yeah doing work
I also like communicating. So I've
written quite a few books. Uh the most
recent ones are not about technology but
more about how do you communicate better
as an engineer. So there are a lot of
channels that we use to communicate with
as engineers. I'm assuming that most of
you are engineers here. Um and we
engineer we we communicate with people
that don't understand us. like we want
to talk about register allocation and
not about what is the value of the
software to the bottom line whatever
right so there's a lot of opportunity
for engineers to become happier more
successful richer
um if you can actually talk to these
people so that's at some point I started
like collecting all these tips and ended
up in a book the other book is written
by an AI so you should maybe take a look
at it. I'm not trying to make any money
on this on the second book. So, it's
sold for yeah
um printing cost because this was an
experiment. When Chad GPT just came out,
I wrote a book together with it. So, I
asked all the questions and all the
answers were given by Chad
GPT. We'll use AI in this presentation
as well. Uh not just for creating the
slides, but we'll use it to generate
code and I'll explain how that works.
because I think that's the future where
we collaborate with
AIS to add value quicker maybe bring
these two worlds
together. So why pycript? So I'm showing
you some applications of pycript. So
what is pycript actually? So pycript is
coming out of a need is that we want to
have an easier way to develop web applications.
Python is very popular. Um, who here
uses Python? Yeah, everybody, of course.
Yes, because this is a Python
conference. But, uh, if you look at
things like LinkedIn, uh, and you you
scan all the jobs and you see what
languages do people require, Python is
on the top. And there's many ways in
which you can do these kinds of
calculations and Python often comes to
the top. So, it's a very popular language.
language.
Um, also it comes with a lot of
batteries. So there's a lot of
development over the last 30 years or so
that Python has been around specifically
targeted towards data analytics. So data
manipulation, data visualization,
natural learning processing where
everything has been solved. So it's a
lot easier for you to build value and
add things on top because there's so
But there are also too many batteries.
Uh it can be overwhelming to pick the
right one. There's more than half a
million projects on Pi right now. And if
you see the download stats, it's like I
don't know 30 billion a month.
So this means that people download
Python packages a lot. And why is that?
because they have to create an
environment where
um all the versions of all the packages
that they require recursively have a
predictable outcome so that the next
time you run it it's reproducible
result. So this is an AI generated
picture. I asked it like why is Python
installation a pain and it came up with
this picture and it's apparently such a
pain that this is probably XKCD
reference where Python can fly somewhere
XKCD and it's such a pain that it
actually writes your code on the wrong
like but it's the reality like
installation of Python packages is hard
and when there's a problem you solve it
you make another tool right so UV solves
everything now uh not really it still
requires if you want to have your
application delivered to people who are
not Python developers and you say well
it's easy you just do UV in run and okay
they give up
So this is too hard to develop your
applications and deliver it in one
button press and this is what pycript
tries to achieve. So we want to have
Python available everywhere without any
installation. So how do you do
that? You make a web application. So the
web application is a link. People click
on the link and it works. So how does
that work? Uh there's a little bit of
JavaScript that bootstraps
uh the download of the web assembly
containers for the two Python VMs that
are currently supported in PIScript
which are MicroPython and
Piodite. And these are then bootstrapped
with an empty container and they say
like well I need my uh all the basic
libraries from Python like definition of
string and all of that and then it
builds that up and you say well I also
want Panda so I want this and also
downloads that from
Pippi and then installs it on demand in that
that
container and at that moment your Python
code is then executed and runs in that
container. it can talk to the JavaScript
engine to access the DOM and in that way
you can actually render things in the
browser. So this is the basic process
without any manual installation. People
just click on the link behind the
scenes. The PIScript runtime the
JavaScript bootstrapper will kick off
the right VM the one you chose and then
it will bootstrap your application. So
why do we have two VMs?
Um there's actually you can do any uh
but there's two popular ones and
microython and podite. So microython is
for embedded devices. It's really tiny
python VM and it measures lab libraries
included like
240k. Piodite is much bigger and it has
everything in the language. So to get it
working on an embedded device you say
like well um for string there are like
70 functions right 70 methods you can do
on a string we don't need all of them on
embedded only maybe 30 right so you
selectively cut down the size of the
library and therefore also the
capabilities of the VM to make it as
small as possible in pi says like no no
right we're supporting all of Python so
this is a standard C Python VM [Music]
[Music]
and that has been compiled to web
assembly. So normally Python runs on
Linux, on Mac OS, on Windows and
somebody wrote the make file to say like
how do you compile into a native
application, right? It's the CPython VM
is a C program and you can compile it to
native instructions and bundle it up and
then make an XC out of it or an
executable format for Linux. And this is
what somebody has done. So they have
written the make file basically for web
assembly for the piodite VM. So your
Python code is not converted into web
assembly that just runs as before and
it's a standard Python VM. So
compatibility is
oneonone but it comes at a price. It's
much bigger and I said in the beginning
uh you start with nothing and it has to
like import everything and build in
there because for security reasons you
start with an empty sandbox.
So that's the trade-off startup time and
later. So to get started with PIScript u
we always recommend people to go to
piscript.net which is a starting point.
It gets you to discard. It gets you to
And I'll show you two examples of uh
standard examples that come with um
PIScript that show you the power of
running Python in the
browser. The first application you've
already been watching this slideshow is
done as a PIScript application.
So, I wrote some Python code that
downloads a
Google presentation, extracts out the
pictures, puts them in the file system,
and then I have Python logic that says
like, oh, you press the right key, I go
to the next one. Oh, you press the left
key, I go to the and it even works with
this remote. This is really interesting,
too. So, I can go and back and forth.
So, it's almost like Google Slides, but
then all written in Python,
right? Why would you do that? Well, it's
just fun. [Music]
[Music]
Uh, so the, uh, first example, you go to
pcript.net and it will link to the
documentation as you see in the bottom
here, but it also has a link to examples
and this is what I did. So, I opened the
first one and this is a yeah, basically
a a poor person's IDE. You can edit
Python code in here.
Um, so you can see it here. It's in an
editor and when you make changes and you
save and you run, it runs here in the
browser. Now this is using WebGL and
it's really like I mentioned earlier
from the Python code you can get to the
JavaScript runtime and then to the DOM.
So here we're using a JavaScript library
to do that for us. So from Python we
basically just instantiate that WebGL
library and you can see how it works
here in the top. we say import tree and
then from tree we say get a webgl
renderer and we basically you know write
the same kind of code that we would do
in JavaScript but now we write it in
Python but it's really executing
JavaScript so there's a proxy between
the two languages between the two
runtimes and anytime you make a call
from Python to JavaScript we create a
proxy and then we say to the other side
like I want to have the WebGL renderer
on three and it will create a proxy on
the other side for us to hold on to that
result of that execution and send back
the proxy so that now we can say I want
to call new on it and then so we go back
and forth between these two runtimes all
the time so anytime you see a dot here
that's basically going between these two
runtimes and once it runs uh it runs at
normal yeah speed, maximum JavaScript
speed basically, which is pretty fast
these days actually because V8 is
unbelievable. So this is the basics.
This is one thing you can do. You can
very easily use JavaScript libraries and
script them from Python in this way. So
this works because you have an
index.html HTML that says at some point
says I have a script tag
here. Um, can I zoom in a bit? Yeah. So,
the script tag looks like this. So, it
says like what I want to run is piodite.
Here's my source file and here's my configuration.
configuration.
So this is like a JavaScript script tag
but in this case we say the type is
Python and then it just bootstraps on
top. So this is one example. The other
example is using a Python library called
Folium and this is often used in Jupyter
notebooks for rendering the result of
geographical information system related data.
data.
So in this case we have the map of the
US and we overlay it with some data. Uh
so this is this whole script here but
this one doesn't go to JavaScript but it
keeps talking to Python libraries. So I
installed another package in my
piscripttoml. You can see that one of
the packages I
install is called Folium and the other
one is pandas because those are the two
packages that my code needs and my code
imports pandas and it imports volume and
it basically downloads this data from
this location turns it into a pandas
data frame and then it gives that to
folium to render a map and it basically
extracts the data out. So now when you
look at this normally in Jupyter
notebook what it generates is HTML. When
you say
display this generates HTML gives it
back to the Jupyter notebook and it
renders it in the document in place but
what is rendered there is HTML that is
generated by the Python code that was
executed and this is the same way. So
from inside your web application, you
can run Python code that generates HTML
and then you basically host that back
into the DOM. So when I interact with
it, this is again JavaScript. So this is
not using
Python event handling and Python isn't
drawing these these rectangles whatever
at at this moment it's all done by
JavaScript the same way that you would
have in a Jupyter notebook.
So you can combine these things. You can
write pure Python. You can
write Python that uses packages that
generates JavaScript code. Or you can
directly go to JavaScript and you can
mix and match at any point which you like.
Yes, a question. Jun has a question.
Wait a second for the microphone, please.
Yes. Could you please go back to the
previous Yeah,
Yes. JavaScript. Oh yes. Yes. At the
top. Um that's a good question. At the
top there's some initialization
happening. So you need to
install uh PIScript and that is done
with this URL and this registers itself
as a content handler for the page. So it
gets notified when a script tag is in
included in the page. So that JavaScript
code then takes out that main.py and it
starts up the VM and bootstraps the VM
with that. Yeah. So there's a little bit
of setup at the top here.
Yep. If you're interested in doing this
yourself, you just go to
piscript.com. So this is running on
here and this is from the from the
examples folder but you can also create
your own examples very easily. So you
just press the new button and it will
create a new example and so you don't
have to know how to get strap
Another example is um so I showed you a
screenshot of this but this is actually
my homepage and this is also written as
a pi script application. So there's some
animation that is happening here. Um
when you move the mouse it's uh allowing
you to yeah click on
things. So why would you write this in
Python? Because I could. I thought it
was really cool. And um you could have
done this in JavaScript of course but
hey come on. Uh if you look at inspect
and then at the source uh maybe I should
show the page for source. Uh you can see
that I use some JavaScript and then I
use main.py. So this is my code for my personal
personal
awesome. Another example is based on
work I did at JP Morgan when I was
employed there. We had uh I mentioned
these large trading platforms and these
large applications and we start millions
of them every
day and they take a long time to start
up and I wanted to save money with the
bank money and I thought like how can I
make this faster so I wrote a profiler
uh it's a sampling profiler that runs in
production on these on these apps and it
records whatever is happening and then
there was a UI written in Typescript
that renders
it and then pycript came out. I left JP
Morgan and I thought like hm I want to
do that thing again but not use
TypeScript but I want to do it in
Python. So this was my first experiment
that I wrote with
PIScript. So you run the sampler and
that's already installed actually on my
platform on my laptop here. So anytime
Python runs on my laptop, it rec it
creates a recording of that execution
and they automatically show up in this
table on the left and then I can
basically browse them back. So this
whole thing is written in Python. So
there's no JavaScript here. This is all
real Python. So this is an example of
the other extreme. I'm not leveraging
any JavaScript libraries because I
wanted to see how far can I push it and
this was horribly slow. Because I
mentioned before like whenever you have
a dot you go from the Python VM to the
JavaScript VM you have to create a proxy
to so that they can talk with each other
in the future but I also have to
marshall all the arguments like if you
send a string from here to there uh we
have to encode it in a format that both
understand and JSON is the best one. So
there's a lot of conversions happening.
So if you imagine you draw this whole
diagram, there's a lot of draw line
instructions, a fill box, draw text, and
each single one is not that expensive to
go across, maybe 50
nconds. But if you have a thousand of
them or
10,000, it adds up and it's more than a
second. So this thing was horribly slow,
like boom boom boom. So I had to make
this faster. So the current speed is
it's actually I cannot like disconnect
it from the mouse. This is how fast it
renders and every time I move the mouse
it rerenders the whole page. So this is
u and you zoom in it does the same
thing. So this is more than acceptable
for the performance that I was aiming
for. So the way this works it collects
all the draws. It collects all the draw
strings and all the draw lines and it
basically wraps those as one
instruction. And I say, I want you to
draw purple boxes in these locations.
integers. So now I need only maybe like
five or six round trips between these
two VMs to render it fast. So I'm
cheating. I have a little bit of
JavaScript in the back end. So it's like
my native code, right? In in languages
like Java, you write C code. In Python,
you write C code to make that little bit
faster. In Pycript or Podite in the
browser, you would use JavaScript as
your native code to make it
faster. Now, what can you do in this
thing? Like, yeah, it records
everything. It also records the logs.
So, this is interesting. You can combine
the two. So, you can look at the
timeline. What happened here? So, this
is like a log entry. You can screw. So
this is all Java. This is not
JavaScript. This is Python. So this UI
is drawn by Python and it's at this
moment this is all in the Python memory
whether I'm like looking over this this historical
historical
data and you can do things like what
this what does this program do if I ask
you right you don't know. Uh it's called
images. So maybe it does something with
images. You don't know. Um but it it
runs for a while. You can see here it
does pipot for a while and then it runs
process image for 5 seconds. So this is
coming back to that example that I
mentioned earlier at JP Morgan where we
have startup took so long and I didn't
know why. In Python uh we pay the price
for imports and they're often hidden. So
if you look at this example dataf
frames, this is an example where I
wanted to do something with pandas dataf
frames and it took like 15 seconds to
just import
pandas. At the top you can see CPU was
zero. So this is just waiting for IO. Um
the yellow line shows you the number of
packages loaded so far. So it goes
eventually to something like
626. So in order to do one thing with
pandas, you need to load 600 modules and
each one is a Python file and each one
has to come from the file system. And
this is all IO. I'm just waiting for the
bytes to come in. Now why it was so slow
this time, I have no idea. It's not
normal to take 15 seconds, but at least
I know now that it comes from IO and I
need to have better caching on my local
file system or
something. But if you want to know what
this thing does like the images example,
um I can look at the design and this is
quite interesting. So what I do here is
this is drawn with D3JS. So I'm
cheating. I'm using JavaScript but this
is this is the possibility right I can
switch between Python code and
JavaScript whatever is the most
practical at that moment like Python
doesn't try to solve solved problems uh
we leverage what is available anywhere
but from this I can now very easy yeah I
I can sort of get an an idea what this
program is
doing and if I don't then I can always
ask the AI so open AI what is this thing
doing and it looked at that trace of the
execution and it just gave me a
does. So this was my first experiment.
Um I did a tutorial in uh December on
PIScript online and there I wanted to
also use AI. So you always you have to
use AI right? So this UI is is written
in Python and it goes out to OpenAI to
basically yeah help me with setting my goals.
goals.
So it says here PI data London but let's
So, it's trying to find a a picture for
trying to get promoted. Takes a little
longer. It's like 15 seconds on average.
The text is easy to generate
apparently. So, it gives me some idea of
what I can do to get promoted. I have to
understand the expectations,
requirements. Oh, yeah. That makes
sense. Uh have to research. Yeah. Yeah.
Yeah. This all makes sense. And then [Music]
[Music]
uh yeah the picture uh still has to be
worked on but your goal has to be
achievable and
renovate and miserable but anyway you
get the feeling. Uh so how do you do
this? This is like 30 lines of Python
this whole app. So it's very easy to construct
construct
um because you don't have to learn any
JavaScript. This is if you know Python,
this will feel like very familiar
territory. So to build that last app, I
wrote a UI toolkit because it's really
hard to write UIs in a very low level on
the DOM level like create DOM entries
and whatever. I wanted to have a higher
level abstractions. I wanted to have
reactivity. Uh I want to have a model
and then have widgets update
automatically when the model changes.
And because we're writing Python code,
this is actually not that not that hard.
Um, so on the right here, you see I
introduce a class. It's a Python class.
And then I basically write a UI. So it's
it says like I need a vertical box.
Inside I have a label and then I have an
input which refers to the name of the
product. So this is the first line and
you can sort of see the structure of the
code already. It's a vertical box with
little things in there. And now when I
make changes in this model, so if the
name changes, all the UI elements are
dependent like ReactJS um and then this
string updates. You can also do this
from code. So you can like make some
changes in the model and then directly
and then the UI gets updated. Now this
is easy to write was very easy to do.
This library is called LTK. It's the
little toolkit. So if you go here, it
shows you
the repository. So you can you can
actually look at the code and it's not
that hard. It's
u this is the biggest file. This has a
definition of all the widgets in LTK and it's
it's
like let me see 1700 lines and this is
the most complex one. The rest are much
lines. So that allows me now to build up
more interesting
abstractions in Python to build yeah bigger
bigger
applications. I also mentioned that we
have MicroPython and we have Piodite and
this is an example where you can do
that. So here I'm running with Piodite.
Now I'm switching to Piodite and you see
it takes a little longer. So it has to
construct the Python VM, bring in more stuff.
stuff.
trade-off. I've also built uh Python
visualization in the past. This was like
2015. I did it on
pspot and this is a version that runs
entirely in the browser. So, you can
also do set cis set trace on your
application. So, anything you can do in
Python, you can actually do within the
browser. So, then you can build very
interesting visualizations like this one.
And this one is calculating the golden
ratio. And it sets a break point on this
line. And each time the break point is
hit, we run the visualization script at the
the
bottom. And this is yeah updating the
view on the top. So I can go back in time
time
and basically see the picture. So if you
ever want to know what the difference is
between breath first search and depth
first search. So this is breath first
search. So you can see it right? It's
it. So think about how this here like
sounds. And now I'm going to switch to
So this helps me understand how the program
program
works. And again, this is a little bit
more useful way of running Python in the
browser. Uh because I don't need a
server to run the algorithms and
visualize them. Um it would have been
quite hard to do all of that in
JavaScript. So this is a very good
example of why you want to do it there.
Okay, I want to get promoted.
Uh this is another example of an
application that I thought like I was
going to get really rich with. Nobody
bought it. Uh it's called
lifesaver.coach. So if you're
interested, go there, buy a
subscription. Um to get promoted, it
gives you advice here and so on. Um I
can click this thing like and this will
make a a task out of it. So now I know I
have to work on this and then I'm done
with it. Yay. Um, next slide is I
already got the notification of the
time. So, the next one is um, Jupyter
notebooks allow you to write Python code
and run it sort of in the browser but it
runs in a kernel. So, this is uh, if
you've heard of Python for Excel, Python
in Excel, this is like Python in Excel
but this is Excel in Python. So I've
written a sheet a spreadsheet here in
Python using LTK and it's basically
building the dependency graph of
execution but all the Python code runs
in the browser in web assembly
here. Um why would you do that? Because
I wanted to prove that I could. And it's
using two VMs. It has MicroPython for
the UI and it has Pyodite for the
worker. And it can do anything you can
do with pandas, polars, whatever. So
here I'm loading uh URL. So if I go here
and basically grab that one
one
quickly. So if I have this
URL and I go to a new file for instance,
let's start with an empty
sheet. I can say import and then pass in
that URL.
and it will do a preview of that and
then I can import it into the sheet. I
can do a pandas or polars. So we got the
po polar guide book authors here sitting
in the first row. So this is for you
guys. This is polars. Here we go.
Um you can also use um duct db data
frames and here I experimented with some
interesting filtering. So here we have
like the coordinates are filtered by
14,000. So let's change that. So I say
instead of 14 I want to have
15,000. So when I say enter it actually
updated the source code
here and then redrrew the map. So now I
have fewer
ones. So
um that is all cool but it it gets even
better. So I I gave a demo of this to
Guido and then he said like uh yeah it
would be really cool if you can actually
interact with the sheet from the cell
right and he said like I I tried to like
negotiate that in in Microsoft but they
wouldn't let me do this in Excel. Um so
I said oh yeah that's possible let's do
that. So what we have here is a cell
function and here's the code and what it
can do it can escape its sandbox and it
can talk to the sheet and it can update
DOM entries in the sheet. So this is
what I'm doing here. Can also set event
handlers. So I can say move the piece
from here to there and then move from
here to there and then move my queen
here. And this thing is really dumb
because it moves randomly. So, it's easy
to win, but
uh try and do this in Excel, right? Try
to do this in I try to actually um hook
up a Python engine as well, a game
engine, but those are mostly written in
C. And they're not pure Python, so
they're hard to import. So here you can
see I import chess as a module and there
are chess engines that are compatible
with chess the the Python
module but they wouldn't run in web
assembly. So I'd have to compile the C
code to web assembly first and that that
was a little bit too much work. Now so
that is some of the things that are
possible but people were complaining to
me like oh that looked like Excel. This
is can you do all the key bindings for
Excel? No no please not. uh do you have
all the imported uh default functions in
X? No, let's let's remove the sheet.
Right? So this is an experiment that I
did is similar. So this is again micro
Python for the UI. It's using piodite to
run the code and it's using another
piodite for finding out all these
components. So this pallet is done by
one VM and then it runs and why you have
to talk to me afterwards. We can talk
about that. So what I want to do is I
want to draw a picture. So I want to
draw a candlestick of some historical
data. So what I need is a data frame. So
I click on data frame. I want to connect
it to something. And there are two
potential candidates. So history is one.
So I create history. So now I can
connect up my history to my data
frame. And this history object needs a
symbol and from date and to date. So I
luckily have components hanging around
that match those things. So I can
connect them. So Tesla symbol from date
and then to date. And when I click it
now has all the three inputs and it can
actually run. So you will see it
run that cell. So it ran the pandas data
frame creation code for that and then
then it gave the output to the input of
the candlestick and it could draw could
draw itself again. This runs up to
March. So let's fix March and make it a
little bit later. Select today is 06
06
07 and when I change the input changed
and then the data frame will be run
again and then it's updated again. So
there was some recovery and now we're
Um so this is what is possible uh with
Python in the browser. These are some
examples that I gave you. If you're
interested in trying them out yourself,
uh, this is all open source. Py Sheets
is open source. The flow example is open
source. So, just head down to the GitHub
logo and you'll see the repositories there.
there.
And my plan was to or my goal for today
was to get you excited about running
Python in the browser um in a in a like
as a replacement for JavaScript because
I think Python is a much nicer language.
We all agree,
right? So with that, I want to thank you
and if you have any more questions, we I
guess we almost ran out of time or we
ran out of time. So come after me, come
to me in the in the hallway and we have
Click on any text or timestamp to jump to that moment in the video
Share:
Most transcripts ready in under 5 seconds
One-Click Copy125+ LanguagesSearch ContentJump to Timestamps
Paste YouTube URL
Enter any YouTube video link to get the full transcript
Transcript Extraction Form
Most transcripts ready in under 5 seconds
Get Our Chrome Extension
Get transcripts instantly without leaving YouTube. Install our Chrome extension for one-click access to any video's transcript directly on the watch page.
Works with YouTube, Coursera, Udemy and more educational platforms
Get Instant Transcripts: Just Edit the Domain in Your Address Bar!
YouTube
←
→
↻
https://www.youtube.com/watch?v=UF8uR6Z6KLc
YoutubeToText
←
→
↻
https://youtubetotext.net/watch?v=UF8uR6Z6KLc