Is it possible to upload something to an online file?

So I’m learning Python and am now past the part of basic and intermediate concepts and am now testing how far python can go. I was wondering if it was possible to do something like this:

text = str(input(">"))
upload to somewhere

Now obviously this is a bad example, but let me explain. Is it possible to for example take an input and upload it to somewhere online where the text will be saved and I could access it by going to that URL or file online?

Yes, and because python is popular, there are multiple different ways to do it!

There are different libraries available, with different levels of complexity. requests, httplib, etc.

Depending on the service you want to upload to, there might be good libraries available, such as pydrive.

You could email the file as well.

1 Like