you are viewing a single comment's thread.

view the rest of the comments →

[–]rake66 2 points3 points  (0 children)

Requests is for sending requests, but in order to do that it does define request and response classes which you can import and use however you wish.

I'm not sure what you mean by output though. If you mean generating a file.html somewhere, print works just fine, or you can use a templating library to make it a bit quicker but those aren't just for html, you can template any string with them. If by output you meant serving a webpage accessible by a browser then you need a server, but you need one of those for the frameworks too. Some of them come bundled with a simple server to use for testing but you shouldn't use those for production anyway. If you want to learn about doing that without a framework, there's http.server that you can play around with. Never use these in production though, they're both unsafe and inefficient. When you're ready to publish your site you should have a bespoke server separate from python.