From bdc4201969b0dab58bfb235dbc9a493b95521174 Mon Sep 17 00:00:00 2001 From: Andreas Pelme Date: Sat, 13 Apr 2024 13:32:41 +0200 Subject: [PATCH] Add a Philosophy section to README --- docs/README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/README.md b/docs/README.md index 3a6b63c..d2cd876 100644 --- a/docs/README.md +++ b/docs/README.md @@ -65,6 +65,23 @@ from a Python backend. - **Familiar concepts from React:** React helped make it popular writing HTML with a programming language. htpy uses a lot of similar constructs. +## Philosophy + +htpy generates HTML elements and attributes and provide a few helpers. + +htpy does not enforce any particular pattern or style to organize +your pages, components and layouts. That does not mean that htpy cannot be used +to build sophisticated web pages or applications. + +Rather the opposite: you are encouraged the leverage the power of Python to +structure your project. Use modules, classes, functions, decorators, list +comprehension, generators, conditionals, static typing and any other feature of +Python to organize your components. This gives you a lot of power and makes htpy +scale from a single small Flask project to bigger applications. + +[Common patterns](https://htpy.dev/common-patterns/) can give you some ideas +that you can build upon yourself. + ## Installation [htpy is available on PyPI](https://pypi.org/project/htpy/). You may install the latest version using pip: