Some common questions

What is py4html?

py4html which can be thought of as both a library and framework at the same time is a newly discovered alternate method to develop websites or web apps without relying on the traditional way of using html and css to define how each point of the site should look. Instead we open a new Python file and call Python functions and class methods by passing arguments for both the data to be included in the site as well as the styling for each component of the site or app. Running this Python program results in the creation of an html file with same name as the Python program name, that contains both html code as well as css style information for the web page. This html file can then be opened in the browser just as you would do so, if you were following the tradiotional web dev way of writing out html and css code on text or code editors before testing it out on the browser

Lets first address the question of why was this library or framework developed in the first place

A python package that aims to replace html and css code with Python, automatically begs the question of why can’t we just do it in these two standard web languages directly instead of using Python to generate the equivalent html and css code. The most straight forward answer is that most people would prefer writing in some other programming languages instead of these two as is indicated by the rise and widespread use of Javascript front end libraries that allows the developer to use very little of these languages. But very sadly for Python developers and Python lovers, there is until now no stable, complete and widely used by all option, available for use. This libary was written as an attempt to address this need of Python developer community, because up untill now, no Python libary is available that can do as much as py4html does in as simple a way as done here. That being said, as with all other open source softwares, this is not a competition and py4html has nothing to prove and is not fighting any battles with any other web dev libaries and frameworks that already exixts in all programming languages or will be created in future and that, it is always a good thing when anyone else in the Python community takes it as a challenge and comes up with a new different innovative library that renders py4html completely useless and therefore obsolete.

Is py4html a complete replacement for html and css?

The short answer is no because py4html, as is the case with any other such libraries doesn’t cover the full scope of html and css.But it can however create fully functioning websites or web apps without touching upon these languages.Pure py4html, without learning and using html css is more than enough for static websites as well as simple or even slightly complex dynamic sites/apps.It is just that,for developing complicated sites, in the sense of having more functionalities and more aesthetically pleasing in terms of applied style/appearance, you might require extensive knowledge of css and html and have to add your own html/css code to the ones generated by py4html, but even in such cases, more than half of your work can be done solely using py4html itself.

Who should use this library?

The recent years has seen a huge rise in Python’s popularity mostly aided by it’s widespread use in the world of AI, and as the world of AI is only going to get bigger and bigger with each year and as till today, no other language has ever come close to even pose a challenge to Python’s throne in AI development, it is a sure guarrenteed thing that Python’s popularity is only going to exponentially increase in the coming years too.This along with the fact that Python was always the best langauge for beginners starting out in the world of softwares/programming has led to massive adoption of Python as the first language to study in schools/colleges around the world. All of this means that every single hour, thousands of new students are being taught to program in Python and along with them, there are hobbyists starting out in AI application development in Python as well as scientists/academicians from a non programming background who have just finished leasning Python to carry out their scientific or research tasks. py4html is maninly aimed at these people, because while Python is not just for AI and has excellent libraries/packages for nearly all areas of software development,it is a very known fact that Python is lagging behind in the world of web, mostly in front end development where we currently don’t have as awesome libraries as we have Django,Flask etc for backend.So it is a very very sad thing that such a beautiful and most loved language is lagging so much behind Javascript in the world of web development. This library might not change that completely, but it is definetly the step in the right direction.So if you are a student or AI hobbyist or researcher who has just finsihed learing Python and is doing projects in it, and you suddenly face the need of developing a site or app, then look no further,as this libary will surely help you in not having to spend days after days trying to master html,css only to end up feeling bored and not happy writing the code for your site in these languages. Whether professional developers will use py4html is a thing that only time can show.