 Hi, I'm Shrini, and I'll be talking about building products for humans using Python. So I'm a software consultant, and I've been working with multiple startups, and there was one product that I was building, which is a marketing or an ad copy generator. So it's a piece of software which takes in the user input, and it applies a few patterns and rules, and there are a lot of ML, NLP related things in the black box, and out comes the marketing ad or copy. So what is a copy? It's just a basic text that you see on any marketing page or a landing page, right? So this is the software, and the output that it generates is a normal Python dictionary which gets translated to a JSON file, and it looks like this. We as programmers can understand this. So there is a headline, there's a sub headline, and there are a few paragraphs. This is a very simplified sample. The actual JSON is a much bigger one. So there are paragraphs, and there are call to action, and so on. But if you show this to a marketing guy, this is going to be the reaction that he is going to show, right? So naturally, you need to create a normal text file which normal human can understand. And the first iteration is basically you create a simple script which outputs a text file. But a normal text file loses all the semantics that you get out of the tool that we have created, the headline, the sub headline, and a lot of other tables, and those kind of things are lost here. And you ask the user to open it in Notepad, and then you have to teach him how WordRap works, and why there are multiple lines, and so on. So the second version, we decided to put it in HTML or a web application, and there was a frontend guy who was working on this, and he just created a HTML page with all the formatting and everything done neatly in CSS.js. And the end user eventually said, I want to edit this file. And why don't you just give me a Word document? And the frontend guy, he was, even though, yeah, Nord and NPM has a lot of packages, he wasn't able to get the right packages for creating Word document on the frontend. So I had to step in and then say, let's do it in Python on the backend itself, and you can just link it to it. That's simple. So the package that they used for this was called as Python Rock X. You can just do a pip install Python Rock X. So there are basically two ways to generate a Word document. So you take all the data and you lay out the page as paragraphs. So a Word document is composed of multiple paragraphs, and each paragraph can have its own styling, and each paragraph can also have its own something called as a runs. So they have styling for each of them. You can also mark styling for each of the characters and so on. So let's just see a very simple example code. So you create an empty document object and you add a heading, which is level one heading, which is the title or the heading one if you use Word document. And then you add another heading, which is a level two heading, and then you add a paragraph. Just for the sake of this example, I'm just stopping with a single paragraph, and finally I'm doing a doc.save of a file name, which is the output file name. So this is one way to generate a Word document. The second way is you create a template file. The reason why I'm talking about the second way is there are many documents that you would need much more complex styling. And it's a bit hard to do that because the documentation is not that very good. So I instead created a template file, I used the data that is generated, and I embedded both, I wrote a script which just replaced all the dummy data in the template file, and it creates the doc file. So the example is very similar. Just the lines 5, 6, 7 have been changed. And the object, you create an object using the template file. And in the line 5, you can see that you do a doc.paragraphs of zero, which is the zero paragraph, you're changing the text to whatever text you want and so on. So this is the second way to generate a Word document. And this is just a screenshot of the same script that we used, and this is how it will look in your Word document. So once you show this, this is naturally going to be the reaction from the marketing guy. And the things that we learned here is that users are humans, and you need to empathize with them and understand that they have their own preferences and they have their own file formats and languages that they like, and you can't impose your standards on them. And Python makes it easy to create documents like Word documents, Excel, PowerPoint, and PDF. So these are all the different packages that you can use to create these files. Thanks. You can follow me on Twitter at CNU, and this is my website.